text
stringlengths
107
2.17M
Require Export GeoCoq.Elements.OriginalProofs.lemma_extension. Require Export GeoCoq.Elements.OriginalProofs.lemma_3_6b. Section Euclid. Context `{Ax:euclidean_neutral_ruler_compass}. Lemma lemma_outerconnectivity : forall A B C D, BetS A B C -> BetS A B D -> ~ BetS B C D -> ~ BetS B D C -> eq C D. Proof. (* Goal: forall (A B C D : @Point Ax0) (_ : @BetS Ax0 A B C) (_ : @BetS Ax0 A B D) (_ : not (@BetS Ax0 B C D)) (_ : not (@BetS Ax0 B D C)), @eq Ax0 C D *) intros. (* Goal: @eq Ax0 C D *) assert (~ eq A C). (* Goal: @eq Ax0 C D *) (* Goal: not (@eq Ax0 A C) *) { (* Goal: not (@eq Ax0 A C) *) intro. (* Goal: False *) assert (BetS A B A) by (conclude cn_equalitysub). (* Goal: False *) assert (~ BetS A B A) by (conclude axiom_betweennessidentity). (* Goal: False *) contradict. (* BG Goal: @eq Ax0 C D *) } (* Goal: @eq Ax0 C D *) assert (neq A D) by (forward_using lemma_betweennotequal). (* Goal: @eq Ax0 C D *) let Tf:=fresh in assert (Tf:exists E, (BetS A C E /\ Cong C E A D)) by (conclude lemma_extension);destruct Tf as [E];spliter. (* Goal: @eq Ax0 C D *) assert (BetS A B E) by (conclude lemma_3_6b). (* Goal: @eq Ax0 C D *) assert (~ eq A D). (* Goal: @eq Ax0 C D *) (* Goal: not (@eq Ax0 A D) *) { (* Goal: not (@eq Ax0 A D) *) intro. (* Goal: False *) assert (BetS A B A) by (conclude cn_equalitysub). (* Goal: False *) assert (~ BetS A B A) by (conclude axiom_betweennessidentity). (* Goal: False *) contradict. (* BG Goal: @eq Ax0 C D *) } (* Goal: @eq Ax0 C D *) assert (neq A C) by (forward_using lemma_betweennotequal). (* Goal: @eq Ax0 C D *) let Tf:=fresh in assert (Tf:exists F, (BetS A D F /\ Cong D F A C)) by (conclude lemma_extension);destruct Tf as [F];spliter. (* Goal: @eq Ax0 C D *) assert (BetS F D A) by (conclude axiom_betweennesssymmetry). (* Goal: @eq Ax0 C D *) assert (BetS D B A) by (conclude axiom_betweennesssymmetry). (* Goal: @eq Ax0 C D *) assert (BetS F B A) by (conclude lemma_3_5b). (* Goal: @eq Ax0 C D *) assert (BetS A B F) by (conclude axiom_betweennesssymmetry). (* Goal: @eq Ax0 C D *) assert (Cong F D D F) by (conclude cn_equalityreverse). (* Goal: @eq Ax0 C D *) assert (Cong F D A C) by (conclude lemma_congruencetransitive). (* Goal: @eq Ax0 C D *) assert (Cong A D C E) by (conclude lemma_congruencesymmetric). (* Goal: @eq Ax0 C D *) assert (Cong D A A D) by (conclude cn_equalityreverse). (* Goal: @eq Ax0 C D *) assert (Cong D A C E) by (conclude lemma_congruencetransitive). (* Goal: @eq Ax0 C D *) assert (Cong F A A E) by (conclude cn_sumofparts). (* Goal: @eq Ax0 C D *) assert (Cong A E F A) by (conclude lemma_congruencesymmetric). (* Goal: @eq Ax0 C D *) assert (Cong F A A F) by (conclude cn_equalityreverse). (* Goal: @eq Ax0 C D *) assert (Cong A E A F) by (conclude lemma_congruencetransitive). (* Goal: @eq Ax0 C D *) assert (Cong A B A B) by (conclude cn_congruencereflexive). (* Goal: @eq Ax0 C D *) assert (Cong B E B F) by (conclude lemma_differenceofparts). (* Goal: @eq Ax0 C D *) assert (eq E F) by (conclude lemma_extensionunique). (* Goal: @eq Ax0 C D *) assert (BetS A D E) by (conclude cn_equalitysub). (* Goal: @eq Ax0 C D *) assert (BetS B C E) by (conclude lemma_3_6a). (* Goal: @eq Ax0 C D *) assert (BetS B D E) by (conclude lemma_3_6a). (* Goal: @eq Ax0 C D *) assert (eq C D) by (conclude axiom_connectivity). (* Goal: @eq Ax0 C D *) close. Qed. End Euclid.
Require Import abp_base. Require Import abp_defs. Require Import abp_lem1. Require Import abp_lem2. Theorem Lem10 : forall d : D, seq (ia frame c6 (tuple e1)) (X1 d) = enc H (mer (seq (ia frame s6 (tuple e1)) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))). Proof. (* Goal: forall d : D, @eq proc (seq (ia frame c6 (tuple e1)) (X1 d)) (enc H (mer (seq (ia frame s6 (tuple e1)) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))) *) intros. (* Goal: @eq proc (seq (ia frame c6 (tuple e1)) (X1 d)) (enc H (mer (seq (ia frame s6 (tuple e1)) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))) *) elim EXPH4. (* Goal: @eq proc (seq (ia frame c6 (tuple e1)) (X1 d)) (alt (enc H (Lmer (seq (ia frame s6 (tuple e1)) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))) (alt (enc H (Lmer (R i) (mer (seq (ia frame s6 (tuple e1)) (L i)) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))) (alt (enc H (Lmer (K i) (mer (seq (ia frame s6 (tuple e1)) (L i)) (mer (R i) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))) (alt (enc H (Lmer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (seq (ia frame s6 (tuple e1)) (L i)) (mer (R i) (K i))))) (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (seq (ia frame s6 (tuple e1)) (L i)) (R i)))) (alt (enc H (Lmer (comm (R i) (K i)) (mer (seq (ia frame s6 (tuple e1)) (L i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (R i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (seq (ia frame s6 (tuple e1)) (L i)) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 (tuple e1)) (L i)) (R i)) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (seq (ia frame s6 (tuple e1)) (L i)) (K i)) (mer (R i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (enc H (Lmer (comm (seq (ia frame s6 (tuple e1)) (L i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (R i) (K i))))))))))))) *) elim Lmers6. (* Goal: @eq proc (seq (ia frame c6 (tuple e1)) (X1 d)) (alt Delta (alt (enc H (Lmer (R i) (mer (seq (ia frame s6 (tuple e1)) (L i)) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))) (alt (enc H (Lmer (K i) (mer (seq (ia frame s6 (tuple e1)) (L i)) (mer (R i) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))) (alt (enc H (Lmer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (seq (ia frame s6 (tuple e1)) (L i)) (mer (R i) (K i))))) (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (seq (ia frame s6 (tuple e1)) (L i)) (R i)))) (alt (enc H (Lmer (comm (R i) (K i)) (mer (seq (ia frame s6 (tuple e1)) (L i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (R i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (seq (ia frame s6 (tuple e1)) (L i)) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 (tuple e1)) (L i)) (R i)) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (seq (ia frame s6 (tuple e1)) (L i)) (K i)) (mer (R i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (enc H (Lmer (comm (seq (ia frame s6 (tuple e1)) (L i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (R i) (K i))))))))))))) *) elim LmerK. (* Goal: @eq proc (seq (ia frame c6 (tuple e1)) (X1 d)) (alt Delta (alt (enc H (Lmer (R i) (mer (seq (ia frame s6 (tuple e1)) (L i)) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))) (alt Delta (alt (enc H (Lmer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (seq (ia frame s6 (tuple e1)) (L i)) (mer (R i) (K i))))) (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (seq (ia frame s6 (tuple e1)) (L i)) (R i)))) (alt (enc H (Lmer (comm (R i) (K i)) (mer (seq (ia frame s6 (tuple e1)) (L i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (R i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (seq (ia frame s6 (tuple e1)) (L i)) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 (tuple e1)) (L i)) (R i)) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (seq (ia frame s6 (tuple e1)) (L i)) (K i)) (mer (R i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (enc H (Lmer (comm (seq (ia frame s6 (tuple e1)) (L i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (R i) (K i))))))))))))) *) elim LmerTnd. (* Goal: @eq proc (seq (ia frame c6 (tuple e1)) (X1 d)) (alt Delta (alt (enc H (Lmer (R i) (mer (seq (ia frame s6 (tuple e1)) (L i)) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))) (alt Delta (alt Delta (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (seq (ia frame s6 (tuple e1)) (L i)) (R i)))) (alt (enc H (Lmer (comm (R i) (K i)) (mer (seq (ia frame s6 (tuple e1)) (L i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (R i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (seq (ia frame s6 (tuple e1)) (L i)) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 (tuple e1)) (L i)) (R i)) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (seq (ia frame s6 (tuple e1)) (L i)) (K i)) (mer (R i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (enc H (Lmer (comm (seq (ia frame s6 (tuple e1)) (L i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (R i) (K i))))))))))))) *) pattern (R i) at 1 3 4 5 in |- *. (* Goal: (fun p : proc => @eq proc (seq (ia frame c6 (tuple e1)) (X1 d)) (alt Delta (alt (enc H (Lmer p (mer (seq (ia frame s6 (tuple e1)) (L i)) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))) (alt Delta (alt Delta (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (seq (ia frame s6 (tuple e1)) (L i)) (R i)))) (alt (enc H (Lmer (comm p (K i)) (mer (seq (ia frame s6 (tuple e1)) (L i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm p (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (seq (ia frame s6 (tuple e1)) (L i)) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 (tuple e1)) (L i)) p) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (seq (ia frame s6 (tuple e1)) (L i)) (K i)) (mer (R i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (enc H (Lmer (comm (seq (ia frame s6 (tuple e1)) (L i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (R i) (K i)))))))))))))) (R i) *) elim ProcR. (* Goal: @eq proc (seq (ia frame c6 (tuple e1)) (X1 d)) (alt Delta (alt (enc H (Lmer (seq (Rn e1) (seq (Rn e0) (R i))) (mer (seq (ia frame s6 (tuple e1)) (L i)) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))) (alt Delta (alt Delta (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (seq (ia frame s6 (tuple e1)) (L i)) (R i)))) (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (K i)) (mer (seq (ia frame s6 (tuple e1)) (L i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (seq (ia frame s6 (tuple e1)) (L i)) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 (tuple e1)) (L i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (seq (ia frame s6 (tuple e1)) (L i)) (K i)) (mer (R i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (enc H (Lmer (comm (seq (ia frame s6 (tuple e1)) (L i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (R i) (K i))))))))))))) *) elim LmerRn. (* Goal: @eq proc (seq (ia frame c6 (tuple e1)) (X1 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (seq (ia frame s6 (tuple e1)) (L i)) (R i)))) (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (K i)) (mer (seq (ia frame s6 (tuple e1)) (L i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (seq (ia frame s6 (tuple e1)) (L i)) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 (tuple e1)) (L i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (seq (ia frame s6 (tuple e1)) (L i)) (K i)) (mer (R i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (enc H (Lmer (comm (seq (ia frame s6 (tuple e1)) (L i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (R i) (K i))))))))))))) *) elim CommTn_dK. (* Goal: @eq proc (seq (ia frame c6 (tuple e1)) (X1 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (K i)) (mer (seq (ia frame s6 (tuple e1)) (L i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (seq (ia frame s6 (tuple e1)) (L i)) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 (tuple e1)) (L i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (seq (ia frame s6 (tuple e1)) (L i)) (K i)) (mer (R i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (enc H (Lmer (comm (seq (ia frame s6 (tuple e1)) (L i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (R i) (K i))))))))))))) *) elim (SC3 (seq (Rn e1) (seq (Rn e0) (R i))) (K i)). (* Goal: @eq proc (seq (ia frame c6 (tuple e1)) (X1 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (K i) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia frame s6 (tuple e1)) (L i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (seq (ia frame s6 (tuple e1)) (L i)) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 (tuple e1)) (L i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (seq (ia frame s6 (tuple e1)) (L i)) (K i)) (mer (R i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (enc H (Lmer (comm (seq (ia frame s6 (tuple e1)) (L i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (R i) (K i))))))))))))) *) elim CommKRn. (* Goal: @eq proc (seq (ia frame c6 (tuple e1)) (X1 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (seq (ia frame s6 (tuple e1)) (L i)) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 (tuple e1)) (L i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (seq (ia frame s6 (tuple e1)) (L i)) (K i)) (mer (R i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (enc H (Lmer (comm (seq (ia frame s6 (tuple e1)) (L i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (R i) (K i))))))))))))) *) elim (SC3 (seq (Rn e1) (seq (Rn e0) (R i))) (seq (Tn_d d e0) (seq (Sn e1) (S i)))). (* Goal: @eq proc (seq (ia frame c6 (tuple e1)) (X1 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia frame s6 (tuple e1)) (L i)) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 (tuple e1)) (L i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (seq (ia frame s6 (tuple e1)) (L i)) (K i)) (mer (R i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (enc H (Lmer (comm (seq (ia frame s6 (tuple e1)) (L i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (R i) (K i))))))))))))) *) elim CommTn_dRn. (* Goal: @eq proc (seq (ia frame c6 (tuple e1)) (X1 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (ia frame s6 (tuple e1)) (L i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (seq (ia frame s6 (tuple e1)) (L i)) (K i)) (mer (R i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (enc H (Lmer (comm (seq (ia frame s6 (tuple e1)) (L i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (R i) (K i))))))))))))) *) elim CommKs6. (* Goal: @eq proc (seq (ia frame c6 (tuple e1)) (X1 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (ia frame s6 (tuple e1)) (L i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt Delta (enc H (Lmer (comm (seq (ia frame s6 (tuple e1)) (L i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (R i) (K i))))))))))))) *) elim CommRns6. (* Goal: @eq proc (seq (ia frame c6 (tuple e1)) (X1 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (enc H (Lmer (comm (seq (ia frame s6 (tuple e1)) (L i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (R i) (K i))))))))))))) *) pattern e1 at 1 2 in |- *. (* Goal: (fun b : bit => @eq proc (seq (ia frame c6 (tuple b)) (X1 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (enc H (Lmer (comm (seq (ia frame s6 (tuple b)) (L i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (R i) (K i)))))))))))))) e1 *) elimtype (toggle e0 = e1). (* Goal: @eq bit (toggle e0) e1 *) (* Goal: @eq proc (seq (ia frame c6 (tuple (toggle e0))) (X1 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (enc H (Lmer (comm (seq (ia frame s6 (tuple (toggle e0))) (L i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (R i) (K i))))))))))))) *) elim CommTn_ds6_b. (* Goal: @eq bit (toggle e0) e1 *) (* Goal: @eq proc (seq (ia frame c6 (tuple (toggle e0))) (X1 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (seq (ia frame c6 (tuple (toggle e0))) (enc H (mer (L i) (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (mer (R i) (K i))))))))))))))) *) repeat elim A6. (* Goal: @eq bit (toggle e0) e1 *) (* Goal: @eq proc (seq (ia frame c6 (tuple (toggle e0))) (X1 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (seq (ia frame c6 (tuple (toggle e0))) (enc H (mer (L i) (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (mer (R i) (K i))))))))))))))) *) repeat elim A6'. (* Goal: @eq bit (toggle e0) e1 *) (* Goal: @eq proc (seq (ia frame c6 (tuple (toggle e0))) (X1 d)) (seq (ia frame c6 (tuple (toggle e0))) (enc H (mer (L i) (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (mer (R i) (K i)))))) *) unfold X1 in |- *. (* Goal: @eq bit (toggle e0) e1 *) (* Goal: @eq proc (seq (ia frame c6 (tuple (toggle e0))) (enc H (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (mer (K i) (mer (L i) (R i)))))) (seq (ia frame c6 (tuple (toggle e0))) (enc H (mer (L i) (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (mer (R i) (K i)))))) *) elim (SC6 (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (mer (R i) (K i))) (L i)). (* Goal: @eq bit (toggle e0) e1 *) (* Goal: @eq proc (seq (ia frame c6 (tuple (toggle e0))) (enc H (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (mer (K i) (mer (L i) (R i)))))) (seq (ia frame c6 (tuple (toggle e0))) (enc H (mer (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (mer (R i) (K i))) (L i)))) *) elim SC7. (* Goal: @eq bit (toggle e0) e1 *) (* Goal: @eq proc (seq (ia frame c6 (tuple (toggle e0))) (enc H (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (mer (K i) (mer (L i) (R i)))))) (seq (ia frame c6 (tuple (toggle e0))) (enc H (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (mer (mer (R i) (K i)) (L i))))) *) elim SC7. (* Goal: @eq bit (toggle e0) e1 *) (* Goal: @eq proc (seq (ia frame c6 (tuple (toggle e0))) (enc H (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (mer (K i) (mer (L i) (R i)))))) (seq (ia frame c6 (tuple (toggle e0))) (enc H (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (mer (R i) (mer (K i) (L i)))))) *) elim (SC6 (mer (K i) (L i)) (R i)). (* Goal: @eq bit (toggle e0) e1 *) (* Goal: @eq proc (seq (ia frame c6 (tuple (toggle e0))) (enc H (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (mer (K i) (mer (L i) (R i)))))) (seq (ia frame c6 (tuple (toggle e0))) (enc H (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (mer (mer (K i) (L i)) (R i))))) *) elim SC7. (* Goal: @eq bit (toggle e0) e1 *) (* Goal: @eq proc (seq (ia frame c6 (tuple (toggle e0))) (enc H (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (mer (K i) (mer (L i) (R i)))))) (seq (ia frame c6 (tuple (toggle e0))) (enc H (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (mer (K i) (mer (L i) (R i)))))) *) apply refl_equal. (* Goal: @eq bit (toggle e0) e1 *) elim Toggle1. (* Goal: @eq bit e1 e1 *) apply refl_equal. Qed. Theorem Lem11 : forall d : D, seq (ia frame c6 sce) (X1 d) = enc H (mer (seq (ia frame s6 sce) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))). Proof. (* Goal: forall d : D, @eq proc (seq (ia frame c6 sce) (X1 d)) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))) *) intros. (* Goal: @eq proc (seq (ia frame c6 sce) (X1 d)) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))) *) elim EXPH4. (* Goal: @eq proc (seq (ia frame c6 sce) (X1 d)) (alt (enc H (Lmer (seq (ia frame s6 sce) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))) (alt (enc H (Lmer (R i) (mer (seq (ia frame s6 sce) (L i)) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))) (alt (enc H (Lmer (K i) (mer (seq (ia frame s6 sce) (L i)) (mer (R i) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))) (alt (enc H (Lmer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (seq (ia frame s6 sce) (L i)) (mer (R i) (K i))))) (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (seq (ia frame s6 sce) (L i)) (R i)))) (alt (enc H (Lmer (comm (R i) (K i)) (mer (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (R i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (seq (ia frame s6 sce) (L i)) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (R i)) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (K i)) (mer (R i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (R i) (K i))))))))))))) *) elim Lmers6. (* Goal: @eq proc (seq (ia frame c6 sce) (X1 d)) (alt Delta (alt (enc H (Lmer (R i) (mer (seq (ia frame s6 sce) (L i)) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))) (alt (enc H (Lmer (K i) (mer (seq (ia frame s6 sce) (L i)) (mer (R i) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))) (alt (enc H (Lmer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (seq (ia frame s6 sce) (L i)) (mer (R i) (K i))))) (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (seq (ia frame s6 sce) (L i)) (R i)))) (alt (enc H (Lmer (comm (R i) (K i)) (mer (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (R i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (seq (ia frame s6 sce) (L i)) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (R i)) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (K i)) (mer (R i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (R i) (K i))))))))))))) *) elim LmerK. (* Goal: @eq proc (seq (ia frame c6 sce) (X1 d)) (alt Delta (alt (enc H (Lmer (R i) (mer (seq (ia frame s6 sce) (L i)) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))) (alt Delta (alt (enc H (Lmer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (seq (ia frame s6 sce) (L i)) (mer (R i) (K i))))) (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (seq (ia frame s6 sce) (L i)) (R i)))) (alt (enc H (Lmer (comm (R i) (K i)) (mer (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (R i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (seq (ia frame s6 sce) (L i)) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (R i)) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (K i)) (mer (R i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (R i) (K i))))))))))))) *) elim LmerTnd. (* Goal: @eq proc (seq (ia frame c6 sce) (X1 d)) (alt Delta (alt (enc H (Lmer (R i) (mer (seq (ia frame s6 sce) (L i)) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))) (alt Delta (alt Delta (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (seq (ia frame s6 sce) (L i)) (R i)))) (alt (enc H (Lmer (comm (R i) (K i)) (mer (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (R i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (seq (ia frame s6 sce) (L i)) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (R i)) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (K i)) (mer (R i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (R i) (K i))))))))))))) *) pattern (R i) at 1 3 4 5 in |- *. (* Goal: (fun p : proc => @eq proc (seq (ia frame c6 sce) (X1 d)) (alt Delta (alt (enc H (Lmer p (mer (seq (ia frame s6 sce) (L i)) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))) (alt Delta (alt Delta (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (seq (ia frame s6 sce) (L i)) (R i)))) (alt (enc H (Lmer (comm p (K i)) (mer (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm p (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (seq (ia frame s6 sce) (L i)) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) p) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (K i)) (mer (R i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (R i) (K i)))))))))))))) (R i) *) elim ProcR. (* Goal: @eq proc (seq (ia frame c6 sce) (X1 d)) (alt Delta (alt (enc H (Lmer (seq (Rn e1) (seq (Rn e0) (R i))) (mer (seq (ia frame s6 sce) (L i)) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i))))))) (alt Delta (alt Delta (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (seq (ia frame s6 sce) (L i)) (R i)))) (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (K i)) (mer (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (seq (ia frame s6 sce) (L i)) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (K i)) (mer (R i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (R i) (K i))))))))))))) *) elim LmerRn. (* Goal: @eq proc (seq (ia frame c6 sce) (X1 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (seq (ia frame s6 sce) (L i)) (R i)))) (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (K i)) (mer (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (seq (ia frame s6 sce) (L i)) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (K i)) (mer (R i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (R i) (K i))))))))))))) *) elim CommTn_dK. (* Goal: @eq proc (seq (ia frame c6 sce) (X1 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (K i)) (mer (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (seq (ia frame s6 sce) (L i)) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (K i)) (mer (R i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (R i) (K i))))))))))))) *) elim (SC3 (seq (Rn e1) (seq (Rn e0) (R i))) (K i)). (* Goal: @eq proc (seq (ia frame c6 sce) (X1 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (K i) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (seq (ia frame s6 sce) (L i)) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (K i)) (mer (R i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (R i) (K i))))))))))))) *) elim CommKRn. (* Goal: @eq proc (seq (ia frame c6 sce) (X1 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Rn e1) (seq (Rn e0) (R i))) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (seq (ia frame s6 sce) (L i)) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (K i)) (mer (R i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (R i) (K i))))))))))))) *) elim (SC3 (seq (Rn e1) (seq (Rn e0) (R i))) (seq (Tn_d d e0) (seq (Sn e1) (S i)))). (* Goal: @eq proc (seq (ia frame c6 sce) (X1 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Tn_d d e0) (seq (Sn e1) (S i))) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (ia frame s6 sce) (L i)) (K i)))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (K i)) (mer (R i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (R i) (K i))))))))))))) *) elim CommTn_dRn. (* Goal: @eq proc (seq (ia frame c6 sce) (X1 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (K i)) (mer (R i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (R i) (K i))))))))))))) *) elim CommKs6. (* Goal: @eq proc (seq (ia frame c6 sce) (X1 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))) (alt Delta (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (R i) (K i))))))))))))) *) elim CommRns6. (* Goal: @eq proc (seq (ia frame c6 sce) (X1 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (enc H (Lmer (comm (seq (ia frame s6 sce) (L i)) (seq (Tn_d d e0) (seq (Sn e1) (S i)))) (mer (R i) (K i))))))))))))) *) elim CommTn_ds6_sce. (* Goal: @eq proc (seq (ia frame c6 sce) (X1 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (seq (ia frame c6 sce) (enc H (mer (L i) (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (mer (R i) (K i))))))))))))))) *) repeat elim A6. (* Goal: @eq proc (seq (ia frame c6 sce) (X1 d)) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (seq (ia frame c6 sce) (enc H (mer (L i) (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (mer (R i) (K i))))))))))))))) *) repeat elim A6'. (* Goal: @eq proc (seq (ia frame c6 sce) (X1 d)) (seq (ia frame c6 sce) (enc H (mer (L i) (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (mer (R i) (K i)))))) *) unfold X1 in |- *. (* Goal: @eq proc (seq (ia frame c6 sce) (enc H (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (mer (K i) (mer (L i) (R i)))))) (seq (ia frame c6 sce) (enc H (mer (L i) (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (mer (R i) (K i)))))) *) elim (SC6 (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (mer (R i) (K i))) (L i)). (* Goal: @eq proc (seq (ia frame c6 sce) (enc H (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (mer (K i) (mer (L i) (R i)))))) (seq (ia frame c6 sce) (enc H (mer (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (mer (R i) (K i))) (L i)))) *) elim SC7. (* Goal: @eq proc (seq (ia frame c6 sce) (enc H (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (mer (K i) (mer (L i) (R i)))))) (seq (ia frame c6 sce) (enc H (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (mer (mer (R i) (K i)) (L i))))) *) elim SC7. (* Goal: @eq proc (seq (ia frame c6 sce) (enc H (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (mer (K i) (mer (L i) (R i)))))) (seq (ia frame c6 sce) (enc H (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (mer (R i) (mer (K i) (L i)))))) *) elimtype (mer (K i) (mer (L i) (R i)) = mer (R i) (mer (K i) (L i))). (* Goal: @eq proc (mer (K i) (mer (L i) (R i))) (mer (R i) (mer (K i) (L i))) *) (* Goal: @eq proc (seq (ia frame c6 sce) (enc H (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (mer (K i) (mer (L i) (R i)))))) (seq (ia frame c6 sce) (enc H (mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (mer (K i) (mer (L i) (R i)))))) *) apply refl_equal. (* Goal: @eq proc (mer (K i) (mer (L i) (R i))) (mer (R i) (mer (K i) (L i))) *) elim (SC6 (mer (K i) (L i)) (R i)). (* Goal: @eq proc (mer (K i) (mer (L i) (R i))) (mer (mer (K i) (L i)) (R i)) *) elim SC7. (* Goal: @eq proc (mer (K i) (mer (L i) (R i))) (mer (K i) (mer (L i) (R i))) *) apply refl_equal. Qed. Theorem Lem12 : forall d : D, seq (ia Frame c2 (Tuple e0 d)) (alt (seq (ia one int i) (seq (ia Frame c3 (Tuple e0 d)) (seq (ia D s4 d) (X2 d)))) (seq (ia one int i) (seq (ia Frame c3 lce) (seq (ia frame c5 (tuple e1)) (seq (alt (seq (ia one int i) (ia frame c6 (tuple e1))) (seq (ia one int i) (ia frame c6 sce))) (X1 d)))))) = X1 d. Proof. (* Goal: forall d : D, @eq proc (seq (ia Frame c2 (Tuple e0 d)) (alt (seq (ia one int i) (seq (ia Frame c3 (Tuple e0 d)) (seq (ia D s4 d) (X2 d)))) (seq (ia one int i) (seq (ia Frame c3 lce) (seq (ia frame c5 (tuple e1)) (seq (alt (seq (ia one int i) (ia frame c6 (tuple e1))) (seq (ia one int i) (ia frame c6 sce))) (X1 d))))))) (X1 d) *) intros. (* Goal: @eq proc (seq (ia Frame c2 (Tuple e0 d)) (alt (seq (ia one int i) (seq (ia Frame c3 (Tuple e0 d)) (seq (ia D s4 d) (X2 d)))) (seq (ia one int i) (seq (ia Frame c3 lce) (seq (ia frame c5 (tuple e1)) (seq (alt (seq (ia one int i) (ia frame c6 (tuple e1))) (seq (ia one int i) (ia frame c6 sce))) (X1 d))))))) (X1 d) *) pattern (X1 d) at 2 in |- *. (* Goal: (fun p : proc => @eq proc (seq (ia Frame c2 (Tuple e0 d)) (alt (seq (ia one int i) (seq (ia Frame c3 (Tuple e0 d)) (seq (ia D s4 d) (X2 d)))) (seq (ia one int i) (seq (ia Frame c3 lce) (seq (ia frame c5 (tuple e1)) (seq (alt (seq (ia one int i) (ia frame c6 (tuple e1))) (seq (ia one int i) (ia frame c6 sce))) (X1 d))))))) p) (X1 d) *) elim Lem3. (* Goal: @eq proc (seq (ia Frame c2 (Tuple e0 d)) (alt (seq (ia one int i) (seq (ia Frame c3 (Tuple e0 d)) (seq (ia D s4 d) (X2 d)))) (seq (ia one int i) (seq (ia Frame c3 lce) (seq (ia frame c5 (tuple e1)) (seq (alt (seq (ia one int i) (ia frame c6 (tuple e1))) (seq (ia one int i) (ia frame c6 sce))) (X1 d))))))) (seq (ia Frame c2 (Tuple e0 d)) (enc H (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e0 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (mer (L i) (R i)))))) *) elim Lem4. (* Goal: @eq proc (seq (ia Frame c2 (Tuple e0 d)) (alt (seq (ia one int i) (seq (ia Frame c3 (Tuple e0 d)) (seq (ia D s4 d) (X2 d)))) (seq (ia one int i) (seq (ia Frame c3 lce) (seq (ia frame c5 (tuple e1)) (seq (alt (seq (ia one int i) (ia frame c6 (tuple e1))) (seq (ia one int i) (ia frame c6 sce))) (X1 d))))))) (seq (ia Frame c2 (Tuple e0 d)) (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i)))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i)))))))) *) elim Lem5. (* Goal: @eq proc (seq (ia Frame c2 (Tuple e0 d)) (alt (seq (ia one int i) (seq (ia Frame c3 (Tuple e0 d)) (seq (ia D s4 d) (X2 d)))) (seq (ia one int i) (seq (ia Frame c3 lce) (seq (ia frame c5 (tuple e1)) (seq (alt (seq (ia one int i) (ia frame c6 (tuple e1))) (seq (ia one int i) (ia frame c6 sce))) (X1 d))))))) (seq (ia Frame c2 (Tuple e0 d)) (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e0 d)) (K i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (mer (L i) (R i)))))) (seq (ia one int i) (seq (ia Frame c3 lce) (enc H (mer (K i) (mer (seq (ia frame s5 (tuple e1)) (R i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i))))))))) *) elim Lem6. (* Goal: @eq proc (seq (ia Frame c2 (Tuple e0 d)) (alt (seq (ia one int i) (seq (ia Frame c3 (Tuple e0 d)) (seq (ia D s4 d) (X2 d)))) (seq (ia one int i) (seq (ia Frame c3 lce) (seq (ia frame c5 (tuple e1)) (seq (alt (seq (ia one int i) (ia frame c6 (tuple e1))) (seq (ia one int i) (ia frame c6 sce))) (X1 d))))))) (seq (ia Frame c2 (Tuple e0 d)) (alt (seq (ia one int i) (seq (ia Frame c3 (Tuple e0 d)) (enc H (mer (K i) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i))))))) (seq (ia one int i) (seq (ia Frame c3 lce) (enc H (mer (K i) (mer (seq (ia frame s5 (tuple e1)) (R i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i))))))))) *) elim Lem7. (* Goal: @eq proc (seq (ia Frame c2 (Tuple e0 d)) (alt (seq (ia one int i) (seq (ia Frame c3 (Tuple e0 d)) (seq (ia D s4 d) (X2 d)))) (seq (ia one int i) (seq (ia Frame c3 lce) (seq (ia frame c5 (tuple e1)) (seq (alt (seq (ia one int i) (ia frame c6 (tuple e1))) (seq (ia one int i) (ia frame c6 sce))) (X1 d))))))) (seq (ia Frame c2 (Tuple e0 d)) (alt (seq (ia one int i) (seq (ia Frame c3 (Tuple e0 d)) (seq (ia D s4 d) (X2 d)))) (seq (ia one int i) (seq (ia Frame c3 lce) (enc H (mer (K i) (mer (seq (ia frame s5 (tuple e1)) (R i)) (mer (seq (Tn_d d e0) (seq (Sn e1) (S i))) (L i))))))))) *) elim Lem8. (* Goal: @eq proc (seq (ia Frame c2 (Tuple e0 d)) (alt (seq (ia one int i) (seq (ia Frame c3 (Tuple e0 d)) (seq (ia D s4 d) (X2 d)))) (seq (ia one int i) (seq (ia Frame c3 lce) (seq (ia frame c5 (tuple e1)) (seq (alt (seq (ia one int i) (ia frame c6 (tuple e1))) (seq (ia one int i) (ia frame c6 sce))) (X1 d))))))) (seq (ia Frame c2 (Tuple e0 d)) (alt (seq (ia one int i) (seq (ia Frame c3 (Tuple e0 d)) (seq (ia D s4 d) (X2 d)))) (seq (ia one int i) (seq (ia Frame c3 lce) (seq (ia frame c5 (tuple e1)) (enc H (mer (R i) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e1)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))))))))) *) elim Lem9. (* Goal: @eq proc (seq (ia Frame c2 (Tuple e0 d)) (alt (seq (ia one int i) (seq (ia Frame c3 (Tuple e0 d)) (seq (ia D s4 d) (X2 d)))) (seq (ia one int i) (seq (ia Frame c3 lce) (seq (ia frame c5 (tuple e1)) (seq (alt (seq (ia one int i) (ia frame c6 (tuple e1))) (seq (ia one int i) (ia frame c6 sce))) (X1 d))))))) (seq (ia Frame c2 (Tuple e0 d)) (alt (seq (ia one int i) (seq (ia Frame c3 (Tuple e0 d)) (seq (ia D s4 d) (X2 d)))) (seq (ia one int i) (seq (ia Frame c3 lce) (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e1)) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))))))))))) *) elim Lem10. (* Goal: @eq proc (seq (ia Frame c2 (Tuple e0 d)) (alt (seq (ia one int i) (seq (ia Frame c3 (Tuple e0 d)) (seq (ia D s4 d) (X2 d)))) (seq (ia one int i) (seq (ia Frame c3 lce) (seq (ia frame c5 (tuple e1)) (seq (alt (seq (ia one int i) (ia frame c6 (tuple e1))) (seq (ia one int i) (ia frame c6 sce))) (X1 d))))))) (seq (ia Frame c2 (Tuple e0 d)) (alt (seq (ia one int i) (seq (ia Frame c3 (Tuple e0 d)) (seq (ia D s4 d) (X2 d)))) (seq (ia one int i) (seq (ia Frame c3 lce) (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 (tuple e1)) (X1 d))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (R i) (mer (K i) (seq (Tn_d d e0) (seq (Sn e1) (S i)))))))))))))) *) elim Lem11. (* Goal: @eq proc (seq (ia Frame c2 (Tuple e0 d)) (alt (seq (ia one int i) (seq (ia Frame c3 (Tuple e0 d)) (seq (ia D s4 d) (X2 d)))) (seq (ia one int i) (seq (ia Frame c3 lce) (seq (ia frame c5 (tuple e1)) (seq (alt (seq (ia one int i) (ia frame c6 (tuple e1))) (seq (ia one int i) (ia frame c6 sce))) (X1 d))))))) (seq (ia Frame c2 (Tuple e0 d)) (alt (seq (ia one int i) (seq (ia Frame c3 (Tuple e0 d)) (seq (ia D s4 d) (X2 d)))) (seq (ia one int i) (seq (ia Frame c3 lce) (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 (tuple e1)) (X1 d))) (seq (ia one int i) (seq (ia frame c6 sce) (X1 d))))))))) *) elim A4. (* Goal: @eq proc (seq (ia Frame c2 (Tuple e0 d)) (alt (seq (ia one int i) (seq (ia Frame c3 (Tuple e0 d)) (seq (ia D s4 d) (X2 d)))) (seq (ia one int i) (seq (ia Frame c3 lce) (seq (ia frame c5 (tuple e1)) (alt (seq (seq (ia one int i) (ia frame c6 (tuple e1))) (X1 d)) (seq (seq (ia one int i) (ia frame c6 sce)) (X1 d)))))))) (seq (ia Frame c2 (Tuple e0 d)) (alt (seq (ia one int i) (seq (ia Frame c3 (Tuple e0 d)) (seq (ia D s4 d) (X2 d)))) (seq (ia one int i) (seq (ia Frame c3 lce) (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 (tuple e1)) (X1 d))) (seq (ia one int i) (seq (ia frame c6 sce) (X1 d))))))))) *) elim A5. (* Goal: @eq proc (seq (ia Frame c2 (Tuple e0 d)) (alt (seq (ia one int i) (seq (ia Frame c3 (Tuple e0 d)) (seq (ia D s4 d) (X2 d)))) (seq (ia one int i) (seq (ia Frame c3 lce) (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 (tuple e1)) (X1 d))) (seq (seq (ia one int i) (ia frame c6 sce)) (X1 d)))))))) (seq (ia Frame c2 (Tuple e0 d)) (alt (seq (ia one int i) (seq (ia Frame c3 (Tuple e0 d)) (seq (ia D s4 d) (X2 d)))) (seq (ia one int i) (seq (ia Frame c3 lce) (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 (tuple e1)) (X1 d))) (seq (ia one int i) (seq (ia frame c6 sce) (X1 d))))))))) *) elim A5. (* Goal: @eq proc (seq (ia Frame c2 (Tuple e0 d)) (alt (seq (ia one int i) (seq (ia Frame c3 (Tuple e0 d)) (seq (ia D s4 d) (X2 d)))) (seq (ia one int i) (seq (ia Frame c3 lce) (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 (tuple e1)) (X1 d))) (seq (ia one int i) (seq (ia frame c6 sce) (X1 d))))))))) (seq (ia Frame c2 (Tuple e0 d)) (alt (seq (ia one int i) (seq (ia Frame c3 (Tuple e0 d)) (seq (ia D s4 d) (X2 d)))) (seq (ia one int i) (seq (ia Frame c3 lce) (seq (ia frame c5 (tuple e1)) (alt (seq (ia one int i) (seq (ia frame c6 (tuple e1)) (X1 d))) (seq (ia one int i) (seq (ia frame c6 sce) (X1 d))))))))) *) apply refl_equal. Qed. Theorem Lem13 : forall d : D, seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e1 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (mer (L i) (seq (Rn e0) (R i)))))) = Y1 d. Proof. (* Goal: forall d : D, @eq proc (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e1 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (mer (L i) (seq (Rn e0) (R i))))))) (Y1 d) *) intro. (* Goal: @eq proc (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e1 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (mer (L i) (seq (Rn e0) (R i))))))) (Y1 d) *) unfold Y1 at 1 in |- *. (* Goal: @eq proc (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e1 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (mer (L i) (seq (Rn e0) (R i))))))) (enc H (mer (seq (Sn_d d e1) (S i)) (mer (K i) (mer (L i) (seq (Rn e0) (R i)))))) *) elim (EXPH4 (seq (Sn_d d e1) (S i))). (* Goal: @eq proc (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e1 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (mer (L i) (seq (Rn e0) (R i))))))) (alt (enc H (Lmer (seq (Sn_d d e1) (S i)) (mer (K i) (mer (L i) (seq (Rn e0) (R i)))))) (alt (enc H (Lmer (K i) (mer (seq (Sn_d d e1) (S i)) (mer (L i) (seq (Rn e0) (R i)))))) (alt (enc H (Lmer (L i) (mer (seq (Sn_d d e1) (S i)) (mer (K i) (seq (Rn e0) (R i)))))) (alt (enc H (Lmer (seq (Rn e0) (R i)) (mer (seq (Sn_d d e1) (S i)) (mer (K i) (L i))))) (alt (enc H (Lmer (comm (L i) (seq (Rn e0) (R i))) (mer (seq (Sn_d d e1) (S i)) (K i)))) (alt (enc H (Lmer (comm (K i) (L i)) (mer (seq (Sn_d d e1) (S i)) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (K i) (seq (Rn e0) (R i))) (mer (seq (Sn_d d e1) (S i)) (L i)))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (K i)) (mer (L i) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (L i)) (mer (K i) (seq (Rn e0) (R i))))) (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (seq (Rn e0) (R i))) (mer (K i) (L i))))))))))))) *) elim LmerSnd. (* Goal: @eq proc (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e1 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (mer (L i) (seq (Rn e0) (R i))))))) (alt Delta (alt (enc H (Lmer (K i) (mer (seq (Sn_d d e1) (S i)) (mer (L i) (seq (Rn e0) (R i)))))) (alt (enc H (Lmer (L i) (mer (seq (Sn_d d e1) (S i)) (mer (K i) (seq (Rn e0) (R i)))))) (alt (enc H (Lmer (seq (Rn e0) (R i)) (mer (seq (Sn_d d e1) (S i)) (mer (K i) (L i))))) (alt (enc H (Lmer (comm (L i) (seq (Rn e0) (R i))) (mer (seq (Sn_d d e1) (S i)) (K i)))) (alt (enc H (Lmer (comm (K i) (L i)) (mer (seq (Sn_d d e1) (S i)) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (K i) (seq (Rn e0) (R i))) (mer (seq (Sn_d d e1) (S i)) (L i)))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (K i)) (mer (L i) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (L i)) (mer (K i) (seq (Rn e0) (R i))))) (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (seq (Rn e0) (R i))) (mer (K i) (L i))))))))))))) *) elim LmerK. (* Goal: @eq proc (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e1 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (mer (L i) (seq (Rn e0) (R i))))))) (alt Delta (alt Delta (alt (enc H (Lmer (L i) (mer (seq (Sn_d d e1) (S i)) (mer (K i) (seq (Rn e0) (R i)))))) (alt (enc H (Lmer (seq (Rn e0) (R i)) (mer (seq (Sn_d d e1) (S i)) (mer (K i) (L i))))) (alt (enc H (Lmer (comm (L i) (seq (Rn e0) (R i))) (mer (seq (Sn_d d e1) (S i)) (K i)))) (alt (enc H (Lmer (comm (K i) (L i)) (mer (seq (Sn_d d e1) (S i)) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (K i) (seq (Rn e0) (R i))) (mer (seq (Sn_d d e1) (S i)) (L i)))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (K i)) (mer (L i) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (L i)) (mer (K i) (seq (Rn e0) (R i))))) (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (seq (Rn e0) (R i))) (mer (K i) (L i))))))))))))) *) elim LmerL. (* Goal: @eq proc (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e1 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (mer (L i) (seq (Rn e0) (R i))))))) (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (seq (Rn e0) (R i)) (mer (seq (Sn_d d e1) (S i)) (mer (K i) (L i))))) (alt (enc H (Lmer (comm (L i) (seq (Rn e0) (R i))) (mer (seq (Sn_d d e1) (S i)) (K i)))) (alt (enc H (Lmer (comm (K i) (L i)) (mer (seq (Sn_d d e1) (S i)) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (K i) (seq (Rn e0) (R i))) (mer (seq (Sn_d d e1) (S i)) (L i)))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (K i)) (mer (L i) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (L i)) (mer (K i) (seq (Rn e0) (R i))))) (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (seq (Rn e0) (R i))) (mer (K i) (L i))))))))))))) *) pattern (R i) at 2 3 5 8 in |- *. (* Goal: (fun p : proc => @eq proc (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e1 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (mer (L i) (seq (Rn e0) (R i))))))) (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (seq (Rn e0) p) (mer (seq (Sn_d d e1) (S i)) (mer (K i) (L i))))) (alt (enc H (Lmer (comm (L i) (seq (Rn e0) p)) (mer (seq (Sn_d d e1) (S i)) (K i)))) (alt (enc H (Lmer (comm (K i) (L i)) (mer (seq (Sn_d d e1) (S i)) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (K i) (seq (Rn e0) p)) (mer (seq (Sn_d d e1) (S i)) (L i)))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (K i)) (mer (L i) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (L i)) (mer (K i) (seq (Rn e0) (R i))))) (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (seq (Rn e0) p)) (mer (K i) (L i)))))))))))))) (R i) *) elim ProcR. (* Goal: @eq proc (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e1 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (mer (L i) (seq (Rn e0) (R i))))))) (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (seq (Rn e0) (seq (Rn e1) (seq (Rn e0) (R i)))) (mer (seq (Sn_d d e1) (S i)) (mer (K i) (L i))))) (alt (enc H (Lmer (comm (L i) (seq (Rn e0) (seq (Rn e1) (seq (Rn e0) (R i))))) (mer (seq (Sn_d d e1) (S i)) (K i)))) (alt (enc H (Lmer (comm (K i) (L i)) (mer (seq (Sn_d d e1) (S i)) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (K i) (seq (Rn e0) (seq (Rn e1) (seq (Rn e0) (R i))))) (mer (seq (Sn_d d e1) (S i)) (L i)))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (K i)) (mer (L i) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (L i)) (mer (K i) (seq (Rn e0) (R i))))) (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (seq (Rn e0) (seq (Rn e1) (seq (Rn e0) (R i))))) (mer (K i) (L i))))))))))))) *) elim LmerRn. (* Goal: @eq proc (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e1 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (mer (L i) (seq (Rn e0) (R i))))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (L i) (seq (Rn e0) (seq (Rn e1) (seq (Rn e0) (R i))))) (mer (seq (Sn_d d e1) (S i)) (K i)))) (alt (enc H (Lmer (comm (K i) (L i)) (mer (seq (Sn_d d e1) (S i)) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (K i) (seq (Rn e0) (seq (Rn e1) (seq (Rn e0) (R i))))) (mer (seq (Sn_d d e1) (S i)) (L i)))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (K i)) (mer (L i) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (L i)) (mer (K i) (seq (Rn e0) (R i))))) (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (seq (Rn e0) (seq (Rn e1) (seq (Rn e0) (R i))))) (mer (K i) (L i))))))))))))) *) elim CommLRn. (* Goal: @eq proc (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e1 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (mer (L i) (seq (Rn e0) (R i))))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (K i) (L i)) (mer (seq (Sn_d d e1) (S i)) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (K i) (seq (Rn e0) (seq (Rn e1) (seq (Rn e0) (R i))))) (mer (seq (Sn_d d e1) (S i)) (L i)))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (K i)) (mer (L i) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (L i)) (mer (K i) (seq (Rn e0) (R i))))) (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (seq (Rn e0) (seq (Rn e1) (seq (Rn e0) (R i))))) (mer (K i) (L i))))))))))))) *) elim CommKL. (* Goal: @eq proc (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e1 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (mer (L i) (seq (Rn e0) (R i))))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (K i) (seq (Rn e0) (seq (Rn e1) (seq (Rn e0) (R i))))) (mer (seq (Sn_d d e1) (S i)) (L i)))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (K i)) (mer (L i) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (L i)) (mer (K i) (seq (Rn e0) (R i))))) (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (seq (Rn e0) (seq (Rn e1) (seq (Rn e0) (R i))))) (mer (K i) (L i))))))))))))) *) elim CommKRn. (* Goal: @eq proc (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e1 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (mer (L i) (seq (Rn e0) (R i))))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (K i)) (mer (L i) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (L i)) (mer (K i) (seq (Rn e0) (R i))))) (enc H (Lmer (comm (seq (Sn_d d e1) (S i)) (seq (Rn e0) (seq (Rn e1) (seq (Rn e0) (R i))))) (mer (K i) (L i))))))))))))) *) elim ProcSn_d. (* Goal: @eq proc (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e1 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (mer (L i) (seq (Rn e0) (R i))))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (seq (ia Frame s2 (Tuple e1 d)) (Tn_d d e1)) (S i)) (K i)) (mer (L i) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (seq (seq (ia Frame s2 (Tuple e1 d)) (Tn_d d e1)) (S i)) (L i)) (mer (K i) (seq (Rn e0) (R i))))) (enc H (Lmer (comm (seq (seq (ia Frame s2 (Tuple e1 d)) (Tn_d d e1)) (S i)) (seq (Rn e0) (seq (Rn e1) (seq (Rn e0) (R i))))) (mer (K i) (L i))))))))))))) *) elim A5. (* Goal: @eq proc (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e1 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (mer (L i) (seq (Rn e0) (R i))))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (ia Frame s2 (Tuple e1 d)) (seq (Tn_d d e1) (S i))) (K i)) (mer (L i) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (seq (ia Frame s2 (Tuple e1 d)) (seq (Tn_d d e1) (S i))) (L i)) (mer (K i) (seq (Rn e0) (R i))))) (enc H (Lmer (comm (seq (ia Frame s2 (Tuple e1 d)) (seq (Tn_d d e1) (S i))) (seq (Rn e0) (seq (Rn e1) (seq (Rn e0) (R i))))) (mer (K i) (L i))))))))))))) *) elim Comms2K. (* Goal: @eq proc (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e1 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (mer (L i) (seq (Rn e0) (R i))))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (mer (seq (Tn_d d e1) (S i)) (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e1 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i))) (mer (L i) (seq (Rn e0) (R i)))))) (alt (enc H (Lmer (comm (seq (ia Frame s2 (Tuple e1 d)) (seq (Tn_d d e1) (S i))) (L i)) (mer (K i) (seq (Rn e0) (R i))))) (enc H (Lmer (comm (seq (ia Frame s2 (Tuple e1 d)) (seq (Tn_d d e1) (S i))) (seq (Rn e0) (seq (Rn e1) (seq (Rn e0) (R i))))) (mer (K i) (L i))))))))))))) *) elim Comms2Rn. (* Goal: @eq proc (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e1 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (mer (L i) (seq (Rn e0) (R i))))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (mer (seq (Tn_d d e1) (S i)) (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e1 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i))) (mer (L i) (seq (Rn e0) (R i)))))) (alt (enc H (Lmer (comm (seq (ia Frame s2 (Tuple e1 d)) (seq (Tn_d d e1) (S i))) (L i)) (mer (K i) (seq (Rn e0) (R i))))) Delta))))))))) *) elim Comms2L. (* Goal: @eq proc (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e1 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (mer (L i) (seq (Rn e0) (R i))))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (mer (seq (Tn_d d e1) (S i)) (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e1 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i))) (mer (L i) (seq (Rn e0) (R i)))))) (alt Delta Delta))))))))) *) repeat elim A6. (* Goal: @eq proc (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e1 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (mer (L i) (seq (Rn e0) (R i))))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (mer (seq (Tn_d d e1) (S i)) (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e1 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i))) (mer (L i) (seq (Rn e0) (R i))))))))))))) *) repeat elim A6'. (* Goal: @eq proc (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e1 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (mer (L i) (seq (Rn e0) (R i))))))) (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (mer (seq (Tn_d d e1) (S i)) (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e1 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i))) (mer (L i) (seq (Rn e0) (R i)))))) *) elim SC7. (* Goal: @eq proc (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e1 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (mer (L i) (seq (Rn e0) (R i))))))) (seq (ia Frame c2 (Tuple e1 d)) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e1 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (mer (L i) (seq (Rn e0) (R i))))))) *) apply refl_equal. Qed. Theorem Lem14 : forall d : D, alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (seq (Rn e0) (R i))))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (seq (Rn e0) (R i))))))) = enc H (mer (seq (Tn_d d e1) (S i)) (mer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e1 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (mer (L i) (seq (Rn e0) (R i))))). Proof. (* Goal: forall d : D, @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (seq (Rn e0) (R i))))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (seq (Rn e0) (R i)))))))) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e1 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (mer (L i) (seq (Rn e0) (R i)))))) *) intros. (* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (seq (Rn e0) (R i))))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (seq (Rn e0) (R i)))))))) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e1 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (mer (L i) (seq (Rn e0) (R i)))))) *) elim (EXPH4 (seq (Tn_d d e1) (S i))). (* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (seq (Rn e0) (R i))))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (seq (Rn e0) (R i)))))))) (alt (enc H (Lmer (seq (Tn_d d e1) (S i)) (mer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e1 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (mer (L i) (seq (Rn e0) (R i)))))) (alt (enc H (Lmer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e1 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (seq (Rn e0) (R i)))))) (alt (enc H (Lmer (L i) (mer (seq (Tn_d d e1) (S i)) (mer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e1 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (seq (Rn e0) (R i)))))) (alt (enc H (Lmer (seq (Rn e0) (R i)) (mer (seq (Tn_d d e1) (S i)) (mer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e1 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (L i))))) (alt (enc H (Lmer (comm (L i) (seq (Rn e0) (R i))) (mer (seq (Tn_d d e1) (S i)) (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e1 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i))))) (alt (enc H (Lmer (comm (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e1 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e1 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (seq (Rn e0) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e1 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i))) (mer (L i) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e1 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (seq (Rn e0) (R i))))) (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (Rn e0) (R i))) (mer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e1 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (L i))))))))))))) *) elim LmerTnd. (* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (seq (Rn e0) (R i))))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (seq (Rn e0) (R i)))))))) (alt Delta (alt (enc H (Lmer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e1 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (seq (Rn e0) (R i)))))) (alt (enc H (Lmer (L i) (mer (seq (Tn_d d e1) (S i)) (mer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e1 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (seq (Rn e0) (R i)))))) (alt (enc H (Lmer (seq (Rn e0) (R i)) (mer (seq (Tn_d d e1) (S i)) (mer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e1 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (L i))))) (alt (enc H (Lmer (comm (L i) (seq (Rn e0) (R i))) (mer (seq (Tn_d d e1) (S i)) (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e1 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i))))) (alt (enc H (Lmer (comm (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e1 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e1 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (seq (Rn e0) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e1 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i))) (mer (L i) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e1 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (seq (Rn e0) (R i))))) (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (Rn e0) (R i))) (mer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e1 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (L i))))))))))))) *) elim LmerL. (* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (seq (Rn e0) (R i))))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (seq (Rn e0) (R i)))))))) (alt Delta (alt (enc H (Lmer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e1 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (seq (Rn e0) (R i)))))) (alt Delta (alt (enc H (Lmer (seq (Rn e0) (R i)) (mer (seq (Tn_d d e1) (S i)) (mer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e1 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (L i))))) (alt (enc H (Lmer (comm (L i) (seq (Rn e0) (R i))) (mer (seq (Tn_d d e1) (S i)) (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e1 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i))))) (alt (enc H (Lmer (comm (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e1 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e1 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (seq (Rn e0) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e1 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i))) (mer (L i) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e1 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (seq (Rn e0) (R i))))) (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (Rn e0) (R i))) (mer (seq (alt (seq (ia one int i) (ia Frame s3 (Tuple e1 d))) (seq (ia one int i) (ia Frame s3 lce))) (K i)) (L i))))))))))))) *) elim A4. (* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (seq (Rn e0) (R i))))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (seq (Rn e0) (R i)))))))) (alt Delta (alt (enc H (Lmer (alt (seq (seq (ia one int i) (ia Frame s3 (Tuple e1 d))) (K i)) (seq (seq (ia one int i) (ia Frame s3 lce)) (K i))) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (seq (Rn e0) (R i)))))) (alt Delta (alt (enc H (Lmer (seq (Rn e0) (R i)) (mer (seq (Tn_d d e1) (S i)) (mer (alt (seq (seq (ia one int i) (ia Frame s3 (Tuple e1 d))) (K i)) (seq (seq (ia one int i) (ia Frame s3 lce)) (K i))) (L i))))) (alt (enc H (Lmer (comm (L i) (seq (Rn e0) (R i))) (mer (seq (Tn_d d e1) (S i)) (alt (seq (seq (ia one int i) (ia Frame s3 (Tuple e1 d))) (K i)) (seq (seq (ia one int i) (ia Frame s3 lce)) (K i)))))) (alt (enc H (Lmer (comm (alt (seq (seq (ia one int i) (ia Frame s3 (Tuple e1 d))) (K i)) (seq (seq (ia one int i) (ia Frame s3 lce)) (K i))) (L i)) (mer (seq (Tn_d d e1) (S i)) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (alt (seq (seq (ia one int i) (ia Frame s3 (Tuple e1 d))) (K i)) (seq (seq (ia one int i) (ia Frame s3 lce)) (K i))) (seq (Rn e0) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (alt (seq (seq (ia one int i) (ia Frame s3 (Tuple e1 d))) (K i)) (seq (seq (ia one int i) (ia Frame s3 lce)) (K i)))) (mer (L i) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (alt (seq (seq (ia one int i) (ia Frame s3 (Tuple e1 d))) (K i)) (seq (seq (ia one int i) (ia Frame s3 lce)) (K i))) (seq (Rn e0) (R i))))) (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (Rn e0) (R i))) (mer (alt (seq (seq (ia one int i) (ia Frame s3 (Tuple e1 d))) (K i)) (seq (seq (ia one int i) (ia Frame s3 lce)) (K i))) (L i))))))))))))) *) elim A5. (* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (seq (Rn e0) (R i))))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (seq (Rn e0) (R i)))))))) (alt Delta (alt (enc H (Lmer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (seq (ia one int i) (ia Frame s3 lce)) (K i))) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (seq (Rn e0) (R i)))))) (alt Delta (alt (enc H (Lmer (seq (Rn e0) (R i)) (mer (seq (Tn_d d e1) (S i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (seq (ia one int i) (ia Frame s3 lce)) (K i))) (L i))))) (alt (enc H (Lmer (comm (L i) (seq (Rn e0) (R i))) (mer (seq (Tn_d d e1) (S i)) (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (seq (ia one int i) (ia Frame s3 lce)) (K i)))))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (seq (ia one int i) (ia Frame s3 lce)) (K i))) (L i)) (mer (seq (Tn_d d e1) (S i)) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (seq (ia one int i) (ia Frame s3 lce)) (K i))) (seq (Rn e0) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (seq (ia one int i) (ia Frame s3 lce)) (K i)))) (mer (L i) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (seq (ia one int i) (ia Frame s3 lce)) (K i))) (seq (Rn e0) (R i))))) (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (Rn e0) (R i))) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (seq (ia one int i) (ia Frame s3 lce)) (K i))) (L i))))))))))))) *) elim A5. (* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (seq (Rn e0) (R i))))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (seq (Rn e0) (R i)))))))) (alt Delta (alt (enc H (Lmer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (seq (Rn e0) (R i)))))) (alt Delta (alt (enc H (Lmer (seq (Rn e0) (R i)) (mer (seq (Tn_d d e1) (S i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (L i))))) (alt (enc H (Lmer (comm (L i) (seq (Rn e0) (R i))) (mer (seq (Tn_d d e1) (S i)) (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i))))))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (L i)) (mer (seq (Tn_d d e1) (S i)) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (seq (Rn e0) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i))))) (mer (L i) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (seq (Rn e0) (R i))))) (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (Rn e0) (R i))) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (L i))))))))))))) *) elim Lmeri. (* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (seq (Rn e0) (R i))))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (seq (Rn e0) (R i)))))))) (alt Delta (alt (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (seq (Rn e0) (R i))))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (seq (Rn e0) (R i)))))))) (alt Delta (alt (enc H (Lmer (seq (Rn e0) (R i)) (mer (seq (Tn_d d e1) (S i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (L i))))) (alt (enc H (Lmer (comm (L i) (seq (Rn e0) (R i))) (mer (seq (Tn_d d e1) (S i)) (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i))))))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (L i)) (mer (seq (Tn_d d e1) (S i)) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (seq (Rn e0) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i))))) (mer (L i) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (seq (Rn e0) (R i))))) (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (Rn e0) (R i))) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (L i))))))))))))) *) elim LmerRn. (* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (seq (Rn e0) (R i))))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (seq (Rn e0) (R i)))))))) (alt Delta (alt (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (seq (Rn e0) (R i))))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (seq (Rn e0) (R i)))))))) (alt Delta (alt Delta (alt (enc H (Lmer (comm (L i) (seq (Rn e0) (R i))) (mer (seq (Tn_d d e1) (S i)) (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i))))))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (L i)) (mer (seq (Tn_d d e1) (S i)) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (seq (Rn e0) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i))))) (mer (L i) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (seq (Rn e0) (R i))))) (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (Rn e0) (R i))) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (L i))))))))))))) *) elim CommLRn. (* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (seq (Rn e0) (R i))))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (seq (Rn e0) (R i)))))))) (alt Delta (alt (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (seq (Rn e0) (R i))))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (seq (Rn e0) (R i)))))))) (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (L i)) (mer (seq (Tn_d d e1) (S i)) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (seq (Rn e0) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i))))) (mer (L i) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (seq (Rn e0) (R i))))) (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (Rn e0) (R i))) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (L i))))))))))))) *) elim CommiL. (* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (seq (Rn e0) (R i))))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (seq (Rn e0) (R i)))))))) (alt Delta (alt (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (seq (Rn e0) (R i))))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (seq (Rn e0) (R i)))))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (seq (Rn e0) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i)))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i))))) (mer (L i) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (seq (Rn e0) (R i))))) (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (Rn e0) (R i))) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (L i))))))))))))) *) elim CommiRn. (* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (seq (Rn e0) (R i))))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (seq (Rn e0) (R i)))))))) (alt Delta (alt (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (seq (Rn e0) (R i))))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (seq (Rn e0) (R i)))))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i))))) (mer (L i) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (seq (Rn e0) (R i))))) (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (Rn e0) (R i))) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (L i))))))))))))) *) elim CommTn_dL. (* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (seq (Rn e0) (R i))))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (seq (Rn e0) (R i)))))))) (alt Delta (alt (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (seq (Rn e0) (R i))))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (seq (Rn e0) (R i)))))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i))))) (mer (L i) (seq (Rn e0) (R i))))) (alt Delta (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (Rn e0) (R i))) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (L i))))))))))))) *) elim CommTn_di. (* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (seq (Rn e0) (R i))))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (seq (Rn e0) (R i)))))))) (alt Delta (alt (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (seq (Rn e0) (R i))))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (seq (Rn e0) (R i)))))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (Rn e0) (R i))) (mer (alt (seq (ia one int i) (seq (ia Frame s3 (Tuple e1 d)) (K i))) (seq (ia one int i) (seq (ia Frame s3 lce) (K i)))) (L i))))))))))))) *) elim CommTn_dRn. (* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (seq (Rn e0) (R i))))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (seq (Rn e0) (R i)))))))) (alt Delta (alt (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (seq (Rn e0) (R i))))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (seq (Rn e0) (R i)))))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta Delta))))))))) *) repeat elim A6. (* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (seq (Rn e0) (R i))))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (seq (Rn e0) (R i)))))))) (alt Delta (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (seq (Rn e0) (R i))))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (seq (Rn e0) (R i))))))))) *) repeat elim A6'. (* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (seq (Rn e0) (R i))))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (seq (Rn e0) (R i)))))))) (alt (seq (ia one int i) (enc H (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (seq (Rn e0) (R i))))))) (seq (ia one int i) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (seq (Rn e0) (R i)))))))) *) apply refl_equal. Qed. Theorem Lem15 : forall d : D, seq (ia Frame c3 lce) (enc H (mer (K i) (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i))))) = enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (seq (Rn e0) (R i))))). Proof. (* Goal: forall d : D, @eq proc (seq (ia Frame c3 lce) (enc H (mer (K i) (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i)))))) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (seq (Rn e0) (R i)))))) *) intros. (* Goal: @eq proc (seq (ia Frame c3 lce) (enc H (mer (K i) (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i)))))) (enc H (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (seq (Rn e0) (R i)))))) *) elim (EXPH4 (seq (ia Frame s3 lce) (K i))). (* Goal: @eq proc (seq (ia Frame c3 lce) (enc H (mer (K i) (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i)))))) (alt (enc H (Lmer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (seq (Rn e0) (R i)))))) (alt (enc H (Lmer (seq (Tn_d d e1) (S i)) (mer (seq (ia Frame s3 lce) (K i)) (mer (L i) (seq (Rn e0) (R i)))))) (alt (enc H (Lmer (L i) (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e1) (S i)) (seq (Rn e0) (R i)))))) (alt (enc H (Lmer (seq (Rn e0) (R i)) (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i))))) (alt (enc H (Lmer (comm (L i) (seq (Rn e0) (R i))) (mer (seq (ia Frame s3 lce) (K i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (ia Frame s3 lce) (K i)) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (Rn e0) (R i))) (mer (seq (ia Frame s3 lce) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 lce) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (seq (ia Frame s3 lce) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (seq (Rn e0) (R i))))) (enc H (Lmer (comm (seq (ia Frame s3 lce) (K i)) (seq (Rn e0) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *) elim Lmers3. (* Goal: @eq proc (seq (ia Frame c3 lce) (enc H (mer (K i) (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i)))))) (alt Delta (alt (enc H (Lmer (seq (Tn_d d e1) (S i)) (mer (seq (ia Frame s3 lce) (K i)) (mer (L i) (seq (Rn e0) (R i)))))) (alt (enc H (Lmer (L i) (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e1) (S i)) (seq (Rn e0) (R i)))))) (alt (enc H (Lmer (seq (Rn e0) (R i)) (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i))))) (alt (enc H (Lmer (comm (L i) (seq (Rn e0) (R i))) (mer (seq (ia Frame s3 lce) (K i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (ia Frame s3 lce) (K i)) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (Rn e0) (R i))) (mer (seq (ia Frame s3 lce) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 lce) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (seq (ia Frame s3 lce) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (seq (Rn e0) (R i))))) (enc H (Lmer (comm (seq (ia Frame s3 lce) (K i)) (seq (Rn e0) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *) elim LmerTnd. (* Goal: @eq proc (seq (ia Frame c3 lce) (enc H (mer (K i) (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i)))))) (alt Delta (alt Delta (alt (enc H (Lmer (L i) (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e1) (S i)) (seq (Rn e0) (R i)))))) (alt (enc H (Lmer (seq (Rn e0) (R i)) (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i))))) (alt (enc H (Lmer (comm (L i) (seq (Rn e0) (R i))) (mer (seq (ia Frame s3 lce) (K i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (ia Frame s3 lce) (K i)) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (Rn e0) (R i))) (mer (seq (ia Frame s3 lce) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 lce) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (seq (ia Frame s3 lce) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (seq (Rn e0) (R i))))) (enc H (Lmer (comm (seq (ia Frame s3 lce) (K i)) (seq (Rn e0) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *) elim LmerL. (* Goal: @eq proc (seq (ia Frame c3 lce) (enc H (mer (K i) (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i)))))) (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (seq (Rn e0) (R i)) (mer (seq (ia Frame s3 lce) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i))))) (alt (enc H (Lmer (comm (L i) (seq (Rn e0) (R i))) (mer (seq (ia Frame s3 lce) (K i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (ia Frame s3 lce) (K i)) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (Rn e0) (R i))) (mer (seq (ia Frame s3 lce) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 lce) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (seq (ia Frame s3 lce) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (seq (Rn e0) (R i))))) (enc H (Lmer (comm (seq (ia Frame s3 lce) (K i)) (seq (Rn e0) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *) elim LmerRn. (* Goal: @eq proc (seq (ia Frame c3 lce) (enc H (mer (K i) (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (L i) (seq (Rn e0) (R i))) (mer (seq (ia Frame s3 lce) (K i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (ia Frame s3 lce) (K i)) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (Rn e0) (R i))) (mer (seq (ia Frame s3 lce) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 lce) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (seq (ia Frame s3 lce) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (seq (Rn e0) (R i))))) (enc H (Lmer (comm (seq (ia Frame s3 lce) (K i)) (seq (Rn e0) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *) elim CommLRn. (* Goal: @eq proc (seq (ia Frame c3 lce) (enc H (mer (K i) (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (ia Frame s3 lce) (K i)) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (Rn e0) (R i))) (mer (seq (ia Frame s3 lce) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 lce) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (seq (ia Frame s3 lce) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (seq (Rn e0) (R i))))) (enc H (Lmer (comm (seq (ia Frame s3 lce) (K i)) (seq (Rn e0) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *) elim CommTn_dL. (* Goal: @eq proc (seq (ia Frame c3 lce) (enc H (mer (K i) (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (Rn e0) (R i))) (mer (seq (ia Frame s3 lce) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 lce) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (seq (ia Frame s3 lce) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (seq (Rn e0) (R i))))) (enc H (Lmer (comm (seq (ia Frame s3 lce) (K i)) (seq (Rn e0) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *) elim CommTn_dRn. (* Goal: @eq proc (seq (ia Frame c3 lce) (enc H (mer (K i) (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (ia Frame s3 lce) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (seq (ia Frame s3 lce) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (seq (Rn e0) (R i))))) (enc H (Lmer (comm (seq (ia Frame s3 lce) (K i)) (seq (Rn e0) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *) elim Comms3Tn_d. (* Goal: @eq proc (seq (ia Frame c3 lce) (enc H (mer (K i) (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (ia Frame s3 lce) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (seq (Rn e0) (R i))))) (enc H (Lmer (comm (seq (ia Frame s3 lce) (K i)) (seq (Rn e0) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *) elim Comms3L. (* Goal: @eq proc (seq (ia Frame c3 lce) (enc H (mer (K i) (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (enc H (Lmer (comm (seq (ia Frame s3 lce) (K i)) (seq (Rn e0) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *) elim Comms3Rn_lce. (* Goal: @eq proc (seq (ia Frame c3 lce) (enc H (mer (K i) (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (seq (ia Frame c3 lce) (enc H (mer (mer (K i) (seq (seq (ia frame s5 (tuple e0)) (Rn e0)) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i)))))))))))))) *) repeat elim A6'. (* Goal: @eq proc (seq (ia Frame c3 lce) (enc H (mer (K i) (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i)))))) (seq (ia Frame c3 lce) (enc H (mer (mer (K i) (seq (seq (ia frame s5 (tuple e0)) (Rn e0)) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i))))) *) repeat elim A6. (* Goal: @eq proc (seq (ia Frame c3 lce) (enc H (mer (K i) (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i)))))) (seq (ia Frame c3 lce) (enc H (mer (mer (K i) (seq (seq (ia frame s5 (tuple e0)) (Rn e0)) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i))))) *) elim SC7. (* Goal: @eq proc (seq (ia Frame c3 lce) (enc H (mer (K i) (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i)))))) (seq (ia Frame c3 lce) (enc H (mer (K i) (mer (seq (seq (ia frame s5 (tuple e0)) (Rn e0)) (R i)) (mer (seq (Tn_d d e1) (S i)) (L i)))))) *) elim A5. (* Goal: @eq proc (seq (ia Frame c3 lce) (enc H (mer (K i) (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i)))))) (seq (ia Frame c3 lce) (enc H (mer (K i) (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i)))))) *) apply refl_equal. Qed. Theorem Lem16 : forall d : D, seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (K i) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i))))) = enc H (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (seq (Rn e0) (R i))))). Proof. (* Goal: forall d : D, @eq proc (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (K i) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i)))))) (enc H (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (seq (Rn e0) (R i)))))) *) intros. (* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (K i) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i)))))) (enc H (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (seq (Rn e0) (R i)))))) *) elim (EXPH4 (seq (ia Frame s3 (Tuple e1 d)) (K i))). (* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (K i) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i)))))) (alt (enc H (Lmer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (mer (L i) (seq (Rn e0) (R i)))))) (alt (enc H (Lmer (seq (Tn_d d e1) (S i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (L i) (seq (Rn e0) (R i)))))) (alt (enc H (Lmer (L i) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (seq (Rn e0) (R i)))))) (alt (enc H (Lmer (seq (Rn e0) (R i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i))))) (alt (enc H (Lmer (comm (L i) (seq (Rn e0) (R i))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (Rn e0) (R i))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (seq (Rn e0) (R i))))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Rn e0) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *) elim Lmers3. (* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (K i) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i)))))) (alt Delta (alt (enc H (Lmer (seq (Tn_d d e1) (S i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (L i) (seq (Rn e0) (R i)))))) (alt (enc H (Lmer (L i) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (seq (Rn e0) (R i)))))) (alt (enc H (Lmer (seq (Rn e0) (R i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i))))) (alt (enc H (Lmer (comm (L i) (seq (Rn e0) (R i))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (Rn e0) (R i))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (seq (Rn e0) (R i))))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Rn e0) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *) elim LmerTnd. (* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (K i) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i)))))) (alt Delta (alt Delta (alt (enc H (Lmer (L i) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (seq (Rn e0) (R i)))))) (alt (enc H (Lmer (seq (Rn e0) (R i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i))))) (alt (enc H (Lmer (comm (L i) (seq (Rn e0) (R i))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (Rn e0) (R i))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (seq (Rn e0) (R i))))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Rn e0) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *) elim LmerL. (* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (K i) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i)))))) (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (seq (Rn e0) (R i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (mer (seq (Tn_d d e1) (S i)) (L i))))) (alt (enc H (Lmer (comm (L i) (seq (Rn e0) (R i))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (Rn e0) (R i))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (seq (Rn e0) (R i))))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Rn e0) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *) elim LmerRn. (* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (K i) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (L i) (seq (Rn e0) (R i))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (Rn e0) (R i))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (seq (Rn e0) (R i))))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Rn e0) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *) elim CommLRn. (* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (K i) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (Rn e0) (R i))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (seq (Rn e0) (R i))))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Rn e0) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *) elim CommTn_dL. (* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (K i) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (Rn e0) (R i))) (mer (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (seq (Rn e0) (R i))))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Rn e0) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *) elim CommTn_dRn. (* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (K i) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Tn_d d e1) (S i))) (mer (L i) (seq (Rn e0) (R i))))) (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (seq (Rn e0) (R i))))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Rn e0) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *) elim Comms3Tn_d. (* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (K i) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (L i)) (mer (seq (Tn_d d e1) (S i)) (seq (Rn e0) (R i))))) (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Rn e0) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *) elim Comms3L. (* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (K i) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (enc H (Lmer (comm (seq (ia Frame s3 (Tuple e1 d)) (K i)) (seq (Rn e0) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *) pattern e1 at 4 in |- *. (* Goal: (fun b : bit => @eq proc (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (K i) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (enc H (Lmer (comm (seq (ia Frame s3 (Tuple b d)) (K i)) (seq (Rn e0) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i)))))))))))))) e1 *) elimtype (toggle e0 = e1). (* Goal: @eq bit (toggle e0) e1 *) (* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (K i) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (enc H (Lmer (comm (seq (ia Frame s3 (Tuple (toggle e0) d)) (K i)) (seq (Rn e0) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))) *) elim Comms3Rn_b. (* Goal: @eq bit (toggle e0) e1 *) (* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (K i) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (seq (ia Frame c3 (Tuple (toggle e0) d)) (enc H (mer (K i) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple (toggle e0))) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i))))))))))))))) *) repeat elim A6'. (* Goal: @eq bit (toggle e0) e1 *) (* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (K i) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i)))))) (seq (ia Frame c3 (Tuple (toggle e0) d)) (enc H (mer (K i) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple (toggle e0))) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i)))))) *) elim Toggle1. (* Goal: @eq bit (toggle e0) e1 *) (* Goal: @eq proc (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (K i) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i)))))) (seq (ia Frame c3 (Tuple e1 d)) (enc H (mer (K i) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i)))))) *) apply refl_equal. (* Goal: @eq bit (toggle e0) e1 *) elim Toggle1. (* Goal: @eq bit e1 e1 *) apply refl_equal. Qed. Theorem Lem17 : forall d : D, seq (ia D s4 d) (Y2 d) = enc H (mer (K i) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i)))). Proof. (* Goal: forall d : D, @eq proc (seq (ia D s4 d) (Y2 d)) (enc H (mer (K i) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i))))) *) intros. (* Goal: @eq proc (seq (ia D s4 d) (Y2 d)) (enc H (mer (K i) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i))))) *) elim EXPH4. (* Goal: @eq proc (seq (ia D s4 d) (Y2 d)) (alt (enc H (Lmer (K i) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i))))) (alt (enc H (Lmer (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i))) (mer (K i) (mer (seq (Tn_d d e1) (S i)) (L i))))) (alt (enc H (Lmer (seq (Tn_d d e1) (S i)) (mer (K i) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i))) (L i))))) (alt (enc H (Lmer (L i) (mer (K i) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i))) (seq (Tn_d d e1) (S i)))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (K i) (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i)))))) (alt (enc H (Lmer (comm (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i))) (seq (Tn_d d e1) (S i))) (mer (K i) (L i)))) (alt (enc H (Lmer (comm (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i))) (L i)) (mer (K i) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (K i) (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i)))) (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e1) (S i))) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i))) (L i)))) (enc H (Lmer (comm (K i) (L i)) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i))) (seq (Tn_d d e1) (S i)))))))))))))) *) elim LmerK. (* Goal: @eq proc (seq (ia D s4 d) (Y2 d)) (alt Delta (alt (enc H (Lmer (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i))) (mer (K i) (mer (seq (Tn_d d e1) (S i)) (L i))))) (alt (enc H (Lmer (seq (Tn_d d e1) (S i)) (mer (K i) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i))) (L i))))) (alt (enc H (Lmer (L i) (mer (K i) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i))) (seq (Tn_d d e1) (S i)))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (K i) (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i)))))) (alt (enc H (Lmer (comm (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i))) (seq (Tn_d d e1) (S i))) (mer (K i) (L i)))) (alt (enc H (Lmer (comm (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i))) (L i)) (mer (K i) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (K i) (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i)))) (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e1) (S i))) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i))) (L i)))) (enc H (Lmer (comm (K i) (L i)) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i))) (seq (Tn_d d e1) (S i)))))))))))))) *) elim Lmers4. (* Goal: @eq proc (seq (ia D s4 d) (Y2 d)) (alt Delta (alt (seq (ia D s4 d) (enc H (mer (seq (ia frame s5 (tuple e1)) (R i)) (mer (K i) (mer (seq (Tn_d d e1) (S i)) (L i)))))) (alt (enc H (Lmer (seq (Tn_d d e1) (S i)) (mer (K i) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i))) (L i))))) (alt (enc H (Lmer (L i) (mer (K i) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i))) (seq (Tn_d d e1) (S i)))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (K i) (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i)))))) (alt (enc H (Lmer (comm (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i))) (seq (Tn_d d e1) (S i))) (mer (K i) (L i)))) (alt (enc H (Lmer (comm (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i))) (L i)) (mer (K i) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (K i) (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i)))) (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e1) (S i))) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i))) (L i)))) (enc H (Lmer (comm (K i) (L i)) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i))) (seq (Tn_d d e1) (S i)))))))))))))) *) elim LmerTnd. (* Goal: @eq proc (seq (ia D s4 d) (Y2 d)) (alt Delta (alt (seq (ia D s4 d) (enc H (mer (seq (ia frame s5 (tuple e1)) (R i)) (mer (K i) (mer (seq (Tn_d d e1) (S i)) (L i)))))) (alt Delta (alt (enc H (Lmer (L i) (mer (K i) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i))) (seq (Tn_d d e1) (S i)))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (K i) (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i)))))) (alt (enc H (Lmer (comm (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i))) (seq (Tn_d d e1) (S i))) (mer (K i) (L i)))) (alt (enc H (Lmer (comm (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i))) (L i)) (mer (K i) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (K i) (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i)))) (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e1) (S i))) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i))) (L i)))) (enc H (Lmer (comm (K i) (L i)) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i))) (seq (Tn_d d e1) (S i)))))))))))))) *) elim LmerL. (* Goal: @eq proc (seq (ia D s4 d) (Y2 d)) (alt Delta (alt (seq (ia D s4 d) (enc H (mer (seq (ia frame s5 (tuple e1)) (R i)) (mer (K i) (mer (seq (Tn_d d e1) (S i)) (L i)))))) (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (K i) (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i)))))) (alt (enc H (Lmer (comm (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i))) (seq (Tn_d d e1) (S i))) (mer (K i) (L i)))) (alt (enc H (Lmer (comm (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i))) (L i)) (mer (K i) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (K i) (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i)))) (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e1) (S i))) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i))) (L i)))) (enc H (Lmer (comm (K i) (L i)) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i))) (seq (Tn_d d e1) (S i)))))))))))))) *) elim CommTn_dL. (* Goal: @eq proc (seq (ia D s4 d) (Y2 d)) (alt Delta (alt (seq (ia D s4 d) (enc H (mer (seq (ia frame s5 (tuple e1)) (R i)) (mer (K i) (mer (seq (Tn_d d e1) (S i)) (L i)))))) (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i))) (seq (Tn_d d e1) (S i))) (mer (K i) (L i)))) (alt (enc H (Lmer (comm (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i))) (L i)) (mer (K i) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (K i) (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i)))) (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e1) (S i))) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i))) (L i)))) (enc H (Lmer (comm (K i) (L i)) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i))) (seq (Tn_d d e1) (S i)))))))))))))) *) elim CommTn_ds4. (* Goal: @eq proc (seq (ia D s4 d) (Y2 d)) (alt Delta (alt (seq (ia D s4 d) (enc H (mer (seq (ia frame s5 (tuple e1)) (R i)) (mer (K i) (mer (seq (Tn_d d e1) (S i)) (L i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i))) (L i)) (mer (K i) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (K i) (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i)))) (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e1) (S i))) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i))) (L i)))) (enc H (Lmer (comm (K i) (L i)) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i))) (seq (Tn_d d e1) (S i)))))))))))))) *) elim CommLs4. (* Goal: @eq proc (seq (ia D s4 d) (Y2 d)) (alt Delta (alt (seq (ia D s4 d) (enc H (mer (seq (ia frame s5 (tuple e1)) (R i)) (mer (K i) (mer (seq (Tn_d d e1) (S i)) (L i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (K i) (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i)))) (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e1) (S i))) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i))) (L i)))) (enc H (Lmer (comm (K i) (L i)) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i))) (seq (Tn_d d e1) (S i)))))))))))))) *) elim CommKs4. (* Goal: @eq proc (seq (ia D s4 d) (Y2 d)) (alt Delta (alt (seq (ia D s4 d) (enc H (mer (seq (ia frame s5 (tuple e1)) (R i)) (mer (K i) (mer (seq (Tn_d d e1) (S i)) (L i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e1) (S i))) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i))) (L i)))) (enc H (Lmer (comm (K i) (L i)) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i))) (seq (Tn_d d e1) (S i)))))))))))))) *) elim (SC3 (seq (Tn_d d e1) (S i)) (K i)). (* Goal: @eq proc (seq (ia D s4 d) (Y2 d)) (alt Delta (alt (seq (ia D s4 d) (enc H (mer (seq (ia frame s5 (tuple e1)) (R i)) (mer (K i) (mer (seq (Tn_d d e1) (S i)) (L i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e1) (S i))) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i))) (L i)))) (enc H (Lmer (comm (K i) (L i)) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i))) (seq (Tn_d d e1) (S i)))))))))))))) *) elim CommTn_dK. (* Goal: @eq proc (seq (ia D s4 d) (Y2 d)) (alt Delta (alt (seq (ia D s4 d) (enc H (mer (seq (ia frame s5 (tuple e1)) (R i)) (mer (K i) (mer (seq (Tn_d d e1) (S i)) (L i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (enc H (Lmer (comm (K i) (L i)) (mer (seq (ia D s4 d) (seq (ia frame s5 (tuple e1)) (R i))) (seq (Tn_d d e1) (S i)))))))))))))) *) elim CommKL. (* Goal: @eq proc (seq (ia D s4 d) (Y2 d)) (alt Delta (alt (seq (ia D s4 d) (enc H (mer (seq (ia frame s5 (tuple e1)) (R i)) (mer (K i) (mer (seq (Tn_d d e1) (S i)) (L i)))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta Delta))))))))) *) repeat elim A6. (* Goal: @eq proc (seq (ia D s4 d) (Y2 d)) (alt Delta (seq (ia D s4 d) (enc H (mer (seq (ia frame s5 (tuple e1)) (R i)) (mer (K i) (mer (seq (Tn_d d e1) (S i)) (L i))))))) *) repeat elim A6'. (* Goal: @eq proc (seq (ia D s4 d) (Y2 d)) (seq (ia D s4 d) (enc H (mer (seq (ia frame s5 (tuple e1)) (R i)) (mer (K i) (mer (seq (Tn_d d e1) (S i)) (L i)))))) *) unfold Y2 in |- *. (* Goal: @eq proc (seq (ia D s4 d) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (K i) (mer (L i) (seq (ia frame s5 (tuple e1)) (R i))))))) (seq (ia D s4 d) (enc H (mer (seq (ia frame s5 (tuple e1)) (R i)) (mer (K i) (mer (seq (Tn_d d e1) (S i)) (L i)))))) *) elim (SC6 (seq (ia frame s5 (tuple e1)) (R i)) (L i)). (* Goal: @eq proc (seq (ia D s4 d) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (K i) (mer (seq (ia frame s5 (tuple e1)) (R i)) (L i)))))) (seq (ia D s4 d) (enc H (mer (seq (ia frame s5 (tuple e1)) (R i)) (mer (K i) (mer (seq (Tn_d d e1) (S i)) (L i)))))) *) elim (SC6 (mer (seq (ia frame s5 (tuple e1)) (R i)) (L i)) (K i)). (* Goal: @eq proc (seq (ia D s4 d) (enc H (mer (seq (Tn_d d e1) (S i)) (mer (mer (seq (ia frame s5 (tuple e1)) (R i)) (L i)) (K i))))) (seq (ia D s4 d) (enc H (mer (seq (ia frame s5 (tuple e1)) (R i)) (mer (K i) (mer (seq (Tn_d d e1) (S i)) (L i)))))) *) elim (SC6 (mer (mer (seq (ia frame s5 (tuple e1)) (R i)) (L i)) (K i)) (seq (Tn_d d e1) (S i))). (* Goal: @eq proc (seq (ia D s4 d) (enc H (mer (mer (mer (seq (ia frame s5 (tuple e1)) (R i)) (L i)) (K i)) (seq (Tn_d d e1) (S i))))) (seq (ia D s4 d) (enc H (mer (seq (ia frame s5 (tuple e1)) (R i)) (mer (K i) (mer (seq (Tn_d d e1) (S i)) (L i)))))) *) elim SC7. (* Goal: @eq proc (seq (ia D s4 d) (enc H (mer (mer (seq (ia frame s5 (tuple e1)) (R i)) (L i)) (mer (K i) (seq (Tn_d d e1) (S i)))))) (seq (ia D s4 d) (enc H (mer (seq (ia frame s5 (tuple e1)) (R i)) (mer (K i) (mer (seq (Tn_d d e1) (S i)) (L i)))))) *) elim SC7. (* Goal: @eq proc (seq (ia D s4 d) (enc H (mer (seq (ia frame s5 (tuple e1)) (R i)) (mer (L i) (mer (K i) (seq (Tn_d d e1) (S i))))))) (seq (ia D s4 d) (enc H (mer (seq (ia frame s5 (tuple e1)) (R i)) (mer (K i) (mer (seq (Tn_d d e1) (S i)) (L i)))))) *) elim (SC6 (mer (K i) (seq (Tn_d d e1) (S i))) (L i)). (* Goal: @eq proc (seq (ia D s4 d) (enc H (mer (seq (ia frame s5 (tuple e1)) (R i)) (mer (mer (K i) (seq (Tn_d d e1) (S i))) (L i))))) (seq (ia D s4 d) (enc H (mer (seq (ia frame s5 (tuple e1)) (R i)) (mer (K i) (mer (seq (Tn_d d e1) (S i)) (L i)))))) *) elim SC7. (* Goal: @eq proc (seq (ia D s4 d) (enc H (mer (seq (ia frame s5 (tuple e1)) (R i)) (mer (K i) (mer (seq (Tn_d d e1) (S i)) (L i)))))) (seq (ia D s4 d) (enc H (mer (seq (ia frame s5 (tuple e1)) (R i)) (mer (K i) (mer (seq (Tn_d d e1) (S i)) (L i)))))) *) apply refl_equal. Qed. Theorem Lem18 : forall d : D, seq (ia frame c5 (tuple e0)) (enc H (mer (seq (Rn e0) (R i)) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (K i) (seq (Tn_d d e1) (S i)))))) = enc H (mer (K i) (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i)))). Proof. (* Goal: forall d : D, @eq proc (seq (ia frame c5 (tuple e0)) (enc H (mer (seq (Rn e0) (R i)) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (K i) (seq (Tn_d d e1) (S i))))))) (enc H (mer (K i) (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i))))) *) intros. (* Goal: @eq proc (seq (ia frame c5 (tuple e0)) (enc H (mer (seq (Rn e0) (R i)) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (K i) (seq (Tn_d d e1) (S i))))))) (enc H (mer (K i) (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i))))) *) elim (EXPH4 (K i)). (* Goal: @eq proc (seq (ia frame c5 (tuple e0)) (enc H (mer (seq (Rn e0) (R i)) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (K i) (seq (Tn_d d e1) (S i))))))) (alt (enc H (Lmer (K i) (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (mer (seq (Tn_d d e1) (S i)) (L i))))) (alt (enc H (Lmer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (mer (K i) (mer (seq (Tn_d d e1) (S i)) (L i))))) (alt (enc H (Lmer (seq (Tn_d d e1) (S i)) (mer (K i) (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (L i))))) (alt (enc H (Lmer (L i) (mer (K i) (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (seq (Tn_d d e1) (S i)))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (K i) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))))) (alt (enc H (Lmer (comm (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (seq (Tn_d d e1) (S i))) (mer (K i) (L i)))) (alt (enc H (Lmer (comm (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (L i)) (mer (K i) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (K i) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i)))) (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e1) (S i))) (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (L i)))) (enc H (Lmer (comm (K i) (L i)) (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (seq (Tn_d d e1) (S i)))))))))))))) *) elim LmerK. (* Goal: @eq proc (seq (ia frame c5 (tuple e0)) (enc H (mer (seq (Rn e0) (R i)) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (K i) (seq (Tn_d d e1) (S i))))))) (alt Delta (alt (enc H (Lmer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (mer (K i) (mer (seq (Tn_d d e1) (S i)) (L i))))) (alt (enc H (Lmer (seq (Tn_d d e1) (S i)) (mer (K i) (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (L i))))) (alt (enc H (Lmer (L i) (mer (K i) (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (seq (Tn_d d e1) (S i)))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (K i) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))))) (alt (enc H (Lmer (comm (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (seq (Tn_d d e1) (S i))) (mer (K i) (L i)))) (alt (enc H (Lmer (comm (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (L i)) (mer (K i) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (K i) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i)))) (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e1) (S i))) (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (L i)))) (enc H (Lmer (comm (K i) (L i)) (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (seq (Tn_d d e1) (S i)))))))))))))) *) elim LmerL. (* Goal: @eq proc (seq (ia frame c5 (tuple e0)) (enc H (mer (seq (Rn e0) (R i)) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (K i) (seq (Tn_d d e1) (S i))))))) (alt Delta (alt (enc H (Lmer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (mer (K i) (mer (seq (Tn_d d e1) (S i)) (L i))))) (alt (enc H (Lmer (seq (Tn_d d e1) (S i)) (mer (K i) (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (L i))))) (alt Delta (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (K i) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))))) (alt (enc H (Lmer (comm (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (seq (Tn_d d e1) (S i))) (mer (K i) (L i)))) (alt (enc H (Lmer (comm (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (L i)) (mer (K i) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (K i) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i)))) (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e1) (S i))) (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (L i)))) (enc H (Lmer (comm (K i) (L i)) (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (seq (Tn_d d e1) (S i)))))))))))))) *) elim Lmers5. (* Goal: @eq proc (seq (ia frame c5 (tuple e0)) (enc H (mer (seq (Rn e0) (R i)) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (K i) (seq (Tn_d d e1) (S i))))))) (alt Delta (alt Delta (alt (enc H (Lmer (seq (Tn_d d e1) (S i)) (mer (K i) (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (L i))))) (alt Delta (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (K i) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))))) (alt (enc H (Lmer (comm (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (seq (Tn_d d e1) (S i))) (mer (K i) (L i)))) (alt (enc H (Lmer (comm (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (L i)) (mer (K i) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (K i) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i)))) (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e1) (S i))) (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (L i)))) (enc H (Lmer (comm (K i) (L i)) (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (seq (Tn_d d e1) (S i)))))))))))))) *) elim LmerTnd. (* Goal: @eq proc (seq (ia frame c5 (tuple e0)) (enc H (mer (seq (Rn e0) (R i)) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (K i) (seq (Tn_d d e1) (S i))))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (L i)) (mer (K i) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))))) (alt (enc H (Lmer (comm (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (seq (Tn_d d e1) (S i))) (mer (K i) (L i)))) (alt (enc H (Lmer (comm (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (L i)) (mer (K i) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (K i) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i)))) (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e1) (S i))) (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (L i)))) (enc H (Lmer (comm (K i) (L i)) (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (seq (Tn_d d e1) (S i)))))))))))))) *) elim CommTn_dL. (* Goal: @eq proc (seq (ia frame c5 (tuple e0)) (enc H (mer (seq (Rn e0) (R i)) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (K i) (seq (Tn_d d e1) (S i))))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (seq (Tn_d d e1) (S i))) (mer (K i) (L i)))) (alt (enc H (Lmer (comm (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (L i)) (mer (K i) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (K i) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i)))) (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e1) (S i))) (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (L i)))) (enc H (Lmer (comm (K i) (L i)) (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (seq (Tn_d d e1) (S i)))))))))))))) *) elim CommTn_ds5. (* Goal: @eq proc (seq (ia frame c5 (tuple e0)) (enc H (mer (seq (Rn e0) (R i)) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (K i) (seq (Tn_d d e1) (S i))))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (L i)) (mer (K i) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (K i) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i)))) (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e1) (S i))) (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (L i)))) (enc H (Lmer (comm (K i) (L i)) (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (seq (Tn_d d e1) (S i)))))))))))))) *) elim CommLs5. (* Goal: @eq proc (seq (ia frame c5 (tuple e0)) (enc H (mer (seq (Rn e0) (R i)) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (K i) (seq (Tn_d d e1) (S i))))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (seq (ia frame c5 (tuple e0)) (enc H (mer (seq (Rn e0) (R i)) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (K i) (seq (Tn_d d e1) (S i))))))) (alt (enc H (Lmer (comm (K i) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))) (mer (seq (Tn_d d e1) (S i)) (L i)))) (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e1) (S i))) (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (L i)))) (enc H (Lmer (comm (K i) (L i)) (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (seq (Tn_d d e1) (S i)))))))))))))) *) elim CommKs5. (* Goal: @eq proc (seq (ia frame c5 (tuple e0)) (enc H (mer (seq (Rn e0) (R i)) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (K i) (seq (Tn_d d e1) (S i))))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (seq (ia frame c5 (tuple e0)) (enc H (mer (seq (Rn e0) (R i)) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (K i) (seq (Tn_d d e1) (S i))))))) (alt Delta (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e1) (S i))) (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (L i)))) (enc H (Lmer (comm (K i) (L i)) (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (seq (Tn_d d e1) (S i)))))))))))))) *) elim CommKL. (* Goal: @eq proc (seq (ia frame c5 (tuple e0)) (enc H (mer (seq (Rn e0) (R i)) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (K i) (seq (Tn_d d e1) (S i))))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (seq (ia frame c5 (tuple e0)) (enc H (mer (seq (Rn e0) (R i)) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (K i) (seq (Tn_d d e1) (S i))))))) (alt Delta (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e1) (S i))) (mer (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i))) (L i)))) Delta))))))))) *) elim CommTn_dK. (* Goal: @eq proc (seq (ia frame c5 (tuple e0)) (enc H (mer (seq (Rn e0) (R i)) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (K i) (seq (Tn_d d e1) (S i))))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt (seq (ia frame c5 (tuple e0)) (enc H (mer (seq (Rn e0) (R i)) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (K i) (seq (Tn_d d e1) (S i))))))) (alt Delta (alt Delta Delta))))))))) *) repeat elim A6. (* Goal: @eq proc (seq (ia frame c5 (tuple e0)) (enc H (mer (seq (Rn e0) (R i)) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (K i) (seq (Tn_d d e1) (S i))))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (seq (ia frame c5 (tuple e0)) (enc H (mer (seq (Rn e0) (R i)) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (K i) (seq (Tn_d d e1) (S i))))))))))))) *) repeat elim A6'. (* Goal: @eq proc (seq (ia frame c5 (tuple e0)) (enc H (mer (seq (Rn e0) (R i)) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (K i) (seq (Tn_d d e1) (S i))))))) (seq (ia frame c5 (tuple e0)) (enc H (mer (seq (Rn e0) (R i)) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (K i) (seq (Tn_d d e1) (S i))))))) *) apply refl_equal. Qed. Theorem Lem19 : forall d : D, alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e0)) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i))))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i))))))) = enc H (mer (seq (Rn e0) (R i)) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (K i) (seq (Tn_d d e1) (S i))))). Proof. (* Goal: forall d : D, @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e0)) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i))))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i)))))))) (enc H (mer (seq (Rn e0) (R i)) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (K i) (seq (Tn_d d e1) (S i)))))) *) intros. (* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e0)) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i))))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i)))))))) (enc H (mer (seq (Rn e0) (R i)) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (K i) (seq (Tn_d d e1) (S i)))))) *) elim (EXPH4 (seq (Rn e0) (R i))). (* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e0)) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i))))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i)))))))) (alt (enc H (Lmer (seq (Rn e0) (R i)) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (K i) (seq (Tn_d d e1) (S i)))))) (alt (enc H (Lmer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i)))))) (alt (enc H (Lmer (K i) (mer (seq (Rn e0) (R i)) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (seq (Tn_d d e1) (S i)))))) (alt (enc H (Lmer (seq (Tn_d d e1) (S i)) (mer (seq (Rn e0) (R i)) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (K i))))) (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e1) (S i))) (mer (seq (Rn e0) (R i)) (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i))))))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (K i)) (mer (seq (Rn e0) (R i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (seq (Tn_d d e1) (S i))) (mer (seq (Rn e0) (R i)) (K i)))) (alt (enc H (Lmer (comm (seq (Rn e0) (R i)) (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i))))) (mer (K i) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Rn e0) (R i)) (K i)) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (seq (Tn_d d e1) (S i))))) (enc H (Lmer (comm (seq (Rn e0) (R i)) (seq (Tn_d d e1) (S i))) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (K i))))))))))))) *) elim Lmeri. (* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e0)) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i))))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i)))))))) (alt (enc H (Lmer (seq (Rn e0) (R i)) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (K i) (seq (Tn_d d e1) (S i)))))) (alt (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e0)) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i))))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i)))))))) (alt (enc H (Lmer (K i) (mer (seq (Rn e0) (R i)) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (seq (Tn_d d e1) (S i)))))) (alt (enc H (Lmer (seq (Tn_d d e1) (S i)) (mer (seq (Rn e0) (R i)) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (K i))))) (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e1) (S i))) (mer (seq (Rn e0) (R i)) (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i))))))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (K i)) (mer (seq (Rn e0) (R i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (seq (Tn_d d e1) (S i))) (mer (seq (Rn e0) (R i)) (K i)))) (alt (enc H (Lmer (comm (seq (Rn e0) (R i)) (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i))))) (mer (K i) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Rn e0) (R i)) (K i)) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (seq (Tn_d d e1) (S i))))) (enc H (Lmer (comm (seq (Rn e0) (R i)) (seq (Tn_d d e1) (S i))) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (K i))))))))))))) *) elim LmerK. (* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e0)) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i))))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i)))))))) (alt (enc H (Lmer (seq (Rn e0) (R i)) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (K i) (seq (Tn_d d e1) (S i)))))) (alt (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e0)) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i))))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i)))))))) (alt Delta (alt (enc H (Lmer (seq (Tn_d d e1) (S i)) (mer (seq (Rn e0) (R i)) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (K i))))) (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e1) (S i))) (mer (seq (Rn e0) (R i)) (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i))))))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (K i)) (mer (seq (Rn e0) (R i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (seq (Tn_d d e1) (S i))) (mer (seq (Rn e0) (R i)) (K i)))) (alt (enc H (Lmer (comm (seq (Rn e0) (R i)) (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i))))) (mer (K i) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Rn e0) (R i)) (K i)) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (seq (Tn_d d e1) (S i))))) (enc H (Lmer (comm (seq (Rn e0) (R i)) (seq (Tn_d d e1) (S i))) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (K i))))))))))))) *) elim LmerTnd. (* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e0)) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i))))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i)))))))) (alt (enc H (Lmer (seq (Rn e0) (R i)) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (mer (K i) (seq (Tn_d d e1) (S i)))))) (alt (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e0)) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i))))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i)))))))) (alt Delta (alt Delta (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e1) (S i))) (mer (seq (Rn e0) (R i)) (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i))))))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (K i)) (mer (seq (Rn e0) (R i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (seq (Tn_d d e1) (S i))) (mer (seq (Rn e0) (R i)) (K i)))) (alt (enc H (Lmer (comm (seq (Rn e0) (R i)) (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i))))) (mer (K i) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Rn e0) (R i)) (K i)) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (seq (Tn_d d e1) (S i))))) (enc H (Lmer (comm (seq (Rn e0) (R i)) (seq (Tn_d d e1) (S i))) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (K i))))))))))))) *) elim LmerRn. (* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e0)) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i))))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i)))))))) (alt Delta (alt (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e0)) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i))))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i)))))))) (alt Delta (alt Delta (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e1) (S i))) (mer (seq (Rn e0) (R i)) (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i))))))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (K i)) (mer (seq (Rn e0) (R i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (seq (Tn_d d e1) (S i))) (mer (seq (Rn e0) (R i)) (K i)))) (alt (enc H (Lmer (comm (seq (Rn e0) (R i)) (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i))))) (mer (K i) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Rn e0) (R i)) (K i)) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (seq (Tn_d d e1) (S i))))) (enc H (Lmer (comm (seq (Rn e0) (R i)) (seq (Tn_d d e1) (S i))) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (K i))))))))))))) *) elim (SC3 (seq (Rn e0) (R i)) (seq (Tn_d d e1) (S i))). (* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e0)) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i))))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i)))))))) (alt Delta (alt (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e0)) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i))))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i)))))))) (alt Delta (alt Delta (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e1) (S i))) (mer (seq (Rn e0) (R i)) (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i))))))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (K i)) (mer (seq (Rn e0) (R i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (seq (Tn_d d e1) (S i))) (mer (seq (Rn e0) (R i)) (K i)))) (alt (enc H (Lmer (comm (seq (Rn e0) (R i)) (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i))))) (mer (K i) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Rn e0) (R i)) (K i)) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (seq (Tn_d d e1) (S i))))) (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (seq (Rn e0) (R i))) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (K i))))))))))))) *) elim CommTn_dRn. (* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e0)) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i))))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i)))))))) (alt Delta (alt (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e0)) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i))))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i)))))))) (alt Delta (alt Delta (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e1) (S i))) (mer (seq (Rn e0) (R i)) (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i))))))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (K i)) (mer (seq (Rn e0) (R i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (seq (Tn_d d e1) (S i))) (mer (seq (Rn e0) (R i)) (K i)))) (alt (enc H (Lmer (comm (seq (Rn e0) (R i)) (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i))))) (mer (K i) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Rn e0) (R i)) (K i)) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (seq (Tn_d d e1) (S i))))) Delta))))))))) *) elim (SC3 (seq (Rn e0) (R i)) (K i)). (* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e0)) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i))))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i)))))))) (alt Delta (alt (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e0)) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i))))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i)))))))) (alt Delta (alt Delta (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e1) (S i))) (mer (seq (Rn e0) (R i)) (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i))))))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (K i)) (mer (seq (Rn e0) (R i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (seq (Tn_d d e1) (S i))) (mer (seq (Rn e0) (R i)) (K i)))) (alt (enc H (Lmer (comm (seq (Rn e0) (R i)) (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i))))) (mer (K i) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (K i) (seq (Rn e0) (R i))) (mer (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (seq (Tn_d d e1) (S i))))) Delta))))))))) *) elim CommKRn. (* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e0)) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i))))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i)))))))) (alt Delta (alt (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e0)) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i))))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i)))))))) (alt Delta (alt Delta (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e1) (S i))) (mer (seq (Rn e0) (R i)) (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i))))))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (K i)) (mer (seq (Rn e0) (R i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (seq (Tn_d d e1) (S i))) (mer (seq (Rn e0) (R i)) (K i)))) (alt (enc H (Lmer (comm (seq (Rn e0) (R i)) (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i))))) (mer (K i) (seq (Tn_d d e1) (S i))))) (alt Delta Delta))))))))) *) elim (SC3 (seq (Rn e0) (R i)) (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i))))). (* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e0)) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i))))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i)))))))) (alt Delta (alt (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e0)) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i))))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i)))))))) (alt Delta (alt Delta (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e1) (S i))) (mer (seq (Rn e0) (R i)) (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i))))))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (K i)) (mer (seq (Rn e0) (R i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (seq (Tn_d d e1) (S i))) (mer (seq (Rn e0) (R i)) (K i)))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (seq (Rn e0) (R i))) (mer (K i) (seq (Tn_d d e1) (S i))))) (alt Delta Delta))))))))) *) elim CommiRn. (* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e0)) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i))))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i)))))))) (alt Delta (alt (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e0)) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i))))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i)))))))) (alt Delta (alt Delta (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e1) (S i))) (mer (seq (Rn e0) (R i)) (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i))))))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (K i)) (mer (seq (Rn e0) (R i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (seq (Tn_d d e1) (S i))) (mer (seq (Rn e0) (R i)) (K i)))) (alt Delta (alt Delta Delta))))))))) *) elim (SC3 (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (seq (Tn_d d e1) (S i))). (* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e0)) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i))))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i)))))))) (alt Delta (alt (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e0)) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i))))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i)))))))) (alt Delta (alt Delta (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e1) (S i))) (mer (seq (Rn e0) (R i)) (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i))))))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (K i)) (mer (seq (Rn e0) (R i)) (seq (Tn_d d e1) (S i))))) (alt (enc H (Lmer (comm (seq (Tn_d d e1) (S i)) (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i))))) (mer (seq (Rn e0) (R i)) (K i)))) (alt Delta (alt Delta Delta))))))))) *) elim CommTn_di. (* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e0)) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i))))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i)))))))) (alt Delta (alt (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e0)) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i))))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i)))))))) (alt Delta (alt Delta (alt (enc H (Lmer (comm (K i) (seq (Tn_d d e1) (S i))) (mer (seq (Rn e0) (R i)) (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i))))))) (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (K i)) (mer (seq (Rn e0) (R i)) (seq (Tn_d d e1) (S i))))) (alt Delta (alt Delta (alt Delta Delta))))))))) *) elim CommTn_dK. (* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e0)) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i))))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i)))))))) (alt Delta (alt (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e0)) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i))))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i)))))))) (alt Delta (alt Delta (alt Delta (alt (enc H (Lmer (comm (alt (seq (ia one int i) (seq (ia frame s6 (tuple e0)) (L i))) (seq (ia one int i) (seq (ia frame s6 sce) (L i)))) (K i)) (mer (seq (Rn e0) (R i)) (seq (Tn_d d e1) (S i))))) (alt Delta (alt Delta (alt Delta Delta))))))))) *) elim CommiK. (* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e0)) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i))))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i)))))))) (alt Delta (alt (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e0)) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i))))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i)))))))) (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta (alt Delta Delta))))))))) *) repeat elim A6. (* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e0)) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i))))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i)))))))) (alt Delta (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e0)) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i))))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i))))))))) *) repeat elim A6'. (* Goal: @eq proc (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e0)) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i))))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i)))))))) (alt (seq (ia one int i) (enc H (mer (seq (ia frame s6 (tuple e0)) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i))))))) (seq (ia one int i) (enc H (mer (seq (ia frame s6 sce) (L i)) (mer (seq (Rn e0) (R i)) (mer (K i) (seq (Tn_d d e1) (S i)))))))) *) apply refl_equal. Qed.
Require Import Coq.Lists.List. Require Import Coq.NArith.NArith. Require Import Coq.PArith.PArith. Require Import ListString.All. Import ListNotations. Local Open Scope type. Module ClientSocketId. Inductive t : Set := | New : N -> t. End ClientSocketId. Module Command. Inductive t : Set := | Log | FileRead | ServerSocketBind | ClientSocketRead | ClientSocketWrite | ClientSocketClose | Time. Definition request (command : t) : Set := match command with | Log => LString.t | FileRead => LString.t | ServerSocketBind => N | ClientSocketRead => ClientSocketId.t | ClientSocketWrite => ClientSocketId.t * LString.t | ClientSocketClose => ClientSocketId.t | Time => unit end. Definition answer (command : t) : Set := match command with | Log => bool | FileRead => option LString.t | ServerSocketBind => option ClientSocketId.t | ClientSocketRead => option LString.t | ClientSocketWrite => bool | ClientSocketClose => bool | Time => N end. Definition eq_dec (command1 command2 : t) : {command1 = command2} + {command1 <> command2}. Proof. (* Goal: sumbool (@eq t command1 command2) (not (@eq t command1 command2)) *) destruct command1; destruct command2; try (left; congruence); try (right; congruence). Qed. End Command. Module Output. Record t : Set := New { command : Command.t; id : positive; argument : Command.request command }. End Output. Module Input. Record t : Set := New { command : Command.t; id : positive; argument : Command.answer command }. End Input.
Require Import Coq.Arith.Peano_dec. Require Import Coq.Lists.SetoidList. Require Import Coq.omega.Omega. Require Import Metalib.CoqUniquenessTac. Hint Resolve eq_nat_dec : eq_dec. Scheme le_ind' := Induction for le Sort Prop. Lemma le_unique : forall (x y : nat) (p q: x <= y), p = q. Proof. (* Goal: forall (x y : nat) (p q : le x y), @eq (le x y) p q *) induction p using le_ind'; uniqueness 1; assert False by omega; intuition. Qed. 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. Inductive vector (A : Type) : nat -> Type := | vnil : vector A 0 | vcons : forall (n : nat) (a : A), vector A n -> vector A (S n). Theorem vector_O_eq : forall (A : Type) (v : vector A 0), v = vnil _. Proof. (* Goal: forall (A : Type) (v : vector A O), @eq (vector A O) v (vnil A) *) intros. (* Goal: @eq (vector A O) v (vnil A) *) uniqueness 1. Qed.
Require Import Ensembles. Require Import Laws. Require Import Group_definitions. Require Import gr. Require Import g1. Theorem auxsub : forall (H : Group U) (x : U), subgroup U H Gr -> In U (G_ U H) x -> In U G x. Proof. (* Goal: forall (H : Group U) (x : U) (_ : subgroup U H Gr) (_ : In U (G_ U H) x), In U G x *) intros H x H'; elim H'; auto with sets. Qed. Section Trois. Variable H K : Group U. Variable subH : subgroup U H Gr. Variable subK : subgroup U K Gr. Inductive Prod : Ensemble U := Definition_of_Prod : forall x y z : U, In U (G_ U H) x -> In U (G_ U K) y -> star x y = z -> In U Prod z. End Trois. Section Quatre. Variable H K : Group U. Variable subH : subgroup U H Gr. Variable subK : subgroup U K Gr. Theorem T4 : Same_set U (Prod H K) (Prod K H) -> Setsubgroup U (Prod H K) Gr. Proof. (* Goal: forall _ : Same_set U (Prod H K) (Prod K H), Setsubgroup U (Prod H K) Gr *) generalize (auxsub H); intro tH; generalize (auxsub K); intro tK. (* Goal: forall _ : Same_set U (Prod H K) (Prod K H), Setsubgroup U (Prod H K) Gr *) intro H'. (* Goal: Setsubgroup U (Prod H K) Gr *) apply T_1_6_3 with (witness := e); auto with sets. (* Goal: forall (a b : U) (_ : In U (Prod H K) a) (_ : In U (Prod H K) b), In U (Prod H K) (star a (inv b)) *) (* Goal: Included U (Prod H K) G *) (* Goal: In U (Prod H K) e *) rewrite <- (G2c' e); auto with sets. (* Goal: forall (a b : U) (_ : In U (Prod H K) a) (_ : In U (Prod H K) b), In U (Prod H K) (star a (inv b)) *) (* Goal: Included U (Prod H K) G *) (* Goal: In U (Prod H K) (star e e) *) apply Definition_of_Prod with (x := e) (y := e); auto with sets. (* Goal: forall (a b : U) (_ : In U (Prod H K) a) (_ : In U (Prod H K) b), In U (Prod H K) (star a (inv b)) *) (* Goal: Included U (Prod H K) G *) (* Goal: In U (G_ U K) e *) (* Goal: In U (G_ U H) e *) rewrite <- (eh_is_e H); auto with sets. (* Goal: forall (a b : U) (_ : In U (Prod H K) a) (_ : In U (Prod H K) b), In U (Prod H K) (star a (inv b)) *) (* Goal: Included U (Prod H K) G *) (* Goal: In U (G_ U K) e *) rewrite <- (eh_is_e K); auto with sets. (* Goal: forall (a b : U) (_ : In U (Prod H K) a) (_ : In U (Prod H K) b), In U (Prod H K) (star a (inv b)) *) (* Goal: Included U (Prod H K) G *) red in |- *. (* Goal: forall (a b : U) (_ : In U (Prod H K) a) (_ : In U (Prod H K) b), In U (Prod H K) (star a (inv b)) *) (* Goal: forall (x : U) (_ : In U (Prod H K) x), In U G x *) intros x H'0; elim H'0. (* Goal: forall (a b : U) (_ : In U (Prod H K) a) (_ : In U (Prod H K) b), In U (Prod H K) (star a (inv b)) *) (* Goal: forall (x y z : U) (_ : In U (G_ U H) x) (_ : In U (G_ U K) y) (_ : @eq U (star x y) z), In U G z *) intros x0 y z H'1 H'2 H'3; rewrite <- H'3; auto with sets. (* Goal: forall (a b : U) (_ : In U (Prod H K) a) (_ : In U (Prod H K) b), In U (Prod H K) (star a (inv b)) *) intros a b H'0 H'1. (* Goal: In U (Prod H K) (star a (inv b)) *) generalize H'1; clear H'1. (* Goal: forall _ : In U (Prod H K) b, In U (Prod H K) (star a (inv b)) *) elim H'0. (* Goal: forall (x y z : U) (_ : In U (G_ U H) x) (_ : In U (G_ U K) y) (_ : @eq U (star x y) z) (_ : In U (Prod H K) b), In U (Prod H K) (star z (inv b)) *) intros x y z H'1 H'2 H'3; rewrite <- H'3. (* Goal: forall _ : In U (Prod H K) b, In U (Prod H K) (star (star x y) (inv b)) *) intro H'4; elim H'4. (* Goal: forall (x0 y0 z : U) (_ : In U (G_ U H) x0) (_ : In U (G_ U K) y0) (_ : @eq U (star x0 y0) z), In U (Prod H K) (star (star x y) (inv z)) *) intros x0 y0 z0 H'5 H'6 H'7; rewrite <- H'7. (* Goal: In U (Prod H K) (star (star x y) (inv (star x0 y0))) *) rewrite <- (inv_star' x0 y0); auto with sets. (* Goal: In U (Prod H K) (star (star x y) (star (inv y0) (inv x0))) *) rewrite <- (G1' x y (star (inv y0) (inv x0))); auto with sets. (* Goal: In U (Prod H K) (star x (star y (star (inv y0) (inv x0)))) *) red in H'. (* Goal: In U (Prod H K) (star x (star y (star (inv y0) (inv x0)))) *) elim H'; intros H'8 H'9; red in H'9; clear H'. (* Goal: In U (Prod H K) (star x (star y (star (inv y0) (inv x0)))) *) rewrite (G1' y (inv y0) (inv x0)); auto with sets. (* Goal: In U (Prod H K) (star x (star (star y (inv y0)) (inv x0))) *) lapply (H'9 (star (star y (inv y0)) (inv x0))); [ intro H'10; elim H'10 | idtac ]. (* Goal: In U (Prod K H) (star (star y (inv y0)) (inv x0)) *) (* Goal: forall (x0 y z : U) (_ : In U (G_ U H) x0) (_ : In U (G_ U K) y) (_ : @eq U (star x0 y) z), In U (Prod H K) (star x z) *) intros x1 y1 z1 H' H'11 H'12; rewrite <- H'12. (* Goal: In U (Prod K H) (star (star y (inv y0)) (inv x0)) *) (* Goal: In U (Prod H K) (star x (star x1 y1)) *) rewrite (G1' x x1 y1); auto with sets. (* Goal: In U (Prod K H) (star (star y (inv y0)) (inv x0)) *) (* Goal: In U (Prod H K) (star (star x x1) y1) *) apply Definition_of_Prod with (x := star x x1) (y := y1); auto with sets. (* Goal: In U (Prod K H) (star (star y (inv y0)) (inv x0)) *) (* Goal: In U (G_ U H) (star x x1) *) rewrite <- (starH_is_star H); auto with sets. (* Goal: In U (Prod K H) (star (star y (inv y0)) (inv x0)) *) apply Definition_of_Prod with (x := star y (inv y0)) (y := inv x0). (* Goal: @eq U (star (star y (inv y0)) (inv x0)) (star (star y (inv y0)) (inv x0)) *) (* Goal: In U (G_ U H) (inv x0) *) (* Goal: In U (G_ U K) (star y (inv y0)) *) rewrite <- (starH_is_star K); auto with sets. (* Goal: @eq U (star (star y (inv y0)) (inv x0)) (star (star y (inv y0)) (inv x0)) *) (* Goal: In U (G_ U H) (inv x0) *) (* Goal: In U (G_ U K) (star_ U K y (inv y0)) *) rewrite <- (invH_is_inv K); auto with sets. (* Goal: @eq U (star (star y (inv y0)) (inv x0)) (star (star y (inv y0)) (inv x0)) *) (* Goal: In U (G_ U H) (inv x0) *) rewrite <- (invH_is_inv H); auto with sets. (* Goal: @eq U (star (star y (inv y0)) (inv x0)) (star (star y (inv y0)) (inv x0)) *) trivial with sets. Qed. Proof. generalize (auxsub H); intro tH; generalize (auxsub K); intro tK. intro H'. apply T_1_6_3 with (witness := e); auto with sets. rewrite <- (G2c' e); auto with sets. apply Definition_of_Prod with (x := e) (y := e); auto with sets. rewrite <- (eh_is_e H); auto with sets. rewrite <- (eh_is_e K); auto with sets. red in |- *. intros x H'0; elim H'0. intros x0 y z H'1 H'2 H'3; rewrite <- H'3; auto with sets. intros a b H'0 H'1. generalize H'1; clear H'1. elim H'0. intros x y z H'1 H'2 H'3; rewrite <- H'3. intro H'4; elim H'4. intros x0 y0 z0 H'5 H'6 H'7; rewrite <- H'7. rewrite <- (inv_star' x0 y0); auto with sets. rewrite <- (G1' x y (star (inv y0) (inv x0))); auto with sets. red in H'. elim H'; intros H'8 H'9; red in H'9; clear H'. rewrite (G1' y (inv y0) (inv x0)); auto with sets. lapply (H'9 (star (star y (inv y0)) (inv x0))); [ intro H'10; elim H'10 | idtac ]. intros x1 y1 z1 H' H'11 H'12; rewrite <- H'12. rewrite (G1' x x1 y1); auto with sets. apply Definition_of_Prod with (x := star x x1) (y := y1); auto with sets. rewrite <- (starH_is_star H); auto with sets. apply Definition_of_Prod with (x := star y (inv y0)) (y := inv x0). Theorem T4R : Setsubgroup U (Prod H K) Gr -> Included U (Prod H K) (Prod K H). Proof. (* Goal: forall _ : Setsubgroup U (Prod H K) Gr, Included U (Prod H K) (Prod K H) *) generalize (auxsub H); intro tH; generalize (auxsub K); intro tK. (* Goal: forall _ : Setsubgroup U (Prod H K) Gr, Included U (Prod H K) (Prod K H) *) intro H'; elim H'. (* Goal: forall (x : Group U) (_ : and (subgroup U x Gr) (@eq (Ensemble U) (G_ U x) (Prod H K))), Included U (Prod H K) (Prod K H) *) intros x H'0; red in |- *. (* Goal: forall (x : U) (_ : In U (Prod H K) x), In U (Prod K H) x *) intros x0 H'1. (* Goal: In U (Prod K H) x0 *) elim H'0; intros L1 L2; clear H'0. (* Goal: In U (Prod K H) x0 *) generalize (auxsub x); intro tx. (* Goal: In U (Prod K H) x0 *) cut (exists t : U, In U (Prod H K) t /\ t = inv x0). (* Goal: @ex U (fun t : U => and (In U (Prod H K) t) (@eq U t (inv x0))) *) (* Goal: forall _ : @ex U (fun t : U => and (In U (Prod H K) t) (@eq U t (inv x0))), In U (Prod K H) x0 *) intro H'2; elim H'2. (* Goal: @ex U (fun t : U => and (In U (Prod H K) t) (@eq U t (inv x0))) *) (* Goal: forall (x : U) (_ : and (In U (Prod H K) x) (@eq U x (inv x0))), In U (Prod K H) x0 *) intros x1 H'3; elim H'3; intros H'4 H'5; try exact H'4; clear H'3. (* Goal: @ex U (fun t : U => and (In U (Prod H K) t) (@eq U t (inv x0))) *) (* Goal: In U (Prod K H) x0 *) generalize H'5. (* Goal: @ex U (fun t : U => and (In U (Prod H K) t) (@eq U t (inv x0))) *) (* Goal: forall _ : @eq U x1 (inv x0), In U (Prod K H) x0 *) elim H'4. (* Goal: @ex U (fun t : U => and (In U (Prod H K) t) (@eq U t (inv x0))) *) (* Goal: forall (x y z : U) (_ : In U (G_ U H) x) (_ : In U (G_ U K) y) (_ : @eq U (star x y) z) (_ : @eq U z (inv x0)), In U (Prod K H) x0 *) intros x2 y z H'3 H'6 H'7; rewrite <- H'7. (* Goal: @ex U (fun t : U => and (In U (Prod H K) t) (@eq U t (inv x0))) *) (* Goal: forall _ : @eq U (star x2 y) (inv x0), In U (Prod K H) x0 *) intro H'8. (* Goal: @ex U (fun t : U => and (In U (Prod H K) t) (@eq U t (inv x0))) *) (* Goal: In U (Prod K H) x0 *) rewrite (inv_involution' x0); auto with sets. (* Goal: @ex U (fun t : U => and (In U (Prod H K) t) (@eq U t (inv x0))) *) (* Goal: In U (Prod K H) (inv (inv x0)) *) rewrite <- H'8. (* Goal: @ex U (fun t : U => and (In U (Prod H K) t) (@eq U t (inv x0))) *) (* Goal: In U (Prod K H) (inv (star x2 y)) *) rewrite <- (inv_star' x2 y); auto with sets. (* Goal: @ex U (fun t : U => and (In U (Prod H K) t) (@eq U t (inv x0))) *) (* Goal: In U (Prod K H) (star (inv y) (inv x2)) *) apply Definition_of_Prod with (x := inv y) (y := inv x2); auto with sets. (* Goal: @ex U (fun t : U => and (In U (Prod H K) t) (@eq U t (inv x0))) *) (* Goal: In U (G_ U H) (inv x2) *) (* Goal: In U (G_ U K) (inv y) *) rewrite <- (invH_is_inv K subK y); auto with sets. (* Goal: @ex U (fun t : U => and (In U (Prod H K) t) (@eq U t (inv x0))) *) (* Goal: In U (G_ U H) (inv x2) *) rewrite <- (invH_is_inv H subH x2); auto with sets. (* Goal: @ex U (fun t : U => and (In U (Prod H K) t) (@eq U t (inv x0))) *) generalize H'1. (* Goal: forall _ : In U (Prod H K) x0, @ex U (fun t : U => and (In U (Prod H K) t) (@eq U t (inv x0))) *) rewrite <- L2; auto with sets. (* Goal: forall _ : In U (G_ U x) x0, @ex U (fun t : U => and (In U (G_ U x) t) (@eq U t (inv x0))) *) intro H'0. (* Goal: @ex U (fun t : U => and (In U (G_ U x) t) (@eq U t (inv x0))) *) apply ex_intro with (x := inv x0). (* Goal: and (In U (G_ U x) (inv x0)) (@eq U (inv x0) (inv x0)) *) split; [ idtac | trivial with sets ]. (* Goal: In U (G_ U x) (inv x0) *) rewrite <- (invH_is_inv x L1 x0); auto with sets. Qed. Proof. generalize (auxsub H); intro tH; generalize (auxsub K); intro tK. intro H'; elim H'. intros x H'0; red in |- *. intros x0 H'1. elim H'0; intros L1 L2; clear H'0. generalize (auxsub x); intro tx. cut (exists t : U, In U (Prod H K) t /\ t = inv x0). intro H'2; elim H'2. intros x1 H'3; elim H'3; intros H'4 H'5; try exact H'4; clear H'3. generalize H'5. elim H'4. intros x2 y z H'3 H'6 H'7; rewrite <- H'7. intro H'8. rewrite (inv_involution' x0); auto with sets. rewrite <- H'8. rewrite <- (inv_star' x2 y); auto with sets. apply Definition_of_Prod with (x := inv y) (y := inv x2); auto with sets. Theorem T4R1 : Setsubgroup U (Prod H K) Gr -> Included U (Prod K H) (Prod H K). Proof. (* Goal: forall _ : Setsubgroup U (Prod H K) Gr, Included U (Prod K H) (Prod H K) *) generalize (auxsub H); intro tH; generalize (auxsub K); intro tK. (* Goal: forall _ : Setsubgroup U (Prod H K) Gr, Included U (Prod K H) (Prod H K) *) intro H'; elim H'. (* Goal: forall (x : Group U) (_ : and (subgroup U x Gr) (@eq (Ensemble U) (G_ U x) (Prod H K))), Included U (Prod K H) (Prod H K) *) intros x H'0; red in |- *. (* Goal: forall (x : U) (_ : In U (Prod K H) x), In U (Prod H K) x *) intros x0 H'1. (* Goal: In U (Prod H K) x0 *) elim H'0; intros L1 L2; clear H'0. (* Goal: In U (Prod H K) x0 *) generalize (auxsub x); intro tx. (* Goal: In U (Prod H K) x0 *) cut (exists t : U, In U (Prod K H) t /\ t = inv (inv x0)). (* Goal: @ex U (fun t : U => and (In U (Prod K H) t) (@eq U t (inv (inv x0)))) *) (* Goal: forall _ : @ex U (fun t : U => and (In U (Prod K H) t) (@eq U t (inv (inv x0)))), In U (Prod H K) x0 *) intro H'0; elim H'0. (* Goal: @ex U (fun t : U => and (In U (Prod K H) t) (@eq U t (inv (inv x0)))) *) (* Goal: forall (x : U) (_ : and (In U (Prod K H) x) (@eq U x (inv (inv x0)))), In U (Prod H K) x0 *) intros x1 H'2. (* Goal: @ex U (fun t : U => and (In U (Prod K H) t) (@eq U t (inv (inv x0)))) *) (* Goal: In U (Prod H K) x0 *) elim H'2; intros H'3 H'4; generalize H'4; clear H'2. (* Goal: @ex U (fun t : U => and (In U (Prod K H) t) (@eq U t (inv (inv x0)))) *) (* Goal: forall _ : @eq U x1 (inv (inv x0)), In U (Prod H K) x0 *) elim H'3. (* Goal: @ex U (fun t : U => and (In U (Prod K H) t) (@eq U t (inv (inv x0)))) *) (* Goal: forall (x y z : U) (_ : In U (G_ U K) x) (_ : In U (G_ U H) y) (_ : @eq U (star x y) z) (_ : @eq U z (inv (inv x0))), In U (Prod H K) x0 *) intros x2 y z H'2 H'5 H'6; rewrite <- H'6. (* Goal: @ex U (fun t : U => and (In U (Prod K H) t) (@eq U t (inv (inv x0)))) *) (* Goal: forall _ : @eq U (star x2 y) (inv (inv x0)), In U (Prod H K) x0 *) intro H'7. (* Goal: @ex U (fun t : U => and (In U (Prod K H) t) (@eq U t (inv (inv x0)))) *) (* Goal: In U (Prod H K) x0 *) rewrite (inv_involution' x0). (* Goal: @ex U (fun t : U => and (In U (Prod K H) t) (@eq U t (inv (inv x0)))) *) (* Goal: In U (Prod H K) (inv (inv x0)) *) rewrite <- H'7. (* Goal: @ex U (fun t : U => and (In U (Prod K H) t) (@eq U t (inv (inv x0)))) *) (* Goal: In U (Prod H K) (star x2 y) *) rewrite (inv_involution' (star x2 y)). (* Goal: @ex U (fun t : U => and (In U (Prod K H) t) (@eq U t (inv (inv x0)))) *) (* Goal: In U (Prod H K) (inv (inv (star x2 y))) *) rewrite <- (inv_star' x2 y). (* Goal: @ex U (fun t : U => and (In U (Prod K H) t) (@eq U t (inv (inv x0)))) *) (* Goal: In U (Prod H K) (inv (star (inv y) (inv x2))) *) rewrite <- (invH_is_inv x L1 (star (inv y) (inv x2))). (* Goal: @ex U (fun t : U => and (In U (Prod K H) t) (@eq U t (inv (inv x0)))) *) (* Goal: In U (G_ U x) (star (inv y) (inv x2)) *) (* Goal: In U (Prod H K) (inv_ U x (star (inv y) (inv x2))) *) rewrite <- L2; auto with sets. (* Goal: @ex U (fun t : U => and (In U (Prod K H) t) (@eq U t (inv (inv x0)))) *) (* Goal: In U (G_ U x) (star (inv y) (inv x2)) *) (* Goal: In U (G_ U x) (inv_ U x (star (inv y) (inv x2))) *) elim L1; simpl in |- *; auto with sets. (* Goal: @ex U (fun t : U => and (In U (Prod K H) t) (@eq U t (inv (inv x0)))) *) (* Goal: In U (G_ U x) (star (inv y) (inv x2)) *) (* Goal: forall (_ : Included U (G_ U x) (G_ U Gr)) (_ : @eq (forall (_ : U) (_ : U), U) (star_ U x) (star_ U Gr)), In U (G_ U x) (inv_ U x (star (inv y) (inv x2))) *) intros H'15 H'16; apply (G3a_ U x); auto with sets. (* Goal: @ex U (fun t : U => and (In U (Prod K H) t) (@eq U t (inv (inv x0)))) *) (* Goal: In U (G_ U x) (star (inv y) (inv x2)) *) (* Goal: In U (G_ U x) (star (inv y) (inv x2)) *) rewrite L2. (* Goal: @ex U (fun t : U => and (In U (Prod K H) t) (@eq U t (inv (inv x0)))) *) (* Goal: In U (G_ U x) (star (inv y) (inv x2)) *) (* Goal: In U (Prod H K) (star (inv y) (inv x2)) *) apply Definition_of_Prod with (x := inv y) (y := inv x2); auto with sets. (* Goal: @ex U (fun t : U => and (In U (Prod K H) t) (@eq U t (inv (inv x0)))) *) (* Goal: In U (G_ U x) (star (inv y) (inv x2)) *) (* Goal: In U (G_ U K) (inv x2) *) (* Goal: In U (G_ U H) (inv y) *) rewrite <- (invH_is_inv H subH y); auto with sets. (* Goal: @ex U (fun t : U => and (In U (Prod K H) t) (@eq U t (inv (inv x0)))) *) (* Goal: In U (G_ U x) (star (inv y) (inv x2)) *) (* Goal: In U (G_ U K) (inv x2) *) rewrite <- (invH_is_inv K subK x2); auto with sets. (* Goal: @ex U (fun t : U => and (In U (Prod K H) t) (@eq U t (inv (inv x0)))) *) (* Goal: In U (G_ U x) (star (inv y) (inv x2)) *) rewrite L2. (* Goal: @ex U (fun t : U => and (In U (Prod K H) t) (@eq U t (inv (inv x0)))) *) (* Goal: In U (Prod H K) (star (inv y) (inv x2)) *) apply Definition_of_Prod with (x := inv y) (y := inv x2); auto with sets. (* Goal: @ex U (fun t : U => and (In U (Prod K H) t) (@eq U t (inv (inv x0)))) *) (* Goal: In U (G_ U K) (inv x2) *) (* Goal: In U (G_ U H) (inv y) *) rewrite <- (invH_is_inv H subH y); auto with sets. (* Goal: @ex U (fun t : U => and (In U (Prod K H) t) (@eq U t (inv (inv x0)))) *) (* Goal: In U (G_ U K) (inv x2) *) rewrite <- (invH_is_inv K subK x2); auto with sets. (* Goal: @ex U (fun t : U => and (In U (Prod K H) t) (@eq U t (inv (inv x0)))) *) elim H'1; intros x3 y0 z0 H'8 H'9 H'10; rewrite <- H'10. (* Goal: @ex U (fun t : U => and (In U (Prod K H) t) (@eq U t (inv (inv (star x3 y0))))) *) apply ex_intro with (x := star x3 y0). (* Goal: and (In U (Prod K H) (star x3 y0)) (@eq U (star x3 y0) (inv (inv (star x3 y0)))) *) split; [ idtac | auto with sets ]. (* Goal: In U (Prod K H) (star x3 y0) *) apply Definition_of_Prod with (x := x3) (y := y0); trivial with sets. Qed. Proof. generalize (auxsub H); intro tH; generalize (auxsub K); intro tK. intro H'; elim H'. intros x H'0; red in |- *. intros x0 H'1. elim H'0; intros L1 L2; clear H'0. generalize (auxsub x); intro tx. cut (exists t : U, In U (Prod K H) t /\ t = inv (inv x0)). intro H'0; elim H'0. intros x1 H'2. elim H'2; intros H'3 H'4; generalize H'4; clear H'2. elim H'3. intros x2 y z H'2 H'5 H'6; rewrite <- H'6. intro H'7. rewrite (inv_involution' x0). rewrite <- H'7. rewrite (inv_involution' (star x2 y)). rewrite <- (inv_star' x2 y). rewrite <- (invH_is_inv x L1 (star (inv y) (inv x2))). rewrite <- L2; auto with sets. elim L1; simpl in |- *; auto with sets. intros H'15 H'16; apply (G3a_ U x); auto with sets. rewrite L2. apply Definition_of_Prod with (x := inv y) (y := inv x2); auto with sets. rewrite <- (invH_is_inv H subH y); auto with sets. rewrite <- (invH_is_inv K subK x2); auto with sets. rewrite L2. apply Definition_of_Prod with (x := inv y) (y := inv x2); auto with sets. rewrite <- (invH_is_inv H subH y); auto with sets. rewrite <- (invH_is_inv K subK x2); auto with sets. elim H'1; intros x3 y0 z0 H'8 H'9 H'10; rewrite <- H'10. apply ex_intro with (x := star x3 y0). split; [ idtac | auto with sets ]. apply Definition_of_Prod with (x := x3) (y := y0); trivial with sets. Hint Resolve T4 T4R T4R1. Theorem T_1_6_8 : Same_set U (Prod H K) (Prod K H) <-> Setsubgroup U (Prod H K) Gr. Proof. (* Goal: iff (Same_set U (Prod H K) (Prod K H)) (Setsubgroup U (Prod H K) Gr) *) red in |- *; auto with sets. Qed. End Quatre.
Require Import Ensembles. Require Import Zbase. Require Import Z_succ_pred. Require Import Zadd. Require Import Zle. Require Import Classical_Prop. Require Import Relations_1. Require Import Relations_1_facts. Require Import Partial_Order. Require Import Cpo. Require Import Powerset. Require Import Powerset_facts. Require Import Gt. Require Import Lt. Require Import Compare. Require Import Arith. Require Import Finite_sets. Require Import Finite_sets_facts. Require Import Image. Require Import Infinite_sets. Require Import Integers. Require Import Laws. Require Import Group_definitions. Require Export gr. Require Export g1. Section Cinq. Variable H : Ensemble U. Variable H_inhabited : Inhabited U H. Variable H_included_in_G : Included U H G. Variable stability : endo_operation U H star. Variable H_Finite : Finite U H. Let h : forall x y : U, In U H x -> In U H y -> In U H (star x y). Proof. (* Goal: forall (x y : U) (_ : In U H x) (_ : In U H y), In U H (star x y) *) auto. Qed. Hint Resolve h. Definition phi (a : U) (n : nat) : U := exp (pos n) a. Lemma phi_unfold : forall (a : U) (n : nat), In U G a -> phi a (S n) = star a (phi a n). Proof. (* Goal: forall (a : U) (n : nat) (_ : In U G a), @eq U (phi a (S n)) (star a (phi a n)) *) unfold phi in |- *; auto. Qed. Lemma positive_powers : forall (a : U) (n : nat), In U H a -> In U H (phi a n). Proof. (* Goal: forall (a : U) (n : nat) (_ : In U H a), In U H (phi a n) *) intros a n; elim n; auto. (* Goal: forall (n : nat) (_ : forall _ : In U H a, In U H (phi a n)) (_ : In U H a), In U H (phi a (S n)) *) intros n0 H' H'0. (* Goal: In U H (phi a (S n0)) *) rewrite (phi_unfold a n0); auto. Qed. Lemma tech_exp : forall (a : U) (n : nat), In U G a -> star (phi a n) a = phi a (S n). Proof. (* Goal: forall (a : U) (n : nat) (_ : In U G a), @eq U (star (phi a n) a) (phi a (S n)) *) intros a n; elim n; auto. (* Goal: forall (n : nat) (_ : forall _ : In U G a, @eq U (star (phi a n) a) (phi a (S n))) (_ : In U G a), @eq U (star (phi a (S n)) a) (phi a (S (S n))) *) intros n0 H' H'0. (* Goal: @eq U (star (phi a (S n0)) a) (phi a (S (S n0))) *) rewrite (phi_unfold a n0); auto. (* Goal: @eq U (star (star a (phi a n0)) a) (phi a (S (S n0))) *) rewrite <- (G1' a (phi a n0) a). (* Goal: @eq U (star a (star (phi a n0) a)) (phi a (S (S n0))) *) rewrite H'; auto. Qed. Lemma tech_exp' : forall n : nat, phi e n = e. Proof. (* Goal: forall n : nat, @eq U (phi e n) e *) intro n; elim n; auto. (* Goal: forall (n : nat) (_ : @eq U (phi e n) e), @eq U (phi e (S n)) e *) intros n0 H'. (* Goal: @eq U (phi e (S n0)) e *) rewrite <- (tech_exp e n0); auto. (* Goal: @eq U (star (phi e n0) e) e *) rewrite H'; auto. Qed. Lemma phi_exp : forall (a : U) (n m : nat), In U G a -> star (phi a n) (phi a m) = phi a (S (n + m)). Proof. (* Goal: forall (a : U) (n m : nat) (_ : In U G a), @eq U (star (phi a n) (phi a m)) (phi a (S (Init.Nat.add n m))) *) unfold phi in |- *. (* Goal: forall (a : U) (n m : nat) (_ : In U G a), @eq U (star (exp (pos n) a) (exp (pos m) a)) (exp (pos (S (Init.Nat.add n m))) a) *) intros a n m H'. (* Goal: @eq U (star (exp (pos n) a) (exp (pos m) a)) (exp (pos (S (Init.Nat.add n m))) a) *) rewrite (add_exponents a (pos n) (pos m)); trivial. (* Goal: @eq U (exp (addZ (pos n) (pos m)) a) (exp (pos (S (Init.Nat.add n m))) a) *) rewrite (tech_add_pos_posZ n m); trivial. Qed. Lemma powers_repeat : forall (a : U) (n m : nat), In U G a -> phi a n = phi a (S (S (n + m))) -> phi a m = inv a. Proof. (* Goal: forall (a : U) (n m : nat) (_ : In U G a) (_ : @eq U (phi a n) (phi a (S (S (Init.Nat.add n m))))), @eq U (phi a m) (inv a) *) intros a n m H' H'0. (* Goal: @eq U (phi a m) (inv a) *) apply resolve'. (* Goal: @eq U (star (phi a m) a) e *) apply cancellation' with (a := phi a n). (* Goal: @eq U (star (phi a n) (star (phi a m) a)) (phi a n) *) rewrite (tech_exp a m); trivial. (* Goal: @eq U (star (phi a n) (phi a (S m))) (phi a n) *) rewrite (phi_exp a n (S m)); trivial. (* Goal: @eq U (phi a (S (Init.Nat.add n (S m)))) (phi a n) *) rewrite <- (plus_n_Sm n m); auto. Qed. Definition psi := phi. Lemma psi_not_inj : forall a : U, In U H a -> ~ injective nat U (psi a). Proof. (* Goal: forall (a : U) (_ : In U H a), not (injective nat U (psi a)) *) intros a H'; try assumption. (* Goal: not (injective nat U (psi a)) *) apply Pigeonhole_bis with (A := Integers). (* Goal: Finite U (Im nat U Integers (psi a)) *) (* Goal: not (Finite nat Integers) *) exact Integers_infinite. (* Goal: Finite U (Im nat U Integers (psi a)) *) apply Finite_downward_closed with (A := H); auto. (* Goal: Included U (Im nat U Integers (psi a)) H *) red in |- *. (* Goal: forall (x : U) (_ : In U (Im nat U Integers (psi a)) x), In U H x *) intros x H'0; elim H'0. (* Goal: forall (x : nat) (_ : In nat Integers x) (y : U) (_ : @eq U y (psi a x)), In U H y *) intro x0. (* Goal: forall (_ : In nat Integers x0) (y : U) (_ : @eq U y (psi a x0)), In U H y *) intros H'1 y H'2; rewrite H'2. (* Goal: In U H (psi a x0) *) unfold psi at 1 in |- *; simpl in |- *. (* Goal: In U H (phi a x0) *) apply positive_powers; auto. Qed. Theorem remaining : forall a : U, In U H a -> exists r : nat, (exists m : nat, phi a r = phi a (S (S (r + m)))). Theorem T_1_6_4 : Setsubgroup U H Gr. Proof. (* Goal: Setsubgroup U H Gr *) elim H_inhabited. (* Goal: forall (x : U) (_ : In U H x), Setsubgroup U H Gr *) intros witness inH. (* Goal: Setsubgroup U H Gr *) apply T_1_6_2 with (witness := witness); trivial. (* Goal: endo_function U H inv *) red in |- *. (* Goal: forall (x : U) (_ : In U H x), In U H (inv x) *) intros a H'. (* Goal: In U H (inv a) *) cut (exists n : nat, inv a = phi a n). (* Goal: @ex nat (fun n : nat => @eq U (inv a) (phi a n)) *) (* Goal: forall _ : @ex nat (fun n : nat => @eq U (inv a) (phi a n)), In U H (inv a) *) intro H'0; elim H'0; intros n E; rewrite E; clear H'0. (* Goal: @ex nat (fun n : nat => @eq U (inv a) (phi a n)) *) (* Goal: In U H (phi a n) *) apply positive_powers; trivial. (* Goal: @ex nat (fun n : nat => @eq U (inv a) (phi a n)) *) cut (exists r : nat, ex (fun m : nat => phi a r = phi a (S (S (r + m))))). (* Goal: @ex nat (fun r : nat => @ex nat (fun m : nat => @eq U (phi a r) (phi a (S (S (Init.Nat.add r m)))))) *) (* Goal: forall _ : @ex nat (fun r : nat => @ex nat (fun m : nat => @eq U (phi a r) (phi a (S (S (Init.Nat.add r m)))))), @ex nat (fun n : nat => @eq U (inv a) (phi a n)) *) intro H'0; elim H'0; intros r E; elim E; intros m E0; try exact E0; clear E H'0. (* Goal: @ex nat (fun r : nat => @ex nat (fun m : nat => @eq U (phi a r) (phi a (S (S (Init.Nat.add r m)))))) *) (* Goal: @ex nat (fun n : nat => @eq U (inv a) (phi a n)) *) cut (inv a = phi a m). (* Goal: @ex nat (fun r : nat => @ex nat (fun m : nat => @eq U (phi a r) (phi a (S (S (Init.Nat.add r m)))))) *) (* Goal: @eq U (inv a) (phi a m) *) (* Goal: forall _ : @eq U (inv a) (phi a m), @ex nat (fun n : nat => @eq U (inv a) (phi a n)) *) intro H'0; rewrite H'0. (* Goal: @ex nat (fun r : nat => @ex nat (fun m : nat => @eq U (phi a r) (phi a (S (S (Init.Nat.add r m)))))) *) (* Goal: @eq U (inv a) (phi a m) *) (* Goal: @ex nat (fun n : nat => @eq U (phi a m) (phi a n)) *) exists m; trivial. (* Goal: @ex nat (fun r : nat => @ex nat (fun m : nat => @eq U (phi a r) (phi a (S (S (Init.Nat.add r m)))))) *) (* Goal: @eq U (inv a) (phi a m) *) symmetry in |- *. (* Goal: @ex nat (fun r : nat => @ex nat (fun m : nat => @eq U (phi a r) (phi a (S (S (Init.Nat.add r m)))))) *) (* Goal: @eq U (phi a m) (inv a) *) apply powers_repeat with (n := r); trivial. (* Goal: @ex nat (fun r : nat => @ex nat (fun m : nat => @eq U (phi a r) (phi a (S (S (Init.Nat.add r m)))))) *) (* Goal: In U G a *) apply H_included_in_G; auto. (* Goal: @ex nat (fun r : nat => @ex nat (fun m : nat => @eq U (phi a r) (phi a (S (S (Init.Nat.add r m)))))) *) apply remaining; auto. Qed. End Cinq.
Require Import Decidable DecidableTypeEx FSetFacts Setoid. Module WDecide_fun (E : DecidableType)(Import M : WSfun E). Module F := FSetFacts.WFacts_fun E M. Module FSetLogicalFacts. Export Decidable. Export Setoid. Tactic Notation "fold" "any" "not" := repeat ( match goal with | H: context [?P -> False] |- _ => fold (~ P) in H | |- context [?P -> False] => fold (~ P) end). Ltac or_not_l_iff P Q tac := (rewrite (or_not_l_iff_1 P Q) by tac) || (rewrite (or_not_l_iff_2 P Q) by tac). Ltac or_not_r_iff P Q tac := (rewrite (or_not_r_iff_1 P Q) by tac) || (rewrite (or_not_r_iff_2 P Q) by tac). Ltac or_not_l_iff_in P Q H tac := (rewrite (or_not_l_iff_1 P Q) in H by tac) || (rewrite (or_not_l_iff_2 P Q) in H by tac). Ltac or_not_r_iff_in P Q H tac := (rewrite (or_not_r_iff_1 P Q) in H by tac) || (rewrite (or_not_r_iff_2 P Q) in H by tac). Tactic Notation "push" "not" "using" ident(db) := let dec := solve_decidable using db in unfold not, iff; repeat ( match goal with | |- context [True -> False] => rewrite not_true_iff | |- context [False -> False] => rewrite not_false_iff | |- context [(?P -> False) -> False] => rewrite (not_not_iff P) by dec | |- context [(?P -> False) -> (?Q -> False)] => rewrite (contrapositive P Q) by dec | |- context [(?P -> False) \/ ?Q] => or_not_l_iff P Q dec | |- context [?P \/ (?Q -> False)] => or_not_r_iff P Q dec | |- context [(?P -> False) -> ?Q] => rewrite (imp_not_l P Q) by dec | |- context [?P \/ ?Q -> False] => rewrite (not_or_iff P Q) | |- context [?P /\ ?Q -> False] => rewrite (not_and_iff P Q) | |- context [(?P -> ?Q) -> False] => rewrite (not_imp_iff P Q) by dec end); fold any not. Tactic Notation "push" "not" := push not using core. Tactic Notation "push" "not" "in" "*" "|-" "using" ident(db) := let dec := solve_decidable using db in unfold not, iff in * |-; repeat ( match goal with | H: context [True -> False] |- _ => rewrite not_true_iff in H | H: context [False -> False] |- _ => rewrite not_false_iff in H | H: context [(?P -> False) -> False] |- _ => rewrite (not_not_iff P) in H by dec | H: context [(?P -> False) -> (?Q -> False)] |- _ => rewrite (contrapositive P Q) in H by dec | H: context [(?P -> False) \/ ?Q] |- _ => or_not_l_iff_in P Q H dec | H: context [?P \/ (?Q -> False)] |- _ => or_not_r_iff_in P Q H dec | H: context [(?P -> False) -> ?Q] |- _ => rewrite (imp_not_l P Q) in H by dec | H: context [?P \/ ?Q -> False] |- _ => rewrite (not_or_iff P Q) in H | H: context [?P /\ ?Q -> False] |- _ => rewrite (not_and_iff P Q) in H | H: context [(?P -> ?Q) -> False] |- _ => rewrite (not_imp_iff P Q) in H by dec end); fold any not. Tactic Notation "push" "not" "in" "*" "|-" := push not in * |- using core. Tactic Notation "push" "not" "in" "*" "using" ident(db) := push not using db; push not in * |- using db. Tactic Notation "push" "not" "in" "*" := push not in * using core. Lemma test_push : forall P Q R : Prop, decidable P -> decidable Q -> (~ True) -> (~ False) -> (~ ~ P) -> (~ (P /\ Q) -> ~ R) -> ((P /\ Q) \/ ~ R) -> (~ (P /\ Q) \/ R) -> (R \/ ~ (P /\ Q)) -> (~ R \/ (P /\ Q)) -> (~ P -> R) -> (~ ((R -> P) \/ (Q -> R))) -> (~ (P /\ R)) -> (~ (P -> R)) -> True. Proof. (* Goal: forall (P Q R : Prop) (_ : decidable P) (_ : decidable Q) (_ : not True) (_ : not False) (_ : not (not P)) (_ : forall _ : not (and P Q), not R) (_ : or (and P Q) (not R)) (_ : or (not (and P Q)) R) (_ : or R (not (and P Q))) (_ : or (not R) (and P Q)) (_ : forall _ : not P, R) (_ : not (or (forall _ : R, P) (forall _ : Q, R))) (_ : not (and P R)) (_ : not (forall _ : P, R)), True *) intros. (* Goal: True *) push not in *. (* Goal: True *) tauto. Qed. Tactic Notation "pull" "not" "using" ident(db) := let dec := solve_decidable using db in unfold not, iff; repeat ( match goal with | |- context [True -> False] => rewrite not_true_iff | |- context [False -> False] => rewrite not_false_iff | |- context [(?P -> False) -> False] => rewrite (not_not_iff P) by dec | |- context [(?P -> False) -> (?Q -> False)] => rewrite (contrapositive P Q) by dec | |- context [(?P -> False) \/ ?Q] => or_not_l_iff P Q dec | |- context [?P \/ (?Q -> False)] => or_not_r_iff P Q dec | |- context [(?P -> False) -> ?Q] => rewrite (imp_not_l P Q) by dec | |- context [(?P -> False) /\ (?Q -> False)] => rewrite <- (not_or_iff P Q) | |- context [?P -> ?Q -> False] => rewrite <- (not_and_iff P Q) | |- context [?P /\ (?Q -> False)] => rewrite <- (not_imp_iff P Q) by dec | |- context [(?Q -> False) /\ ?P] => rewrite <- (not_imp_rev_iff P Q) by dec end); fold any not. Tactic Notation "pull" "not" := pull not using core. Tactic Notation "pull" "not" "in" "*" "|-" "using" ident(db) := let dec := solve_decidable using db in unfold not, iff in * |-; repeat ( match goal with | H: context [True -> False] |- _ => rewrite not_true_iff in H | H: context [False -> False] |- _ => rewrite not_false_iff in H | H: context [(?P -> False) -> False] |- _ => rewrite (not_not_iff P) in H by dec | H: context [(?P -> False) -> (?Q -> False)] |- _ => rewrite (contrapositive P Q) in H by dec | H: context [(?P -> False) \/ ?Q] |- _ => or_not_l_iff_in P Q H dec | H: context [?P \/ (?Q -> False)] |- _ => or_not_r_iff_in P Q H dec | H: context [(?P -> False) -> ?Q] |- _ => rewrite (imp_not_l P Q) in H by dec | H: context [(?P -> False) /\ (?Q -> False)] |- _ => rewrite <- (not_or_iff P Q) in H | H: context [?P -> ?Q -> False] |- _ => rewrite <- (not_and_iff P Q) in H | H: context [?P /\ (?Q -> False)] |- _ => rewrite <- (not_imp_iff P Q) in H by dec | H: context [(?Q -> False) /\ ?P] |- _ => rewrite <- (not_imp_rev_iff P Q) in H by dec end); fold any not. Tactic Notation "pull" "not" "in" "*" "|-" := pull not in * |- using core. Tactic Notation "pull" "not" "in" "*" "using" ident(db) := pull not using db; pull not in * |- using db. Tactic Notation "pull" "not" "in" "*" := pull not in * using core. Lemma test_pull : forall P Q R : Prop, decidable P -> decidable Q -> (~ True) -> (~ False) -> (~ ~ P) -> (~ (P /\ Q) -> ~ R) -> ((P /\ Q) \/ ~ R) -> (~ (P /\ Q) \/ R) -> (R \/ ~ (P /\ Q)) -> (~ R \/ (P /\ Q)) -> (~ P -> R) -> (~ (R -> P) /\ ~ (Q -> R)) -> (~ P \/ ~ R) -> (P /\ ~ R) -> (~ R /\ P) -> True. Proof. (* Goal: forall (P Q R : Prop) (_ : decidable P) (_ : decidable Q) (_ : not True) (_ : not False) (_ : not (not P)) (_ : forall _ : not (and P Q), not R) (_ : or (and P Q) (not R)) (_ : or (not (and P Q)) R) (_ : or R (not (and P Q))) (_ : or (not R) (and P Q)) (_ : forall _ : not P, R) (_ : and (not (forall _ : R, P)) (not (forall _ : Q, R))) (_ : or (not P) (not R)) (_ : and P (not R)) (_ : and (not R) P), True *) intros. (* Goal: True *) pull not in *. (* Goal: True *) tauto. Qed. End FSetLogicalFacts. Import FSetLogicalFacts. Module FSetDecideAuxiliary. Tactic Notation "if" tactic(t) "then" tactic(t1) "else" tactic(t2) := first [ t; first [ t1 | fail 2 ] | t2 ]. Tactic Notation "prop" constr(P) "holds" "by" tactic(t) := let H := fresh in assert P as H by t; clear H. Tactic Notation "assert" "new" constr(e) "by" tactic(t) := match goal with | H: e |- _ => fail 1 | _ => assert e by t end. Tactic Notation "subst" "++" := repeat ( match goal with | x : _ |- _ => subst x end); cbv zeta beta in *. Tactic Notation "decompose" "records" := repeat ( match goal with | H: _ |- _ => progress (decompose record H); clear H end). Inductive FSet_elt_Prop : Prop -> Prop := | eq_Prop : forall (S : Type) (x y : S), FSet_elt_Prop (x = y) | eq_elt_prop : forall x y, FSet_elt_Prop (E.eq x y) | In_elt_prop : forall x s, FSet_elt_Prop (In x s) | True_elt_prop : FSet_elt_Prop True | False_elt_prop : FSet_elt_Prop False | conj_elt_prop : forall P Q, FSet_elt_Prop P -> FSet_elt_Prop Q -> FSet_elt_Prop (P /\ Q) | disj_elt_prop : forall P Q, FSet_elt_Prop P -> FSet_elt_Prop Q -> FSet_elt_Prop (P \/ Q) | impl_elt_prop : forall P Q, FSet_elt_Prop P -> FSet_elt_Prop Q -> FSet_elt_Prop (P -> Q) | not_elt_prop : forall P, FSet_elt_Prop P -> FSet_elt_Prop (~ P). Inductive FSet_Prop : Prop -> Prop := | elt_FSet_Prop : forall P, FSet_elt_Prop P -> FSet_Prop P | Empty_FSet_Prop : forall s, FSet_Prop (Empty s) | Subset_FSet_Prop : forall s1 s2, FSet_Prop (Subset s1 s2) | Equal_FSet_Prop : forall s1 s2, FSet_Prop (Equal s1 s2). Hint Constructors FSet_elt_Prop FSet_Prop : FSet_Prop. Ltac discard_nonFSet := repeat ( match goal with | H : ?P |- _ => if prop (FSet_Prop P) holds by (auto 100 with FSet_Prop) then fail else clear H end). Hint Rewrite F.empty_iff F.singleton_iff F.add_iff F.remove_iff F.union_iff F.inter_iff F.diff_iff : set_simpl. Lemma dec_In : forall x s, decidable (In x s). Proof. (* Goal: None *) red; intros; generalize (F.mem_iff s x); case (mem x s); intuition. Qed. Lemma dec_eq : forall (x y : E.t), Proof. (* Goal: None *) red; intros x y; destruct (E.eq_dec x y); auto. Qed. Hint Resolve dec_In dec_eq : FSet_decidability. Ltac change_to_E_t := repeat ( match goal with | H : ?T |- _ => progress (change T with E.t in H); repeat ( match goal with | J : _ |- _ => progress (change T with E.t in J) | |- _ => progress (change T with E.t) end ) | H : forall x : ?T, _ |- _ => progress (change T with E.t in H); repeat ( match goal with | J : _ |- _ => progress (change T with E.t in J) | |- _ => progress (change T with E.t) end ) end). Ltac Logic_eq_to_E_eq := repeat ( match goal with | H: _ |- _ => progress (change (@Logic.eq E.t) with E.eq in H) | |- _ => progress (change (@Logic.eq E.t) with E.eq) end). Ltac E_eq_to_Logic_eq := repeat ( match goal with | H: _ |- _ => progress (change E.eq with (@Logic.eq E.t) in H) | |- _ => progress (change E.eq with (@Logic.eq E.t)) end). Ltac substFSet := repeat ( match goal with | H: E.eq ?x ?y |- _ => rewrite H in *; clear H end). Ltac assert_decidability := repeat ( match goal with | H: context [~ E.eq ?x ?y] |- _ => assert new (E.eq x y \/ ~ E.eq x y) by (apply dec_eq) | H: context [~ In ?x ?s] |- _ => assert new (In x s \/ ~ In x s) by (apply dec_In) | |- context [~ E.eq ?x ?y] => assert new (E.eq x y \/ ~ E.eq x y) by (apply dec_eq) | |- context [~ In ?x ?s] => assert new (In x s \/ ~ In x s) by (apply dec_In) end); repeat ( match goal with | _: ~ ?P, H : ?P \/ ~ ?P |- _ => clear H end). Ltac inst_FSet_hypotheses := repeat ( match goal with | H : forall a : E.t, _, _ : context [ In ?x _ ] |- _ => let P := type of (H x) in assert new P by (exact (H x)) | H : forall a : E.t, _ |- context [ In ?x _ ] => let P := type of (H x) in assert new P by (exact (H x)) | H : forall a : E.t, _, _ : context [ E.eq ?x _ ] |- _ => let P := type of (H x) in assert new P by (exact (H x)) | H : forall a : E.t, _ |- context [ E.eq ?x _ ] => let P := type of (H x) in assert new P by (exact (H x)) | H : forall a : E.t, _, _ : context [ E.eq _ ?x ] |- _ => let P := type of (H x) in assert new P by (exact (H x)) | H : forall a : E.t, _ |- context [ E.eq _ ?x ] => let P := type of (H x) in assert new P by (exact (H x)) end); repeat ( match goal with | H : forall a : E.t, _ |- _ => clear H end). Hint Resolve E.eq_refl : FSet_Auto. Ltac fsetdec_rec := auto with FSet_Auto; subst++; try (match goal with | H: E.eq ?x ?x -> False |- _ => destruct H end); (reflexivity || contradiction || (progress substFSet; intuition fsetdec_rec)). Ltac fsetdec_body := inst_FSet_hypotheses; autorewrite with set_simpl in *; push not in * using FSet_decidability; substFSet; assert_decidability; auto with FSet_Auto; (intuition fsetdec_rec) || fail 1 "because the goal is beyond the scope of this tactic". End FSetDecideAuxiliary. Import FSetDecideAuxiliary. Ltac fsetdec := unfold iff in *; fold any not; intros; decompose records; discard_nonFSet; unfold Empty, Subset, Equal in *; intros; autorewrite with set_simpl in *; change_to_E_t; E_eq_to_Logic_eq; subst++; Logic_eq_to_E_eq; pull not using FSet_decidability; unfold not in *; match goal with | H: (In ?x ?r) -> False |- (In ?x ?s) -> False => contradict H; fsetdec_body | H: (In ?x ?r) -> False |- (E.eq ?x ?y) -> False => contradict H; fsetdec_body | H: (In ?x ?r) -> False |- (E.eq ?y ?x) -> False => contradict H; fsetdec_body | H: ?P -> False |- ?Q -> False => if prop (FSet_elt_Prop P) holds by (auto 100 with FSet_Prop) then (contradict H; fsetdec_body) else fsetdec_body | |- _ => fsetdec_body end. Module FSetDecideTestCases. Lemma test_eq_trans_1 : forall x y z s, E.eq x y -> Proof. (* Goal: None *) fsetdec. Qed. Lemma test_eq_trans_2 : forall x y z r s, In x (singleton y) -> ~ In z r -> ~ ~ In z (add y r) -> In x s -> In z s. Proof. (* Goal: None *) fsetdec. Qed. Lemma test_eq_neq_trans_1 : forall w x y z s, E.eq x w -> Proof. (* Goal: None *) fsetdec. Qed. Lemma test_eq_neq_trans_2 : forall w x y z r1 r2 s, In x (singleton w) -> ~ In x r1 -> In x (add y r1) -> In y r2 -> In y (remove z r2) -> In w s -> In w (remove z s). Proof. (* Goal: None *) fsetdec. Qed. Lemma test_In_singleton : forall x, In x (singleton x). Proof. (* Goal: None *) fsetdec. Qed. Lemma test_add_In : forall x y s, In x (add y s) -> ~ E.eq x y -> Proof. (* Goal: None *) fsetdec. Qed. Lemma test_Subset_add_remove : forall x s, s [<=] (add x (remove x s)). Proof. (* Goal: None *) fsetdec. Qed. Lemma test_eq_disjunction : forall w x y z, In w (add x (add y (singleton z))) -> E.eq w x \/ E.eq w y \/ E.eq w z. Proof. (* Goal: None *) fsetdec. Qed. Lemma test_not_In_disj : forall x y s1 s2 s3 s4, ~ In x (union s1 (union s2 (union s3 (add y s4)))) -> ~ (In x s1 \/ In x s4 \/ E.eq y x). Proof. (* Goal: None *) fsetdec. Qed. Lemma test_not_In_conj : forall x y s1 s2 s3 s4, ~ In x (union s1 (union s2 (union s3 (add y s4)))) -> ~ In x s1 /\ ~ In x s4 /\ ~ E.eq y x. Proof. (* Goal: None *) fsetdec. Qed. Lemma test_iff_conj : forall a x s s', (In a s' <-> E.eq x a \/ In a s) -> Proof. (* Goal: None *) fsetdec. Qed. Lemma test_set_ops_1 : forall x q r s, (singleton x) [<=] s -> Empty (union q r) -> Empty (inter (diff s q) (diff s r)) -> ~ In x s. Proof. (* Goal: None *) fsetdec. Qed. Lemma eq_chain_test : forall x1 x2 x3 x4 s1 s2 s3 s4, Empty s1 -> In x2 (add x1 s1) -> In x3 s2 -> ~ In x3 (remove x2 s2) -> ~ In x4 s3 -> In x4 (add x3 s3) -> In x1 s4 -> Subset (add x4 s4) s4. Proof. (* Goal: None *) fsetdec. Qed. Lemma test_too_complex : forall x y z r s, E.eq x y -> Proof. (* Goal: None *) intros until s; intros Heq H Hr; lapply H; fsetdec. Qed. Lemma function_test_1 : forall (f : t -> t), forall (g : elt -> elt), forall (s1 s2 : t), forall (x1 x2 : elt), Equal s1 (f s2) -> E.eq x1 (g (g x2)) -> Proof. (* Goal: None *) fsetdec. Qed. Lemma function_test_2 : forall (f : t -> t), forall (g : elt -> elt), forall (s1 s2 : t), forall (x1 x2 : elt), Equal s1 (f s2) -> E.eq x1 (g x2) -> Proof. (* Goal: None *) intros until 3. (* Goal: None *) intros g_eq. (* Goal: None *) rewrite <- g_eq. (* Goal: None *) fsetdec. Qed. Lemma test_baydemir : forall (f : t -> t), forall (s : t), forall (x y : elt), In x (add y (f s)) -> ~ E.eq x y -> Proof. (* Goal: None *) fsetdec. Qed. Lemma test_baydemir_2 : forall (x : elt) (s : t), Subset (inter (singleton x) s) empty -> ~ In x s. Proof. (* Goal: None *) fsetdec. Qed. Lemma test_baydemir_3 : forall (x y : elt) (s : t), ~ In x (add y s) -> x = y -> False. Proof. (* Goal: None *) fsetdec. Qed. Lemma test_baydemir_4 : forall (x : elt) (s : t), Equal (inter (add x empty) s) empty -> ~ In x s. Proof. (* Goal: None *) fsetdec. Qed. Lemma test_sweirich : forall (x : elt) (s : t), In x s -> Subset (singleton x) s. Proof. (* Goal: None *) fsetdec. Qed. End FSetDecideTestCases. End WDecide_fun. Require Import CoqFSetInterface. Module WDecide (M:WS) := !WDecide_fun M.E M. Module Decide := WDecide.
Require Export GeoCoq.Tarski_dev.Ch14_order. Section T15. Context `{T2D:Tarski_2D}. Context `{TE:@Tarski_euclidean Tn TnEQD}. Lemma length_pos : forall O E E' A B L, Length O E E' A B L -> LeP O E E' O L. Proof. (* Goal: forall (O E E' A B L : @Tpoint Tn) (_ : @Length Tn O E E' A B L), @LeP Tn O E E' O L *) intros. (* Goal: @LeP Tn O E E' O L *) unfold Length in *. (* Goal: @LeP Tn O E E' O L *) tauto. Qed. Lemma length_id_1 : forall O E E' A B, Length O E E' A B O -> A=B. Proof. (* Goal: forall (O E E' A B : @Tpoint Tn) (_ : @Length Tn O E E' A B O), @eq (@Tpoint Tn) A B *) intros. (* Goal: @eq (@Tpoint Tn) A B *) unfold Length in *. (* Goal: @eq (@Tpoint Tn) A B *) spliter. (* Goal: @eq (@Tpoint Tn) A B *) treat_equalities. (* Goal: @eq (@Tpoint Tn) A A *) reflexivity. Qed. Lemma length_id_2 : forall O E E' A, O<>E -> Length O E E' A A O. Proof. (* Goal: forall (O E E' A : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) O E)), @Length Tn O E E' A A O *) intros. (* Goal: @Length Tn O E E' A A O *) unfold Length. (* Goal: and (not (@eq (@Tpoint Tn) O E)) (and (@Col Tn O E O) (and (@LeP Tn O E E' O O) (@Cong Tn O O A A))) *) repeat split. (* Goal: @Cong Tn O O A A *) (* Goal: @LeP Tn O E E' O O *) (* Goal: @Col Tn O E O *) (* Goal: not (@eq (@Tpoint Tn) O E) *) assumption. (* Goal: @Cong Tn O O A A *) (* Goal: @LeP Tn O E E' O O *) (* Goal: @Col Tn O E O *) Col. (* Goal: @Cong Tn O O A A *) (* Goal: @LeP Tn O E E' O O *) unfold LeP. (* Goal: @Cong Tn O O A A *) (* Goal: or (@LtP Tn O E E' O O) (@eq (@Tpoint Tn) O O) *) tauto. (* Goal: @Cong Tn O O A A *) Cong. Qed. Lemma length_id : forall O E E' A B, Length O E E' A B O <-> (A=B /\ O<>E). Proof. (* Goal: forall O E E' A B : @Tpoint Tn, iff (@Length Tn O E E' A B O) (and (@eq (@Tpoint Tn) A B) (not (@eq (@Tpoint Tn) O E))) *) intros. (* Goal: iff (@Length Tn O E E' A B O) (and (@eq (@Tpoint Tn) A B) (not (@eq (@Tpoint Tn) O E))) *) split. (* Goal: forall _ : and (@eq (@Tpoint Tn) A B) (not (@eq (@Tpoint Tn) O E)), @Length Tn O E E' A B O *) (* Goal: forall _ : @Length Tn O E E' A B O, and (@eq (@Tpoint Tn) A B) (not (@eq (@Tpoint Tn) O E)) *) intros. (* Goal: forall _ : and (@eq (@Tpoint Tn) A B) (not (@eq (@Tpoint Tn) O E)), @Length Tn O E E' A B O *) (* Goal: and (@eq (@Tpoint Tn) A B) (not (@eq (@Tpoint Tn) O E)) *) split. (* Goal: forall _ : and (@eq (@Tpoint Tn) A B) (not (@eq (@Tpoint Tn) O E)), @Length Tn O E E' A B O *) (* Goal: not (@eq (@Tpoint Tn) O E) *) (* Goal: @eq (@Tpoint Tn) A B *) eauto using length_id_1. (* Goal: forall _ : and (@eq (@Tpoint Tn) A B) (not (@eq (@Tpoint Tn) O E)), @Length Tn O E E' A B O *) (* Goal: not (@eq (@Tpoint Tn) O E) *) unfold Length in *. (* Goal: forall _ : and (@eq (@Tpoint Tn) A B) (not (@eq (@Tpoint Tn) O E)), @Length Tn O E E' A B O *) (* Goal: not (@eq (@Tpoint Tn) O E) *) tauto. (* Goal: forall _ : and (@eq (@Tpoint Tn) A B) (not (@eq (@Tpoint Tn) O E)), @Length Tn O E E' A B O *) intros. (* Goal: @Length Tn O E E' A B O *) spliter. (* Goal: @Length Tn O E E' A B O *) subst. (* Goal: @Length Tn O E E' B B O *) apply length_id_2. (* Goal: not (@eq (@Tpoint Tn) O E) *) assumption. Qed. Lemma length_eq_cong_1 : forall O E E' A B C D AB, Length O E E' A B AB -> Length O E E' C D AB -> Cong A B C D. Proof. (* Goal: forall (O E E' A B C D AB : @Tpoint Tn) (_ : @Length Tn O E E' A B AB) (_ : @Length Tn O E E' C D AB), @Cong Tn A B C D *) intros. (* Goal: @Cong Tn A B C D *) unfold Length in *. (* Goal: @Cong Tn A B C D *) spliter. (* Goal: @Cong Tn A B C D *) apply cong_transitivity with O AB;Cong. Qed. Lemma length_eq_cong_2 : forall O E E' A B C D AB, Length O E E' A B AB -> Cong A B C D -> Length O E E' C D AB. Proof. (* Goal: forall (O E E' A B C D AB : @Tpoint Tn) (_ : @Length Tn O E E' A B AB) (_ : @Cong Tn A B C D), @Length Tn O E E' C D AB *) intros. (* Goal: @Length Tn O E E' C D AB *) unfold Length in *. (* Goal: and (not (@eq (@Tpoint Tn) O E)) (and (@Col Tn O E AB) (and (@LeP Tn O E E' O AB) (@Cong Tn O AB C D))) *) spliter. (* Goal: and (not (@eq (@Tpoint Tn) O E)) (and (@Col Tn O E AB) (and (@LeP Tn O E E' O AB) (@Cong Tn O AB C D))) *) repeat split;try assumption. (* Goal: @Cong Tn O AB C D *) apply cong_transitivity with A B;Cong. Qed. Lemma ltP_pos : forall O E E' A, LtP O E E' O A -> Ps O E A. Proof. (* Goal: forall (O E E' A : @Tpoint Tn) (_ : @LtP Tn O E E' O A), @Ps Tn O E A *) intros. (* Goal: @Ps Tn O E A *) unfold LtP in H. (* Goal: @Ps Tn O E A *) ex_and H A'. (* Goal: @Ps Tn O E A *) assert(~Col O E E' /\ Col O E A). (* Goal: @Ps Tn O E A *) (* Goal: and (not (@Col Tn O E E')) (@Col Tn O E A) *) unfold Diff in H. (* Goal: @Ps Tn O E A *) (* Goal: and (not (@Col Tn O E E')) (@Col Tn O E A) *) ex_and H X. (* Goal: @Ps Tn O E A *) (* Goal: and (not (@Col Tn O E E')) (@Col Tn O E A) *) unfold Sum in H1. (* Goal: @Ps Tn O E A *) (* Goal: and (not (@Col Tn O E E')) (@Col Tn O E A) *) spliter. (* Goal: @Ps Tn O E A *) (* Goal: and (not (@Col Tn O E E')) (@Col Tn O E A) *) unfold Ar2 in H1. (* Goal: @Ps Tn O E A *) (* Goal: and (not (@Col Tn O E E')) (@Col Tn O E A) *) tauto. (* Goal: @Ps Tn O E A *) spliter. (* Goal: @Ps Tn O E A *) assert(HH:= diff_A_O O E E' A H1 H2). (* Goal: @Ps Tn O E A *) assert(A = A'). (* Goal: @Ps Tn O E A *) (* Goal: @eq (@Tpoint Tn) A A' *) apply(diff_uniqueness O E E' A O A A'); assumption. (* Goal: @Ps Tn O E A *) subst A'. (* Goal: @Ps Tn O E A *) assumption. Qed. Lemma bet_leP : forall O E E' AB CD, Bet O AB CD -> LeP O E E' O AB -> LeP O E E' O CD -> LeP O E E' AB CD. Proof. (* Goal: forall (O E E' AB CD : @Tpoint Tn) (_ : @Bet Tn O AB CD) (_ : @LeP Tn O E E' O AB) (_ : @LeP Tn O E E' O CD), @LeP Tn O E E' AB CD *) intros. (* Goal: @LeP Tn O E E' AB CD *) unfold LeP in *. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) induction H0; induction H1. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) unfold LtP in H0. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) unfold LtP in H1. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) ex_and H0 P. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) ex_and H1 Q. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) assert(Ar2 O E E' AB CD P /\ Col O E Q). (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: and (@Ar2 Tn O E E' AB CD P) (@Col Tn O E Q) *) unfold Diff in H0. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: and (@Ar2 Tn O E E' AB CD P) (@Col Tn O E Q) *) ex_and H0 X. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: and (@Ar2 Tn O E E' AB CD P) (@Col Tn O E Q) *) unfold Diff in H1. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: and (@Ar2 Tn O E E' AB CD P) (@Col Tn O E Q) *) ex_and H1 Y. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: and (@Ar2 Tn O E E' AB CD P) (@Col Tn O E Q) *) unfold Sum in H4. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: and (@Ar2 Tn O E E' AB CD P) (@Col Tn O E Q) *) unfold Sum in H5. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: and (@Ar2 Tn O E E' AB CD P) (@Col Tn O E Q) *) spliter. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: and (@Ar2 Tn O E E' AB CD P) (@Col Tn O E Q) *) unfold Ar2 in *. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: and (and (not (@Col Tn O E E')) (and (@Col Tn O E AB) (and (@Col Tn O E CD) (@Col Tn O E P)))) (@Col Tn O E Q) *) spliter. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: and (and (not (@Col Tn O E E')) (and (@Col Tn O E AB) (and (@Col Tn O E CD) (@Col Tn O E P)))) (@Col Tn O E Q) *) repeat split; Col. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) unfold Ar2 in H4. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) spliter. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) assert(P = AB). (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: @eq (@Tpoint Tn) P AB *) apply (diff_uniqueness O E E' AB O); auto. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: @Diff Tn O E E' AB O AB *) apply diff_A_O; auto. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) subst P. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) assert(Q = CD). (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: @eq (@Tpoint Tn) Q CD *) apply (diff_uniqueness O E E' CD O); auto. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: @Diff Tn O E E' CD O CD *) apply diff_A_O; auto. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) subst Q. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) clean_duplicated_hyps. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) induction(eq_dec_points AB CD). (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) right. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: @eq (@Tpoint Tn) AB CD *) assumption. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) left. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: @LtP Tn O E E' AB CD *) clear H0 H1. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: @LtP Tn O E E' AB CD *) assert(HH:=opp_exists O E E' H4 AB H6). (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: @LtP Tn O E E' AB CD *) ex_and HH AB'. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: @LtP Tn O E E' AB CD *) assert(exists P, Sum O E E' CD AB' P). (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: @LtP Tn O E E' AB CD *) (* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => @Sum Tn O E E' CD AB' P) *) apply(sum_exists O E E' H4 CD AB'); Col. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: @LtP Tn O E E' AB CD *) (* Goal: @Col Tn O E AB' *) unfold Opp in H0. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: @LtP Tn O E E' AB CD *) (* Goal: @Col Tn O E AB' *) unfold Sum in H0. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: @LtP Tn O E E' AB CD *) (* Goal: @Col Tn O E AB' *) spliter. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: @LtP Tn O E E' AB CD *) (* Goal: @Col Tn O E AB' *) unfold Ar2 in H0. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: @LtP Tn O E E' AB CD *) (* Goal: @Col Tn O E AB' *) tauto. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: @LtP Tn O E E' AB CD *) ex_and H1 P. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: @LtP Tn O E E' AB CD *) unfold LtP. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (@Diff Tn O E E' CD AB D) (@Ps Tn O E D)) *) exists P. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: and (@Diff Tn O E E' CD AB P) (@Ps Tn O E P) *) split. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: @Ps Tn O E P *) (* Goal: @Diff Tn O E E' CD AB P *) unfold Diff. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: @Ps Tn O E P *) (* Goal: @ex (@Tpoint Tn) (fun B' : @Tpoint Tn => and (@Opp Tn O E E' AB B') (@Sum Tn O E E' CD B' P)) *) exists AB'. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: @Ps Tn O E P *) (* Goal: and (@Opp Tn O E E' AB AB') (@Sum Tn O E E' CD AB' P) *) split; auto. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: @Ps Tn O E P *) assert(Diff O E E' CD AB P). (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: @Ps Tn O E P *) (* Goal: @Diff Tn O E E' CD AB P *) unfold Diff. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: @Ps Tn O E P *) (* Goal: @ex (@Tpoint Tn) (fun B' : @Tpoint Tn => and (@Opp Tn O E E' AB B') (@Sum Tn O E E' CD B' P)) *) exists AB'. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: @Ps Tn O E P *) (* Goal: and (@Opp Tn O E E' AB AB') (@Sum Tn O E E' CD AB' P) *) split; auto. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: @Ps Tn O E P *) apply diff_sum in H1. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: @Ps Tn O E P *) induction (eq_dec_points AB O). (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: @Ps Tn O E P *) (* Goal: @Ps Tn O E P *) subst AB. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: @Ps Tn O E P *) (* Goal: @Ps Tn O E P *) unfold Ps in H2. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: @Ps Tn O E P *) (* Goal: @Ps Tn O E P *) unfold Out in H2. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: @Ps Tn O E P *) (* Goal: @Ps Tn O E P *) spliter. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: @Ps Tn O E P *) (* Goal: @Ps Tn O E P *) tauto. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: @Ps Tn O E P *) assert(Parallelogram_flat O AB CD P). (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: @Ps Tn O E P *) (* Goal: @Parallelogram_flat Tn O AB CD P *) apply (sum_cong O E E' H4 AB P CD H1). (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: @Ps Tn O E P *) (* Goal: or (not (@eq (@Tpoint Tn) AB O)) (not (@eq (@Tpoint Tn) P O)) *) left. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: @Ps Tn O E P *) (* Goal: not (@eq (@Tpoint Tn) AB O) *) assumption. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: @Ps Tn O E P *) unfold Parallelogram_flat in H10. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: @Ps Tn O E P *) spliter. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: @Ps Tn O E P *) assert(Bet CD P O). (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: @Ps Tn O E P *) (* Goal: @Bet Tn CD P O *) apply(l4_6 O AB CD CD P O). (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: @Ps Tn O E P *) (* Goal: @Cong_3 Tn O AB CD CD P O *) (* Goal: @Bet Tn O AB CD *) assumption. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: @Ps Tn O E P *) (* Goal: @Cong_3 Tn O AB CD CD P O *) repeat split; Cong. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: @Ps Tn O E P *) unfold Ps. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: @Out Tn O P E *) unfold Out. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: and (not (@eq (@Tpoint Tn) P O)) (and (not (@eq (@Tpoint Tn) E O)) (or (@Bet Tn O P E) (@Bet Tn O E P))) *) repeat split. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@Bet Tn O P E) (@Bet Tn O E P) *) (* Goal: not (@eq (@Tpoint Tn) E O) *) (* Goal: not (@eq (@Tpoint Tn) P O) *) intro. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@Bet Tn O P E) (@Bet Tn O E P) *) (* Goal: not (@eq (@Tpoint Tn) E O) *) (* Goal: False *) subst P. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@Bet Tn O P E) (@Bet Tn O E P) *) (* Goal: not (@eq (@Tpoint Tn) E O) *) (* Goal: False *) assert(AB=CD). (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@Bet Tn O P E) (@Bet Tn O E P) *) (* Goal: not (@eq (@Tpoint Tn) E O) *) (* Goal: False *) (* Goal: @eq (@Tpoint Tn) AB CD *) apply cong_symmetry in H13. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@Bet Tn O P E) (@Bet Tn O E P) *) (* Goal: not (@eq (@Tpoint Tn) E O) *) (* Goal: False *) (* Goal: @eq (@Tpoint Tn) AB CD *) apply (cong_identity _ _ O); Cong. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@Bet Tn O P E) (@Bet Tn O E P) *) (* Goal: not (@eq (@Tpoint Tn) E O) *) (* Goal: False *) subst CD. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@Bet Tn O P E) (@Bet Tn O E P) *) (* Goal: not (@eq (@Tpoint Tn) E O) *) (* Goal: False *) tauto. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@Bet Tn O P E) (@Bet Tn O E P) *) (* Goal: not (@eq (@Tpoint Tn) E O) *) intro. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@Bet Tn O P E) (@Bet Tn O E P) *) (* Goal: False *) subst E. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@Bet Tn O P E) (@Bet Tn O E P) *) (* Goal: False *) apply H4. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@Bet Tn O P E) (@Bet Tn O E P) *) (* Goal: @Col Tn O O E' *) Col. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@Bet Tn O P E) (@Bet Tn O E P) *) unfold Ps in H3. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@Bet Tn O P E) (@Bet Tn O E P) *) unfold Out in H3. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@Bet Tn O P E) (@Bet Tn O E P) *) spliter. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@Bet Tn O P E) (@Bet Tn O E P) *) induction H17. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@Bet Tn O P E) (@Bet Tn O E P) *) (* Goal: or (@Bet Tn O P E) (@Bet Tn O E P) *) left. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@Bet Tn O P E) (@Bet Tn O E P) *) (* Goal: @Bet Tn O P E *) apply (between_exchange4 O P CD E); Between. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@Bet Tn O P E) (@Bet Tn O E P) *) apply (l5_3 O P E CD); Between. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) subst CD. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB O) (@eq (@Tpoint Tn) AB O) *) apply between_identity in H. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB O) (@eq (@Tpoint Tn) AB O) *) subst AB. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' O O) (@eq (@Tpoint Tn) O O) *) right; auto. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) subst AB. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) (* Goal: or (@LtP Tn O E E' O CD) (@eq (@Tpoint Tn) O CD) *) left; assumption. (* Goal: or (@LtP Tn O E E' AB CD) (@eq (@Tpoint Tn) AB CD) *) subst AB. (* Goal: or (@LtP Tn O E E' O CD) (@eq (@Tpoint Tn) O CD) *) subst CD. (* Goal: or (@LtP Tn O E E' O O) (@eq (@Tpoint Tn) O O) *) right; auto. Qed. Lemma leP_bet : forall O E E' AB CD, LeP O E E' AB CD -> LeP O E E' O AB -> LeP O E E' O CD -> Bet O AB CD. Proof. (* Goal: forall (O E E' AB CD : @Tpoint Tn) (_ : @LeP Tn O E E' AB CD) (_ : @LeP Tn O E E' O AB) (_ : @LeP Tn O E E' O CD), @Bet Tn O AB CD *) intros. (* Goal: @Bet Tn O AB CD *) unfold LeP in H. (* Goal: @Bet Tn O AB CD *) induction H. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) unfold LtP in H. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) ex_and H X. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) apply diff_sum in H. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) assert(Out O AB X \/ AB=O). (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: or (@Out Tn O AB X) (@eq (@Tpoint Tn) AB O) *) unfold LeP in H0. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: or (@Out Tn O AB X) (@eq (@Tpoint Tn) AB O) *) induction H0. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: or (@Out Tn O AB X) (@eq (@Tpoint Tn) AB O) *) (* Goal: or (@Out Tn O AB X) (@eq (@Tpoint Tn) AB O) *) left. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: or (@Out Tn O AB X) (@eq (@Tpoint Tn) AB O) *) (* Goal: @Out Tn O AB X *) apply ltP_pos in H0. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: or (@Out Tn O AB X) (@eq (@Tpoint Tn) AB O) *) (* Goal: @Out Tn O AB X *) unfold Ps in *. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: or (@Out Tn O AB X) (@eq (@Tpoint Tn) AB O) *) (* Goal: @Out Tn O AB X *) eapply (l6_7 _ _ E); auto. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: or (@Out Tn O AB X) (@eq (@Tpoint Tn) AB O) *) (* Goal: @Out Tn O E X *) apply l6_6. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: or (@Out Tn O AB X) (@eq (@Tpoint Tn) AB O) *) (* Goal: @Out Tn O X E *) assumption. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: or (@Out Tn O AB X) (@eq (@Tpoint Tn) AB O) *) right. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @eq (@Tpoint Tn) AB O *) auto. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) induction H3. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) apply (l14_36_a O E E' AB X CD); auto. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) subst AB. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O O CD *) apply between_trivial2. (* Goal: @Bet Tn O AB CD *) subst CD. (* Goal: @Bet Tn O AB AB *) apply between_trivial. Qed. Lemma length_Ar2 : forall O E E' A B AB, Length O E E' A B AB -> (Col O E AB /\ ~Col O E E') \/ AB = O. Proof. (* Goal: forall (O E E' A B AB : @Tpoint Tn) (_ : @Length Tn O E E' A B AB), or (and (@Col Tn O E AB) (not (@Col Tn O E E'))) (@eq (@Tpoint Tn) AB O) *) intros. (* Goal: or (and (@Col Tn O E AB) (not (@Col Tn O E E'))) (@eq (@Tpoint Tn) AB O) *) unfold Length in H. (* Goal: or (and (@Col Tn O E AB) (not (@Col Tn O E E'))) (@eq (@Tpoint Tn) AB O) *) spliter. (* Goal: or (and (@Col Tn O E AB) (not (@Col Tn O E E'))) (@eq (@Tpoint Tn) AB O) *) unfold LeP in H1. (* Goal: or (and (@Col Tn O E AB) (not (@Col Tn O E E'))) (@eq (@Tpoint Tn) AB O) *) induction H1. (* Goal: or (and (@Col Tn O E AB) (not (@Col Tn O E E'))) (@eq (@Tpoint Tn) AB O) *) (* Goal: or (and (@Col Tn O E AB) (not (@Col Tn O E E'))) (@eq (@Tpoint Tn) AB O) *) left. (* Goal: or (and (@Col Tn O E AB) (not (@Col Tn O E E'))) (@eq (@Tpoint Tn) AB O) *) (* Goal: and (@Col Tn O E AB) (not (@Col Tn O E E')) *) split. (* Goal: or (and (@Col Tn O E AB) (not (@Col Tn O E E'))) (@eq (@Tpoint Tn) AB O) *) (* Goal: not (@Col Tn O E E') *) (* Goal: @Col Tn O E AB *) assumption. (* Goal: or (and (@Col Tn O E AB) (not (@Col Tn O E E'))) (@eq (@Tpoint Tn) AB O) *) (* Goal: not (@Col Tn O E E') *) unfold LtP in H1. (* Goal: or (and (@Col Tn O E AB) (not (@Col Tn O E E'))) (@eq (@Tpoint Tn) AB O) *) (* Goal: not (@Col Tn O E E') *) ex_and H1 P. (* Goal: or (and (@Col Tn O E AB) (not (@Col Tn O E E'))) (@eq (@Tpoint Tn) AB O) *) (* Goal: not (@Col Tn O E E') *) unfold Diff in H1. (* Goal: or (and (@Col Tn O E AB) (not (@Col Tn O E E'))) (@eq (@Tpoint Tn) AB O) *) (* Goal: not (@Col Tn O E E') *) ex_and H1 Q. (* Goal: or (and (@Col Tn O E AB) (not (@Col Tn O E E'))) (@eq (@Tpoint Tn) AB O) *) (* Goal: not (@Col Tn O E E') *) unfold Sum in *. (* Goal: or (and (@Col Tn O E AB) (not (@Col Tn O E E'))) (@eq (@Tpoint Tn) AB O) *) (* Goal: not (@Col Tn O E E') *) spliter. (* Goal: or (and (@Col Tn O E AB) (not (@Col Tn O E E'))) (@eq (@Tpoint Tn) AB O) *) (* Goal: not (@Col Tn O E E') *) unfold Ar2 in *. (* Goal: or (and (@Col Tn O E AB) (not (@Col Tn O E E'))) (@eq (@Tpoint Tn) AB O) *) (* Goal: not (@Col Tn O E E') *) tauto. (* Goal: or (and (@Col Tn O E AB) (not (@Col Tn O E E'))) (@eq (@Tpoint Tn) AB O) *) right; auto. Qed. Lemma length_leP_le_1 : forall O E E' A B C D AB CD, Length O E E' A B AB -> Length O E E' C D CD -> LeP O E E' AB CD -> Le A B C D. Proof. (* Goal: forall (O E E' A B C D AB CD : @Tpoint Tn) (_ : @Length Tn O E E' A B AB) (_ : @Length Tn O E E' C D CD) (_ : @LeP Tn O E E' AB CD), @Le Tn A B C D *) intros. (* Goal: @Le Tn A B C D *) unfold Length in *. (* Goal: @Le Tn A B C D *) spliter. (* Goal: @Le Tn A B C D *) assert(Bet O AB CD). (* Goal: @Le Tn A B C D *) (* Goal: @Bet Tn O AB CD *) apply (leP_bet O E E'); assumption. (* Goal: @Le Tn A B C D *) prolong D C M' A B. (* Goal: @Le Tn A B C D *) assert(HH:=symmetric_point_construction M' C). (* Goal: @Le Tn A B C D *) ex_and HH M. (* Goal: @Le Tn A B C D *) unfold Midpoint in H11. (* Goal: @Le Tn A B C D *) spliter. (* Goal: @Le Tn A B C D *) assert(Cong A B C M). (* Goal: @Le Tn A B C D *) (* Goal: @Cong Tn A B C M *) apply (cong_transitivity _ _ C M'); Cong. (* Goal: @Le Tn A B C D *) apply(le_transitivity _ _ C M). (* Goal: @Le Tn C M C D *) (* Goal: @Le Tn A B C M *) unfold Le. (* Goal: @Le Tn C M C D *) (* Goal: @ex (@Tpoint Tn) (fun E : @Tpoint Tn => and (@Bet Tn C E M) (@Cong Tn A B C E)) *) exists M. (* Goal: @Le Tn C M C D *) (* Goal: and (@Bet Tn C M M) (@Cong Tn A B C M) *) split; Between. (* Goal: @Le Tn C M C D *) assert(Le O AB O CD). (* Goal: @Le Tn C M C D *) (* Goal: @Le Tn O AB O CD *) unfold Le. (* Goal: @Le Tn C M C D *) (* Goal: @ex (@Tpoint Tn) (fun E : @Tpoint Tn => and (@Bet Tn O E CD) (@Cong Tn O AB O E)) *) exists AB. (* Goal: @Le Tn C M C D *) (* Goal: and (@Bet Tn O AB CD) (@Cong Tn O AB O AB) *) split; Cong. (* Goal: @Le Tn C M C D *) apply(l5_6 O AB O CD C M C D); Cong. (* Goal: @Cong Tn O AB C M *) apply (cong_transitivity _ _ A B); Cong. Qed. Lemma length_leP_le_2 : forall O E E' A B C D AB CD, Length O E E' A B AB -> Length O E E' C D CD -> Le A B C D -> LeP O E E' AB CD. Proof. (* Goal: forall (O E E' A B C D AB CD : @Tpoint Tn) (_ : @Length Tn O E E' A B AB) (_ : @Length Tn O E E' C D CD) (_ : @Le Tn A B C D), @LeP Tn O E E' AB CD *) intros. (* Goal: @LeP Tn O E E' AB CD *) assert(HH1:= length_Ar2 O E E' A B AB H). (* Goal: @LeP Tn O E E' AB CD *) assert(HH2:= length_Ar2 O E E' C D CD H0). (* Goal: @LeP Tn O E E' AB CD *) spliter. (* Goal: @LeP Tn O E E' AB CD *) unfold Length in *. (* Goal: @LeP Tn O E E' AB CD *) spliter. (* Goal: @LeP Tn O E E' AB CD *) apply bet_leP; try assumption. (* Goal: @Bet Tn O AB CD *) induction(eq_dec_points O CD). (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) subst CD. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB O *) apply cong_symmetry in H4. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB O *) apply cong_identity in H4. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB O *) subst D. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB O *) unfold Le in H1. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB O *) ex_and H1 X. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB O *) apply between_identity in H1. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB O *) subst X. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB O *) apply cong_identity in H4. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB O *) subst B. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB O *) apply cong_identity in H7. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB O *) subst AB. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O O O *) Between. (* Goal: @Bet Tn O AB CD *) assert(Le O AB O CD). (* Goal: @Bet Tn O AB CD *) (* Goal: @Le Tn O AB O CD *) apply(l5_6 A B C D O AB O CD); Cong. (* Goal: @Bet Tn O AB CD *) unfold Le in H8. (* Goal: @Bet Tn O AB CD *) ex_and H9 M. (* Goal: @Bet Tn O AB CD *) induction HH1; induction HH2. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) spliter. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) unfold Le in H1. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) ex_and H1 P. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) unfold LeP in *. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) induction H6; induction H3. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) unfold LtP in *. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) ex_and H6 X. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) ex_and H3 Y. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) apply diff_sum in H6. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) apply diff_sum in H3. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) apply sum_cong in H6; auto. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) X O)) *) (* Goal: @Bet Tn O AB CD *) apply sum_cong in H3; auto. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) X O)) *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) Y O)) *) (* Goal: @Bet Tn O AB CD *) unfold Parallelogram_flat in *. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) X O)) *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) Y O)) *) (* Goal: @Bet Tn O AB CD *) spliter. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) X O)) *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) Y O)) *) (* Goal: @Bet Tn O AB CD *) apply cong_symmetry in H19. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) X O)) *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) Y O)) *) (* Goal: @Bet Tn O AB CD *) apply cong_identity in H19. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) X O)) *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) Y O)) *) (* Goal: @Bet Tn O AB CD *) subst Y. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) X O)) *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) Y O)) *) (* Goal: @Bet Tn O AB CD *) apply cong_symmetry in H23. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) X O)) *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) Y O)) *) (* Goal: @Bet Tn O AB CD *) apply cong_identity in H23. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) X O)) *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) Y O)) *) (* Goal: @Bet Tn O AB CD *) subst X. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) X O)) *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) Y O)) *) (* Goal: @Bet Tn O AB CD *) clean_trivial_hyps. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) X O)) *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) Y O)) *) (* Goal: @Bet Tn O AB CD *) assert(AB = M \/ Midpoint O AB M). (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) X O)) *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) Y O)) *) (* Goal: @Bet Tn O AB CD *) (* Goal: or (@eq (@Tpoint Tn) AB M) (@Midpoint Tn O AB M) *) apply(l7_20 O AB M); Cong. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) X O)) *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) Y O)) *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Col Tn AB O M *) unfold Ps in *. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) X O)) *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) Y O)) *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Col Tn AB O M *) assert(Out O AB CD). (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) X O)) *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) Y O)) *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Col Tn AB O M *) (* Goal: @Out Tn O AB CD *) apply (l6_7 O AB E CD); auto. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) X O)) *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) Y O)) *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Col Tn AB O M *) (* Goal: @Out Tn O E CD *) apply l6_6. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) X O)) *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) Y O)) *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Col Tn AB O M *) (* Goal: @Out Tn O CD E *) assumption. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) X O)) *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) Y O)) *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Col Tn AB O M *) apply out_col in H3. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) X O)) *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) Y O)) *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Col Tn AB O M *) apply bet_col in H9. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) X O)) *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) Y O)) *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Col Tn AB O M *) apply col_permutation_2. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) X O)) *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) Y O)) *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Col Tn O M AB *) apply (col_transitivity_1 _ CD); Col. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) X O)) *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) Y O)) *) (* Goal: @Bet Tn O AB CD *) induction H3. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) X O)) *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) Y O)) *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) subst M. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) X O)) *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) Y O)) *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) assumption. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) X O)) *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) Y O)) *) (* Goal: @Bet Tn O AB CD *) unfold Midpoint in H3. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) X O)) *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) Y O)) *) (* Goal: @Bet Tn O AB CD *) spliter. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) X O)) *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) Y O)) *) (* Goal: @Bet Tn O AB CD *) assert(Out O AB CD). (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) X O)) *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) Y O)) *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Out Tn O AB CD *) unfold Ps in *. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) X O)) *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) Y O)) *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Out Tn O AB CD *) apply (l6_7 O AB E CD); auto. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) X O)) *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) Y O)) *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Out Tn O E CD *) apply l6_6. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) X O)) *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) Y O)) *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Out Tn O CD E *) assumption. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) X O)) *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) Y O)) *) (* Goal: @Bet Tn O AB CD *) assert(Bet AB O CD). (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) X O)) *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) Y O)) *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn AB O CD *) eapply (outer_transitivity_between _ _ M); Between. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) X O)) *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) Y O)) *) (* Goal: @Bet Tn O AB CD *) (* Goal: not (@eq (@Tpoint Tn) O M) *) intro. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) X O)) *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) Y O)) *) (* Goal: @Bet Tn O AB CD *) (* Goal: False *) subst M. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) X O)) *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) Y O)) *) (* Goal: @Bet Tn O AB CD *) (* Goal: False *) apply cong_identity in H6. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) X O)) *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) Y O)) *) (* Goal: @Bet Tn O AB CD *) (* Goal: False *) subst AB. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) X O)) *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) Y O)) *) (* Goal: @Bet Tn O AB CD *) (* Goal: False *) tauto. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) X O)) *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) Y O)) *) (* Goal: @Bet Tn O AB CD *) unfold Out in H18. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) X O)) *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) Y O)) *) (* Goal: @Bet Tn O AB CD *) spliter. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) X O)) *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) Y O)) *) (* Goal: @Bet Tn O AB CD *) induction H22. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) X O)) *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) Y O)) *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) assert(AB = O). (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) X O)) *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) Y O)) *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @eq (@Tpoint Tn) AB O *) apply(between_equality _ _ CD); Between. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) X O)) *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) Y O)) *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) subst AB. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) X O)) *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) Y O)) *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O O CD *) Between. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) X O)) *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) Y O)) *) (* Goal: @Bet Tn O AB CD *) assert(Bet CD O CD). (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) X O)) *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) Y O)) *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn CD O CD *) apply (between_exchange3 AB); Between. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) X O)) *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) Y O)) *) (* Goal: @Bet Tn O AB CD *) assert(O = CD). (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) X O)) *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) Y O)) *) (* Goal: @Bet Tn O AB CD *) (* Goal: @eq (@Tpoint Tn) O CD *) apply between_equality in H23. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) X O)) *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) Y O)) *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O CD CD *) (* Goal: @eq (@Tpoint Tn) O CD *) contradiction. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) X O)) *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) Y O)) *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O CD CD *) Between. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) X O)) *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) Y O)) *) (* Goal: @Bet Tn O AB CD *) tauto. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) X O)) *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) Y O)) *) right. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) X O)) *) (* Goal: not (@eq (@Tpoint Tn) Y O) *) intro. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) X O)) *) (* Goal: False *) subst Y. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) X O)) *) (* Goal: False *) unfold Ps in H17. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) X O)) *) (* Goal: False *) unfold Out in H17. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) X O)) *) (* Goal: False *) tauto. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) X O)) *) right. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: not (@eq (@Tpoint Tn) X O) *) intro. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: False *) subst X. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: False *) unfold Ps in H16. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: False *) unfold Out in H16. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: False *) tauto. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) subst CD. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB O *) tauto. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) subst AB. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O O CD *) Between. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) subst CD. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB O *) tauto. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) subst CD. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB O *) tauto. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O AB CD *) subst AB. (* Goal: @Bet Tn O AB CD *) (* Goal: @Bet Tn O O CD *) Between. (* Goal: @Bet Tn O AB CD *) subst CD. (* Goal: @Bet Tn O AB O *) tauto. Qed. Lemma l15_3 : forall O E E' A B C, Sum O E E' A B C -> Cong O B A C. Proof. (* Goal: forall (O E E' A B C : @Tpoint Tn) (_ : @Sum Tn O E E' A B C), @Cong Tn O B A C *) intros. (* Goal: @Cong Tn O B A C *) assert(Ar2 O E E' A B C). (* Goal: @Cong Tn O B A C *) (* Goal: @Ar2 Tn O E E' A B C *) unfold Sum in H. (* Goal: @Cong Tn O B A C *) (* Goal: @Ar2 Tn O E E' A B C *) spliter. (* Goal: @Cong Tn O B A C *) (* Goal: @Ar2 Tn O E E' A B C *) assumption. (* Goal: @Cong Tn O B A C *) unfold Ar2 in H0. (* Goal: @Cong Tn O B A C *) spliter. (* Goal: @Cong Tn O B A C *) induction (eq_dec_points A O). (* Goal: @Cong Tn O B A C *) (* Goal: @Cong Tn O B A C *) subst A. (* Goal: @Cong Tn O B A C *) (* Goal: @Cong Tn O B O C *) assert(B = C). (* Goal: @Cong Tn O B A C *) (* Goal: @Cong Tn O B O C *) (* Goal: @eq (@Tpoint Tn) B C *) apply (sum_uniqueness O E E' O B); auto. (* Goal: @Cong Tn O B A C *) (* Goal: @Cong Tn O B O C *) (* Goal: @Sum Tn O E E' O B B *) apply sum_O_B; auto. (* Goal: @Cong Tn O B A C *) (* Goal: @Cong Tn O B O C *) subst C. (* Goal: @Cong Tn O B A C *) (* Goal: @Cong Tn O B O B *) Cong. (* Goal: @Cong Tn O B A C *) apply sum_cong in H; auto. (* Goal: @Cong Tn O B A C *) unfold Parallelogram_flat in H. (* Goal: @Cong Tn O B A C *) spliter. (* Goal: @Cong Tn O B A C *) Cong. Qed. Lemma length_uniqueness : forall O E E' A B AB AB', Length O E E' A B AB -> Length O E E' A B AB' -> AB = AB'. Proof. (* Goal: forall (O E E' A B AB AB' : @Tpoint Tn) (_ : @Length Tn O E E' A B AB) (_ : @Length Tn O E E' A B AB'), @eq (@Tpoint Tn) AB AB' *) intros. (* Goal: @eq (@Tpoint Tn) AB AB' *) assert(Col O E AB /\ ~ Col O E E' \/ AB = O). (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: or (and (@Col Tn O E AB) (not (@Col Tn O E E'))) (@eq (@Tpoint Tn) AB O) *) eapply (length_Ar2 O E E' A B AB); assumption. (* Goal: @eq (@Tpoint Tn) AB AB' *) assert(Col O E AB' /\ ~ Col O E E' \/ AB' = O). (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: or (and (@Col Tn O E AB') (not (@Col Tn O E E'))) (@eq (@Tpoint Tn) AB' O) *) eapply (length_Ar2 O E E' A B AB'); assumption. (* Goal: @eq (@Tpoint Tn) AB AB' *) unfold Length in *. (* Goal: @eq (@Tpoint Tn) AB AB' *) spliter. (* Goal: @eq (@Tpoint Tn) AB AB' *) assert(Cong O AB O AB'). (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @Cong Tn O AB O AB' *) apply cong_transitivity with A B; Cong. (* Goal: @eq (@Tpoint Tn) AB AB' *) assert(AB = AB' \/ Midpoint O AB AB'). (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: or (@eq (@Tpoint Tn) AB AB') (@Midpoint Tn O AB AB') *) apply(l7_20 O AB AB'). (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @Cong Tn O AB O AB' *) (* Goal: @Col Tn AB O AB' *) ColR. (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @Cong Tn O AB O AB' *) Cong. (* Goal: @eq (@Tpoint Tn) AB AB' *) induction H10. (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) assumption. (* Goal: @eq (@Tpoint Tn) AB AB' *) unfold Midpoint in H10. (* Goal: @eq (@Tpoint Tn) AB AB' *) spliter. (* Goal: @eq (@Tpoint Tn) AB AB' *) induction H1; induction H2. (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) spliter. (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) unfold LeP in *. (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) induction H4; induction H7. (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) unfold LtP in H4. (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) unfold LtP in H7. (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) ex_and H4 X. (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) ex_and H7 Y. (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) apply diff_sum in H4. (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) apply diff_sum in H7. (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) assert(X = AB'). (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) X AB' *) apply(sum_O_B_eq O E E'); Col. (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) subst X. (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) assert(Y = AB). (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) Y AB *) apply(sum_O_B_eq O E E'); Col. (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) subst Y. (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) unfold Ps in *. (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) assert(Out O AB AB'). (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @Out Tn O AB AB' *) eapply (l6_7 _ _ E). (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @Out Tn O E AB' *) (* Goal: @Out Tn O AB E *) assumption. (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @Out Tn O E AB' *) apply l6_6; assumption. (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) unfold Out in H16. (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) spliter. (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) induction H18. (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) assert(AB = O). (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB O *) eapply (between_equality _ _ AB'); Between. (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) subst AB. (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) O AB' *) apply cong_symmetry in H11. (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) O AB' *) apply cong_identity in H11. (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) O AB' *) auto. (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) assert(AB' = O). (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB' O *) eapply (between_equality _ _ AB); Between. (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) subst AB'. (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB O *) apply cong_identity in H11. (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB O *) auto. (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) subst AB. (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) O AB' *) apply cong_symmetry in H9. (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) O AB' *) apply cong_identity in H9. (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) O AB' *) auto. (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) subst AB'. (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB O *) apply cong_identity in H9. (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB O *) auto. (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) subst AB'. (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB O *) apply cong_identity in H9. (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB O *) auto. (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) subst AB'. (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB O *) apply cong_identity in H9. (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB O *) auto. (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) AB AB' *) subst AB. (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) O AB' *) apply cong_symmetry in H9. (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) O AB' *) apply cong_identity in H9. (* Goal: @eq (@Tpoint Tn) AB AB' *) (* Goal: @eq (@Tpoint Tn) O AB' *) auto. (* Goal: @eq (@Tpoint Tn) AB AB' *) subst AB. (* Goal: @eq (@Tpoint Tn) O AB' *) subst AB'. (* Goal: @eq (@Tpoint Tn) O O *) reflexivity. Qed. Lemma length_cong : forall O E E' A B AB, Length O E E' A B AB -> Cong A B O AB. Proof. (* Goal: forall (O E E' A B AB : @Tpoint Tn) (_ : @Length Tn O E E' A B AB), @Cong Tn A B O AB *) intros. (* Goal: @Cong Tn A B O AB *) unfold Length in H. (* Goal: @Cong Tn A B O AB *) spliter. (* Goal: @Cong Tn A B O AB *) Cong. Qed. Lemma length_Ps : forall O E E' A B AB, AB <> O -> Length O E E' A B AB -> Ps O E AB. Proof. (* Goal: forall (O E E' A B AB : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) AB O)) (_ : @Length Tn O E E' A B AB), @Ps Tn O E AB *) intros. (* Goal: @Ps Tn O E AB *) unfold Length in H0. (* Goal: @Ps Tn O E AB *) spliter. (* Goal: @Ps Tn O E AB *) unfold LeP in H2. (* Goal: @Ps Tn O E AB *) induction H2. (* Goal: @Ps Tn O E AB *) (* Goal: @Ps Tn O E AB *) unfold LtP in H2. (* Goal: @Ps Tn O E AB *) (* Goal: @Ps Tn O E AB *) ex_and H2 X. (* Goal: @Ps Tn O E AB *) (* Goal: @Ps Tn O E AB *) apply diff_sum in H2. (* Goal: @Ps Tn O E AB *) (* Goal: @Ps Tn O E AB *) apply sum_cong in H2. (* Goal: @Ps Tn O E AB *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) X O)) *) (* Goal: not (@Col Tn O E E') *) (* Goal: @Ps Tn O E AB *) unfold Parallelogram_flat in H2. (* Goal: @Ps Tn O E AB *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) X O)) *) (* Goal: not (@Col Tn O E E') *) (* Goal: @Ps Tn O E AB *) spliter. (* Goal: @Ps Tn O E AB *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) X O)) *) (* Goal: not (@Col Tn O E E') *) (* Goal: @Ps Tn O E AB *) apply cong_symmetry in H6. (* Goal: @Ps Tn O E AB *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) X O)) *) (* Goal: not (@Col Tn O E E') *) (* Goal: @Ps Tn O E AB *) apply cong_identity in H6. (* Goal: @Ps Tn O E AB *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) X O)) *) (* Goal: not (@Col Tn O E E') *) (* Goal: @Ps Tn O E AB *) subst X. (* Goal: @Ps Tn O E AB *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) X O)) *) (* Goal: not (@Col Tn O E E') *) (* Goal: @Ps Tn O E AB *) assumption. (* Goal: @Ps Tn O E AB *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) X O)) *) (* Goal: not (@Col Tn O E E') *) unfold Sum in H2. (* Goal: @Ps Tn O E AB *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) X O)) *) (* Goal: not (@Col Tn O E E') *) spliter. (* Goal: @Ps Tn O E AB *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) X O)) *) (* Goal: not (@Col Tn O E E') *) unfold Ar2 in H2. (* Goal: @Ps Tn O E AB *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) X O)) *) (* Goal: not (@Col Tn O E E') *) tauto. (* Goal: @Ps Tn O E AB *) (* Goal: or (not (@eq (@Tpoint Tn) O O)) (not (@eq (@Tpoint Tn) X O)) *) right. (* Goal: @Ps Tn O E AB *) (* Goal: not (@eq (@Tpoint Tn) X O) *) intro. (* Goal: @Ps Tn O E AB *) (* Goal: False *) subst X. (* Goal: @Ps Tn O E AB *) (* Goal: False *) unfold Ps in H4. (* Goal: @Ps Tn O E AB *) (* Goal: False *) unfold Out in H4. (* Goal: @Ps Tn O E AB *) (* Goal: False *) tauto. (* Goal: @Ps Tn O E AB *) subst AB. (* Goal: @Ps Tn O E O *) tauto. Qed. Lemma length_not_col_null : forall O E E' A B AB, Col O E E' -> Length O E E' A B AB -> AB=O. Proof. (* Goal: forall (O E E' A B AB : @Tpoint Tn) (_ : @Col Tn O E E') (_ : @Length Tn O E E' A B AB), @eq (@Tpoint Tn) AB O *) intros. (* Goal: @eq (@Tpoint Tn) AB O *) unfold Length in H0. (* Goal: @eq (@Tpoint Tn) AB O *) spliter. (* Goal: @eq (@Tpoint Tn) AB O *) unfold LeP in H2. (* Goal: @eq (@Tpoint Tn) AB O *) induction H2. (* Goal: @eq (@Tpoint Tn) AB O *) (* Goal: @eq (@Tpoint Tn) AB O *) unfold LtP in H2. (* Goal: @eq (@Tpoint Tn) AB O *) (* Goal: @eq (@Tpoint Tn) AB O *) ex_and H2 X. (* Goal: @eq (@Tpoint Tn) AB O *) (* Goal: @eq (@Tpoint Tn) AB O *) apply diff_sum in H2. (* Goal: @eq (@Tpoint Tn) AB O *) (* Goal: @eq (@Tpoint Tn) AB O *) unfold Sum in H2. (* Goal: @eq (@Tpoint Tn) AB O *) (* Goal: @eq (@Tpoint Tn) AB O *) spliter. (* Goal: @eq (@Tpoint Tn) AB O *) (* Goal: @eq (@Tpoint Tn) AB O *) unfold Ar2 in H2. (* Goal: @eq (@Tpoint Tn) AB O *) (* Goal: @eq (@Tpoint Tn) AB O *) spliter. (* Goal: @eq (@Tpoint Tn) AB O *) (* Goal: @eq (@Tpoint Tn) AB O *) contradiction. (* Goal: @eq (@Tpoint Tn) AB O *) auto. Qed. Lemma triangular_equality_equiv : (forall O E A , O<>E -> (forall E' B C AB BC AC, Bet A B C -> Length O E E' A B AB -> Length O E E' B C BC -> Length O E E' A C AC -> Sum O E E' AB BC AC)) <-> (forall O E E' A B C AB BC AC, O<>E -> Bet A B C -> Length O E E' A B AB -> Length O E E' B C BC -> Length O E E' A C AC -> Sum O E E' AB BC AC). Proof. (* Goal: iff (forall (O E A : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) O E)) (E' B C AB BC AC : @Tpoint Tn) (_ : @Bet Tn A B C) (_ : @Length Tn O E E' A B AB) (_ : @Length Tn O E E' B C BC) (_ : @Length Tn O E E' A C AC), @Sum Tn O E E' AB BC AC) (forall (O E E' A B C AB BC AC : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) O E)) (_ : @Bet Tn A B C) (_ : @Length Tn O E E' A B AB) (_ : @Length Tn O E E' B C BC) (_ : @Length Tn O E E' A C AC), @Sum Tn O E E' AB BC AC) *) split. (* Goal: forall (_ : forall (O E E' A B C AB BC AC : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) O E)) (_ : @Bet Tn A B C) (_ : @Length Tn O E E' A B AB) (_ : @Length Tn O E E' B C BC) (_ : @Length Tn O E E' A C AC), @Sum Tn O E E' AB BC AC) (O E A : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) O E)) (E' B C AB BC AC : @Tpoint Tn) (_ : @Bet Tn A B C) (_ : @Length Tn O E E' A B AB) (_ : @Length Tn O E E' B C BC) (_ : @Length Tn O E E' A C AC), @Sum Tn O E E' AB BC AC *) (* Goal: forall (_ : forall (O E A : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) O E)) (E' B C AB BC AC : @Tpoint Tn) (_ : @Bet Tn A B C) (_ : @Length Tn O E E' A B AB) (_ : @Length Tn O E E' B C BC) (_ : @Length Tn O E E' A C AC), @Sum Tn O E E' AB BC AC) (O E E' A B C AB BC AC : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) O E)) (_ : @Bet Tn A B C) (_ : @Length Tn O E E' A B AB) (_ : @Length Tn O E E' B C BC) (_ : @Length Tn O E E' A C AC), @Sum Tn O E E' AB BC AC *) intros. (* Goal: forall (_ : forall (O E E' A B C AB BC AC : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) O E)) (_ : @Bet Tn A B C) (_ : @Length Tn O E E' A B AB) (_ : @Length Tn O E E' B C BC) (_ : @Length Tn O E E' A C AC), @Sum Tn O E E' AB BC AC) (O E A : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) O E)) (E' B C AB BC AC : @Tpoint Tn) (_ : @Bet Tn A B C) (_ : @Length Tn O E E' A B AB) (_ : @Length Tn O E E' B C BC) (_ : @Length Tn O E E' A C AC), @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) assert(HH:= H O E A H0). (* Goal: forall (_ : forall (O E E' A B C AB BC AC : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) O E)) (_ : @Bet Tn A B C) (_ : @Length Tn O E E' A B AB) (_ : @Length Tn O E E' B C BC) (_ : @Length Tn O E E' A C AC), @Sum Tn O E E' AB BC AC) (O E A : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) O E)) (E' B C AB BC AC : @Tpoint Tn) (_ : @Bet Tn A B C) (_ : @Length Tn O E E' A B AB) (_ : @Length Tn O E E' B C BC) (_ : @Length Tn O E E' A C AC), @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) apply (HH E' B C); auto. (* Goal: forall (_ : forall (O E E' A B C AB BC AC : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) O E)) (_ : @Bet Tn A B C) (_ : @Length Tn O E E' A B AB) (_ : @Length Tn O E E' B C BC) (_ : @Length Tn O E E' A C AC), @Sum Tn O E E' AB BC AC) (O E A : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) O E)) (E' B C AB BC AC : @Tpoint Tn) (_ : @Bet Tn A B C) (_ : @Length Tn O E E' A B AB) (_ : @Length Tn O E E' B C BC) (_ : @Length Tn O E E' A C AC), @Sum Tn O E E' AB BC AC *) intros. (* Goal: @Sum Tn O E E' AB BC AC *) assert(HH:= H O E E' A B C AB BC AC H0 H1 H2 H3 H4). (* Goal: @Sum Tn O E E' AB BC AC *) assumption. Qed. Lemma not_triangular_equality1 : forall O E A , O<>E -> ~ (forall E' B C AB BC AC, Bet A B C -> Length O E E' A B AB -> Length O E E' B C BC -> Length O E E' A C AC -> Sum O E E' AB BC AC). Proof. (* Goal: forall (O E A : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) O E)), not (forall (E' B C AB BC AC : @Tpoint Tn) (_ : @Bet Tn A B C) (_ : @Length Tn O E E' A B AB) (_ : @Length Tn O E E' B C BC) (_ : @Length Tn O E E' A C AC), @Sum Tn O E E' AB BC AC) *) intros. (* Goal: not (forall (E' B C AB BC AC : @Tpoint Tn) (_ : @Bet Tn A B C) (_ : @Length Tn O E E' A B AB) (_ : @Length Tn O E E' B C BC) (_ : @Length Tn O E E' A C AC), @Sum Tn O E E' AB BC AC) *) intro. (* Goal: False *) assert(HH:=(H0 E A A O O O)). (* Goal: False *) assert(Bet A A A); Between. (* Goal: False *) assert(Length O E E A A O). (* Goal: False *) (* Goal: @Length Tn O E E A A O *) apply(length_id_2); auto. (* Goal: False *) assert(HHH:= (HH H1 H2 H2 H2)). (* Goal: False *) unfold Sum in HHH. (* Goal: False *) spliter. (* Goal: False *) ex_and H4 X. (* Goal: False *) ex_and H5 Y. (* Goal: False *) unfold Ar2 in H3. (* Goal: False *) spliter. (* Goal: False *) apply H3. (* Goal: @Col Tn O E E *) Col. Qed. Lemma triangular_equality : forall O E E' A B C AB BC AC, O<>E -> Bet A B C -> Is_length O E E' A B AB -> Is_length O E E' B C BC -> Is_length O E E' A C AC -> Sumg O E E' AB BC AC. Proof. (* Goal: forall (O E E' A B C AB BC AC : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) O E)) (_ : @Bet Tn A B C) (_ : @Is_length Tn O E E' A B AB) (_ : @Is_length Tn O E E' B C BC) (_ : @Is_length Tn O E E' A C AC), @Sumg Tn O E E' AB BC AC *) intros O E E' A B C AB BC AC H H0 Hl1 Hl2 Hl3. (* Goal: @Sumg Tn O E E' AB BC AC *) unfold Is_length in *. (* Goal: @Sumg Tn O E E' AB BC AC *) induction Hl1; induction Hl2; induction Hl3; try(spliter; contradiction). (* Goal: @Sumg Tn O E E' AB BC AC *) unfold Length in *. (* Goal: @Sumg Tn O E E' AB BC AC *) spliter. (* Goal: @Sumg Tn O E E' AB BC AC *) unfold LeP in *. (* Goal: @Sumg Tn O E E' AB BC AC *) induction H11; induction H8; induction H5. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) unfold LtP in *. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) ex_and H11 X. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) ex_and H8 Y. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) ex_and H5 Z. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) apply diff_sum in H11. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) apply diff_sum in H8. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) apply diff_sum in H5. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) assert(AB = X). (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @eq (@Tpoint Tn) AB X *) apply (sum_uniqueness O E E' O X). (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O X X *) (* Goal: @Sum Tn O E E' O X AB *) assumption. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O X X *) unfold Sum in H11. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O X X *) spliter. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O X X *) unfold Ar2 in H11. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O X X *) apply(sum_O_B); tauto. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) subst X. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) assert(BC = Y). (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @eq (@Tpoint Tn) BC Y *) apply (sum_uniqueness O E E' O Y). (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O Y Y *) (* Goal: @Sum Tn O E E' O Y BC *) assumption. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O Y Y *) unfold Sum in H8. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O Y Y *) spliter. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O Y Y *) unfold Ar2 in H8. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O Y Y *) apply(sum_O_B); tauto. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) subst Y. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) assert(AC = Z). (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @eq (@Tpoint Tn) AC Z *) apply (sum_uniqueness O E E' O Z). (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O Z Z *) (* Goal: @Sum Tn O E E' O Z AC *) assumption. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O Z Z *) unfold Sum in H5. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O Z Z *) spliter. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O Z Z *) unfold Ar2 in H5. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O Z Z *) apply(sum_O_B); tauto. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) subst Z. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) assert(forall A B : Tpoint,Col O E A -> Col O E B -> exists C : Tpoint, Sum O E E' A B C). (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: forall (A B : @Tpoint Tn) (_ : @Col Tn O E A) (_ : @Col Tn O E B), @ex (@Tpoint Tn) (fun C : @Tpoint Tn => @Sum Tn O E E' A B C) *) apply(sum_exists O E E' ). (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: not (@Col Tn O E E') *) unfold Sum in H11. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: not (@Col Tn O E E') *) spliter. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: not (@Col Tn O E E') *) unfold Ar2 in H11. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: not (@Col Tn O E E') *) tauto. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) assert(HS:= H16 AB BC H10 H7). (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) ex_and HS AC'. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) assert(Bet O AB AC'). (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Bet Tn O AB AC' *) apply(l14_36_a O E E' AB BC AC' H17). (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Out Tn O AB BC *) eapply (l6_7 _ _ E). (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Out Tn O E BC *) (* Goal: @Out Tn O AB E *) assumption. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Out Tn O E BC *) apply l6_6. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Out Tn O BC E *) assumption. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) assert(HH:= l15_3 O E E' AB BC AC' H17). (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) assert(Cong O AC' A C). (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Cong Tn O AC' A C *) apply(l2_11 O AB AC' A B C); Cong. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Cong Tn AB AC' B C *) apply cong_transitivity with O BC; Cong. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) assert(HP:= sum_pos_pos O E E' AB BC AC' H13 H14 H17). (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) assert(AC = AC'). (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @eq (@Tpoint Tn) AC AC' *) apply(l6_11_uniqueness O A C E AC AC'). (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Cong Tn O AC' A C *) (* Goal: @Out Tn O AC' E *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: not (@eq (@Tpoint Tn) A C) *) (* Goal: not (@eq (@Tpoint Tn) E O) *) intro. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Cong Tn O AC' A C *) (* Goal: @Out Tn O AC' E *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: not (@eq (@Tpoint Tn) A C) *) (* Goal: False *) subst E. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Cong Tn O AC' A C *) (* Goal: @Out Tn O AC' E *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: not (@eq (@Tpoint Tn) A C) *) (* Goal: False *) tauto. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Cong Tn O AC' A C *) (* Goal: @Out Tn O AC' E *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: not (@eq (@Tpoint Tn) A C) *) intro. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Cong Tn O AC' A C *) (* Goal: @Out Tn O AC' E *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: False *) subst C. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Cong Tn O AC' A C *) (* Goal: @Out Tn O AC' E *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: False *) apply between_identity in H0. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Cong Tn O AC' A C *) (* Goal: @Out Tn O AC' E *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: False *) subst B. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Cong Tn O AC' A C *) (* Goal: @Out Tn O AC' E *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: False *) apply cong_identity in H6. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Cong Tn O AC' A C *) (* Goal: @Out Tn O AC' E *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: False *) subst AC. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Cong Tn O AC' A C *) (* Goal: @Out Tn O AC' E *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: False *) unfold Ps in H15. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Cong Tn O AC' A C *) (* Goal: @Out Tn O AC' E *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: False *) unfold Out in H15. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Cong Tn O AC' A C *) (* Goal: @Out Tn O AC' E *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: False *) tauto. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Cong Tn O AC' A C *) (* Goal: @Out Tn O AC' E *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) unfold Ps in H15. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Cong Tn O AC' A C *) (* Goal: @Out Tn O AC' E *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) assumption. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Cong Tn O AC' A C *) (* Goal: @Out Tn O AC' E *) (* Goal: @Cong Tn O AC A C *) Cong. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Cong Tn O AC' A C *) (* Goal: @Out Tn O AC' E *) unfold Ps in HP. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Cong Tn O AC' A C *) (* Goal: @Out Tn O AC' E *) assumption. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Cong Tn O AC' A C *) Cong. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) subst AC'. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) left. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) assumption. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) subst AC. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC O *) apply cong_symmetry in H6. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC O *) apply cong_identity in H6. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC O *) subst C. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC O *) apply between_identity in H0. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC O *) subst B. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC O *) apply cong_identity in H12. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC O *) subst AB. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O BC O *) apply cong_identity in H9. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O BC O *) subst BC. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O O O *) unfold LtP in H8. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O O O *) ex_and H8 X. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O O O *) apply diff_sum in H0. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O O O *) assert(X=O). (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O O O *) (* Goal: @eq (@Tpoint Tn) X O *) apply(sum_uniqueness O E E' O X). (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O O O *) (* Goal: @Sum Tn O E E' O X O *) (* Goal: @Sum Tn O E E' O X X *) apply sum_O_B. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O O O *) (* Goal: @Sum Tn O E E' O X O *) (* Goal: @Col Tn O E X *) (* Goal: not (@Col Tn O E E') *) unfold Sum in H0. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O O O *) (* Goal: @Sum Tn O E E' O X O *) (* Goal: @Col Tn O E X *) (* Goal: not (@Col Tn O E E') *) spliter. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O O O *) (* Goal: @Sum Tn O E E' O X O *) (* Goal: @Col Tn O E X *) (* Goal: not (@Col Tn O E E') *) unfold Ar2 in H0. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O O O *) (* Goal: @Sum Tn O E E' O X O *) (* Goal: @Col Tn O E X *) (* Goal: not (@Col Tn O E E') *) tauto. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O O O *) (* Goal: @Sum Tn O E E' O X O *) (* Goal: @Col Tn O E X *) unfold Ps in H5. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O O O *) (* Goal: @Sum Tn O E E' O X O *) (* Goal: @Col Tn O E X *) apply out_col in H5. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O O O *) (* Goal: @Sum Tn O E E' O X O *) (* Goal: @Col Tn O E X *) Col. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O O O *) (* Goal: @Sum Tn O E E' O X O *) assumption. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O O O *) subst X. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O O O *) unfold Ps in H5. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O O O *) unfold Out in H5. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O O O *) tauto. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) subst BC. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB O AC *) apply cong_symmetry in H9. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB O AC *) apply cong_identity in H9. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB O AC *) subst C. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB O AC *) assert(Cong O AB O AC). (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB O AC *) (* Goal: @Cong Tn O AB O AC *) apply cong_transitivity with A B; Cong. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB O AC *) unfold LtP in H11. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB O AC *) ex_and H11 X. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB O AC *) apply diff_sum in H9. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB O AC *) assert(X = AB). (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB O AC *) (* Goal: @eq (@Tpoint Tn) X AB *) apply (sum_uniqueness O E E' O X). (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB O AC *) (* Goal: @Sum Tn O E E' O X AB *) (* Goal: @Sum Tn O E E' O X X *) apply sum_O_B. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB O AC *) (* Goal: @Sum Tn O E E' O X AB *) (* Goal: @Col Tn O E X *) (* Goal: not (@Col Tn O E E') *) unfold Sum in H9. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB O AC *) (* Goal: @Sum Tn O E E' O X AB *) (* Goal: @Col Tn O E X *) (* Goal: not (@Col Tn O E E') *) spliter. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB O AC *) (* Goal: @Sum Tn O E E' O X AB *) (* Goal: @Col Tn O E X *) (* Goal: not (@Col Tn O E E') *) unfold Ar2 in H9. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB O AC *) (* Goal: @Sum Tn O E E' O X AB *) (* Goal: @Col Tn O E X *) (* Goal: not (@Col Tn O E E') *) tauto. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB O AC *) (* Goal: @Sum Tn O E E' O X AB *) (* Goal: @Col Tn O E X *) unfold Ps in H11. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB O AC *) (* Goal: @Sum Tn O E E' O X AB *) (* Goal: @Col Tn O E X *) apply out_col in H11. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB O AC *) (* Goal: @Sum Tn O E E' O X AB *) (* Goal: @Col Tn O E X *) Col. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB O AC *) (* Goal: @Sum Tn O E E' O X AB *) assumption. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB O AC *) subst X. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB O AC *) unfold LtP in H5. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB O AC *) ex_and H5 Y. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB O AC *) apply diff_sum in H5. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB O AC *) assert(Y = AC). (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB O AC *) (* Goal: @eq (@Tpoint Tn) Y AC *) apply (sum_uniqueness O E E' O Y). (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB O AC *) (* Goal: @Sum Tn O E E' O Y AC *) (* Goal: @Sum Tn O E E' O Y Y *) apply sum_O_B. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB O AC *) (* Goal: @Sum Tn O E E' O Y AC *) (* Goal: @Col Tn O E Y *) (* Goal: not (@Col Tn O E E') *) unfold Sum in H9. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB O AC *) (* Goal: @Sum Tn O E E' O Y AC *) (* Goal: @Col Tn O E Y *) (* Goal: not (@Col Tn O E E') *) spliter. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB O AC *) (* Goal: @Sum Tn O E E' O Y AC *) (* Goal: @Col Tn O E Y *) (* Goal: not (@Col Tn O E E') *) unfold Ar2 in H9. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB O AC *) (* Goal: @Sum Tn O E E' O Y AC *) (* Goal: @Col Tn O E Y *) (* Goal: not (@Col Tn O E E') *) tauto. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB O AC *) (* Goal: @Sum Tn O E E' O Y AC *) (* Goal: @Col Tn O E Y *) unfold Ps in H13. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB O AC *) (* Goal: @Sum Tn O E E' O Y AC *) (* Goal: @Col Tn O E Y *) apply out_col in H13. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB O AC *) (* Goal: @Sum Tn O E E' O Y AC *) (* Goal: @Col Tn O E Y *) Col. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB O AC *) (* Goal: @Sum Tn O E E' O Y AC *) assumption. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB O AC *) subst Y. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB O AC *) assert(AB = AC). (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB O AC *) (* Goal: @eq (@Tpoint Tn) AB AC *) apply(l6_11_uniqueness O A B E AB AC). (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB O AC *) (* Goal: @Cong Tn O AC A B *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O AB A B *) (* Goal: @Out Tn O AB E *) (* Goal: not (@eq (@Tpoint Tn) A B) *) (* Goal: not (@eq (@Tpoint Tn) E O) *) intro. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB O AC *) (* Goal: @Cong Tn O AC A B *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O AB A B *) (* Goal: @Out Tn O AB E *) (* Goal: not (@eq (@Tpoint Tn) A B) *) (* Goal: False *) subst E. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB O AC *) (* Goal: @Cong Tn O AC A B *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O AB A B *) (* Goal: @Out Tn O AB E *) (* Goal: not (@eq (@Tpoint Tn) A B) *) (* Goal: False *) unfold Ps in H13. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB O AC *) (* Goal: @Cong Tn O AC A B *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O AB A B *) (* Goal: @Out Tn O AB E *) (* Goal: not (@eq (@Tpoint Tn) A B) *) (* Goal: False *) unfold Out in H13. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB O AC *) (* Goal: @Cong Tn O AC A B *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O AB A B *) (* Goal: @Out Tn O AB E *) (* Goal: not (@eq (@Tpoint Tn) A B) *) (* Goal: False *) tauto. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB O AC *) (* Goal: @Cong Tn O AC A B *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O AB A B *) (* Goal: @Out Tn O AB E *) (* Goal: not (@eq (@Tpoint Tn) A B) *) intro. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB O AC *) (* Goal: @Cong Tn O AC A B *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O AB A B *) (* Goal: @Out Tn O AB E *) (* Goal: False *) subst B. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB O AC *) (* Goal: @Cong Tn O AC A B *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O AB A B *) (* Goal: @Out Tn O AB E *) (* Goal: False *) apply cong_identity in H6. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB O AC *) (* Goal: @Cong Tn O AC A B *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O AB A B *) (* Goal: @Out Tn O AB E *) (* Goal: False *) subst AC. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB O AC *) (* Goal: @Cong Tn O AC A B *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O AB A B *) (* Goal: @Out Tn O AB E *) (* Goal: False *) unfold Ps in H13. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB O AC *) (* Goal: @Cong Tn O AC A B *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O AB A B *) (* Goal: @Out Tn O AB E *) (* Goal: False *) unfold Out in H13. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB O AC *) (* Goal: @Cong Tn O AC A B *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O AB A B *) (* Goal: @Out Tn O AB E *) (* Goal: False *) tauto. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB O AC *) (* Goal: @Cong Tn O AC A B *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O AB A B *) (* Goal: @Out Tn O AB E *) unfold Ps in H11. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB O AC *) (* Goal: @Cong Tn O AC A B *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O AB A B *) (* Goal: @Out Tn O AB E *) assumption. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB O AC *) (* Goal: @Cong Tn O AC A B *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O AB A B *) Cong. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB O AC *) (* Goal: @Cong Tn O AC A B *) (* Goal: @Out Tn O AC E *) unfold Ps in H13. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB O AC *) (* Goal: @Cong Tn O AC A B *) (* Goal: @Out Tn O AC E *) assumption. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB O AC *) (* Goal: @Cong Tn O AC A B *) Cong. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB O AC *) subst AB. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AC O AC *) left. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AC O AC *) apply sum_A_O. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Col Tn O E AC *) (* Goal: not (@Col Tn O E E') *) unfold Sum in H9. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Col Tn O E AC *) (* Goal: not (@Col Tn O E E') *) unfold Ar2 in H9. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Col Tn O E AC *) (* Goal: not (@Col Tn O E E') *) tauto. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Col Tn O E AC *) unfold Ps in H11. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Col Tn O E AC *) apply out_col in H11. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Col Tn O E AC *) Col. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) subst AC. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC O *) subst BC. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB O O *) apply cong_symmetry in H6. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB O O *) apply cong_identity in H6. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB O O *) subst C. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB O O *) apply cong_symmetry in H9. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB O O *) apply cong_identity in H9. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB O O *) subst B. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB O O *) apply cong_identity in H12. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB O O *) subst AB. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O O O *) left. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O O O *) apply sum_O_O. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: not (@Col Tn O E E') *) unfold LtP in H11. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: not (@Col Tn O E E') *) ex_and H11 X. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: not (@Col Tn O E E') *) apply diff_sum in H5. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: not (@Col Tn O E E') *) unfold Sum in H5. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: not (@Col Tn O E E') *) unfold Ar2 in H5. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: not (@Col Tn O E E') *) tauto. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) subst AB. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O BC AC *) apply cong_symmetry in H12. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O BC AC *) apply cong_identity in H12. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O BC AC *) subst B. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O BC AC *) assert(BC = AC). (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O BC AC *) (* Goal: @eq (@Tpoint Tn) BC AC *) apply(l6_11_uniqueness O A C E BC AC). (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) (* Goal: not (@eq (@Tpoint Tn) A C) *) (* Goal: not (@eq (@Tpoint Tn) E O) *) intro. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) (* Goal: not (@eq (@Tpoint Tn) A C) *) (* Goal: False *) subst E. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) (* Goal: not (@eq (@Tpoint Tn) A C) *) (* Goal: False *) tauto. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) (* Goal: not (@eq (@Tpoint Tn) A C) *) intro. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) (* Goal: False *) subst C. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) (* Goal: False *) apply cong_identity in H9. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) (* Goal: False *) subst BC. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) (* Goal: False *) unfold LtP in H8. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) (* Goal: False *) ex_and H8 X. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) (* Goal: False *) apply diff_sum in H8. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) (* Goal: False *) assert(X = O). (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) (* Goal: False *) (* Goal: @eq (@Tpoint Tn) X O *) apply (sum_uniqueness O E E' O X). (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) (* Goal: False *) (* Goal: @Sum Tn O E E' O X O *) (* Goal: @Sum Tn O E E' O X X *) apply sum_O_B. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) (* Goal: False *) (* Goal: @Sum Tn O E E' O X O *) (* Goal: @Col Tn O E X *) (* Goal: not (@Col Tn O E E') *) unfold Sum in H8. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) (* Goal: False *) (* Goal: @Sum Tn O E E' O X O *) (* Goal: @Col Tn O E X *) (* Goal: not (@Col Tn O E E') *) unfold Ar2 in H8. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) (* Goal: False *) (* Goal: @Sum Tn O E E' O X O *) (* Goal: @Col Tn O E X *) (* Goal: not (@Col Tn O E E') *) tauto; unfold Ps in H13. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) (* Goal: False *) (* Goal: @Sum Tn O E E' O X O *) (* Goal: @Col Tn O E X *) unfold Ps in H9. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) (* Goal: False *) (* Goal: @Sum Tn O E E' O X O *) (* Goal: @Col Tn O E X *) apply out_col in H9. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) (* Goal: False *) (* Goal: @Sum Tn O E E' O X O *) (* Goal: @Col Tn O E X *) Col. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) (* Goal: False *) (* Goal: @Sum Tn O E E' O X O *) assumption. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) (* Goal: False *) subst X. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) (* Goal: False *) unfold Ps in H9. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) (* Goal: False *) unfold Out in H9. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) (* Goal: False *) tauto. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) unfold LtP in H8. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) ex_and H8 X. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) apply diff_sum in H8. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) assert(X = BC). (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) (* Goal: @eq (@Tpoint Tn) X BC *) apply (sum_uniqueness O E E' O X). (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) (* Goal: @Sum Tn O E E' O X BC *) (* Goal: @Sum Tn O E E' O X X *) apply sum_O_B. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) (* Goal: @Sum Tn O E E' O X BC *) (* Goal: @Col Tn O E X *) (* Goal: not (@Col Tn O E E') *) unfold Sum in H8. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) (* Goal: @Sum Tn O E E' O X BC *) (* Goal: @Col Tn O E X *) (* Goal: not (@Col Tn O E E') *) unfold Ar2 in H8. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) (* Goal: @Sum Tn O E E' O X BC *) (* Goal: @Col Tn O E X *) (* Goal: not (@Col Tn O E E') *) tauto; unfold Out in H13. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) (* Goal: @Sum Tn O E E' O X BC *) (* Goal: @Col Tn O E X *) unfold Ps in H11. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) (* Goal: @Sum Tn O E E' O X BC *) (* Goal: @Col Tn O E X *) apply out_col in H11. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) (* Goal: @Sum Tn O E E' O X BC *) (* Goal: @Col Tn O E X *) Col. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) (* Goal: @Sum Tn O E E' O X BC *) assumption. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) subst X. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) unfold Ps in H11. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) assumption. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) Cong. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) unfold LtP in H5. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) ex_and H5 X. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) apply diff_sum in H5. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) assert(X = AC). (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @eq (@Tpoint Tn) X AC *) apply (sum_uniqueness O E E' O X). (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Sum Tn O E E' O X AC *) (* Goal: @Sum Tn O E E' O X X *) apply sum_O_B. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Sum Tn O E E' O X AC *) (* Goal: @Col Tn O E X *) (* Goal: not (@Col Tn O E E') *) unfold Sum in H5. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Sum Tn O E E' O X AC *) (* Goal: @Col Tn O E X *) (* Goal: not (@Col Tn O E E') *) unfold Ar2 in H5. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Sum Tn O E E' O X AC *) (* Goal: @Col Tn O E X *) (* Goal: not (@Col Tn O E E') *) tauto; unfold Out in H13. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Sum Tn O E E' O X AC *) (* Goal: @Col Tn O E X *) unfold Ps in H11. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Sum Tn O E E' O X AC *) (* Goal: @Col Tn O E X *) apply out_col in H11. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Sum Tn O E E' O X AC *) (* Goal: @Col Tn O E X *) Col. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Sum Tn O E E' O X AC *) assumption. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) subst X. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) unfold Ps in H11. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) assumption. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) Cong. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O BC AC *) subst AC. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O BC BC *) left. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O BC BC *) apply sum_O_B. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Col Tn O E BC *) (* Goal: not (@Col Tn O E E') *) unfold LtP in H5. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Col Tn O E BC *) (* Goal: not (@Col Tn O E E') *) ex_and H5 X. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Col Tn O E BC *) (* Goal: not (@Col Tn O E E') *) apply diff_sum in H5. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Col Tn O E BC *) (* Goal: not (@Col Tn O E E') *) unfold Sum in H5. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Col Tn O E BC *) (* Goal: not (@Col Tn O E E') *) unfold Ar2 in H5. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Col Tn O E BC *) (* Goal: not (@Col Tn O E E') *) tauto. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Col Tn O E BC *) Col. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) subst AC. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC O *) subst AB. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O BC O *) apply cong_symmetry in H12. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O BC O *) apply cong_identity in H12. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O BC O *) subst B. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O BC O *) apply cong_symmetry in H6. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O BC O *) apply cong_identity in H6. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O BC O *) subst C. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O BC O *) apply cong_identity in H9. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O BC O *) subst BC. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O O O *) left. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O O O *) apply sum_O_O. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: not (@Col Tn O E E') *) unfold LtP in H8. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: not (@Col Tn O E E') *) ex_and H8 X. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: not (@Col Tn O E E') *) apply diff_sum in H5. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: not (@Col Tn O E E') *) unfold Sum in H5. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: not (@Col Tn O E E') *) unfold Ar2 in H5. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: not (@Col Tn O E E') *) tauto. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' AB BC AC *) subst AB. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O BC AC *) subst BC. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O O AC *) apply cong_symmetry in H9. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O O AC *) apply cong_identity in H9. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O O AC *) subst C. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O O AC *) apply cong_symmetry in H12. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O O AC *) apply cong_identity in H12. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O O AC *) subst B. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O O AC *) apply cong_identity in H6. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O O AC *) subst AC. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sumg Tn O E E' O O O *) left. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O O O *) apply sum_O_O. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: not (@Col Tn O E E') *) unfold LtP in H5. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: not (@Col Tn O E E') *) ex_and H5 X. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: not (@Col Tn O E E') *) apply diff_sum in H5. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: not (@Col Tn O E E') *) unfold Sum in H5. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: not (@Col Tn O E E') *) unfold Ar2 in H5. (* Goal: @Sumg Tn O E E' AB BC AC *) (* Goal: not (@Col Tn O E E') *) tauto. (* Goal: @Sumg Tn O E E' AB BC AC *) treat_equalities. (* Goal: @Sumg Tn O E E' O O O *) assert(HH:=col_dec O E E'). (* Goal: @Sumg Tn O E E' O O O *) induction HH. (* Goal: @Sumg Tn O E E' O O O *) (* Goal: @Sumg Tn O E E' O O O *) right. (* Goal: @Sumg Tn O E E' O O O *) (* Goal: and (not (@Ar2 Tn O E E' O O O)) (@eq (@Tpoint Tn) O O) *) split. (* Goal: @Sumg Tn O E E' O O O *) (* Goal: @eq (@Tpoint Tn) O O *) (* Goal: not (@Ar2 Tn O E E' O O O) *) intro. (* Goal: @Sumg Tn O E E' O O O *) (* Goal: @eq (@Tpoint Tn) O O *) (* Goal: False *) unfold Ar2 in H1. (* Goal: @Sumg Tn O E E' O O O *) (* Goal: @eq (@Tpoint Tn) O O *) (* Goal: False *) spliter. (* Goal: @Sumg Tn O E E' O O O *) (* Goal: @eq (@Tpoint Tn) O O *) (* Goal: False *) contradiction. (* Goal: @Sumg Tn O E E' O O O *) (* Goal: @eq (@Tpoint Tn) O O *) tauto. (* Goal: @Sumg Tn O E E' O O O *) left. (* Goal: @Sum Tn O E E' O O O *) apply sum_O_O. (* Goal: not (@Col Tn O E E') *) auto. Qed. Lemma length_O : forall O E E', O <> E -> Length O E E' O O O. Proof. (* Goal: forall (O E E' : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) O E)), @Length Tn O E E' O O O *) intros. (* Goal: @Length Tn O E E' O O O *) unfold Length. (* Goal: and (not (@eq (@Tpoint Tn) O E)) (and (@Col Tn O E O) (and (@LeP Tn O E E' O O) (@Cong Tn O O O O))) *) repeat split; Col. (* Goal: @Cong Tn O O O O *) (* Goal: @LeP Tn O E E' O O *) unfold LeP. (* Goal: @Cong Tn O O O O *) (* Goal: or (@LtP Tn O E E' O O) (@eq (@Tpoint Tn) O O) *) right;auto. (* Goal: @Cong Tn O O O O *) Cong. Qed. Lemma triangular_equality_bis : forall O E E' A B C AB BC AC, A <> B \/ A <> C \/ B <> C -> O<>E -> Bet A B C -> Length O E E' A B AB -> Length O E E' B C BC -> Length O E E' A C AC -> Sum O E E' AB BC AC. Proof. (* Goal: forall (O E E' A B C AB BC AC : @Tpoint Tn) (_ : or (not (@eq (@Tpoint Tn) A B)) (or (not (@eq (@Tpoint Tn) A C)) (not (@eq (@Tpoint Tn) B C)))) (_ : not (@eq (@Tpoint Tn) O E)) (_ : @Bet Tn A B C) (_ : @Length Tn O E E' A B AB) (_ : @Length Tn O E E' B C BC) (_ : @Length Tn O E E' A C AC), @Sum Tn O E E' AB BC AC *) intros O E E' A B C AB BC AC. (* Goal: forall (_ : or (not (@eq (@Tpoint Tn) A B)) (or (not (@eq (@Tpoint Tn) A C)) (not (@eq (@Tpoint Tn) B C)))) (_ : not (@eq (@Tpoint Tn) O E)) (_ : @Bet Tn A B C) (_ : @Length Tn O E E' A B AB) (_ : @Length Tn O E E' B C BC) (_ : @Length Tn O E E' A C AC), @Sum Tn O E E' AB BC AC *) intro HH0. (* Goal: forall (_ : not (@eq (@Tpoint Tn) O E)) (_ : @Bet Tn A B C) (_ : @Length Tn O E E' A B AB) (_ : @Length Tn O E E' B C BC) (_ : @Length Tn O E E' A C AC), @Sum Tn O E E' AB BC AC *) intros. (* Goal: @Sum Tn O E E' AB BC AC *) unfold Length in *. (* Goal: @Sum Tn O E E' AB BC AC *) spliter. (* Goal: @Sum Tn O E E' AB BC AC *) unfold LeP in *. (* Goal: @Sum Tn O E E' AB BC AC *) induction H11; induction H8; induction H5. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) unfold LtP in *. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) ex_and H11 X. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) ex_and H8 Y. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) ex_and H5 Z. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) apply diff_sum in H11. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) apply diff_sum in H8. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) apply diff_sum in H5. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) assert(AB = X). (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @eq (@Tpoint Tn) AB X *) apply (sum_uniqueness O E E' O X). (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O X X *) (* Goal: @Sum Tn O E E' O X AB *) assumption. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O X X *) unfold Sum in H11. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O X X *) spliter. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O X X *) unfold Ar2 in H11. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O X X *) apply(sum_O_B); tauto. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) subst X. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) assert(BC = Y). (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @eq (@Tpoint Tn) BC Y *) apply (sum_uniqueness O E E' O Y). (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O Y Y *) (* Goal: @Sum Tn O E E' O Y BC *) assumption. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O Y Y *) unfold Sum in H8. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O Y Y *) spliter. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O Y Y *) unfold Ar2 in H8. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O Y Y *) apply(sum_O_B); tauto. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) subst Y. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) assert(AC = Z). (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @eq (@Tpoint Tn) AC Z *) apply (sum_uniqueness O E E' O Z). (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O Z Z *) (* Goal: @Sum Tn O E E' O Z AC *) assumption. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O Z Z *) unfold Sum in H5. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O Z Z *) spliter. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O Z Z *) unfold Ar2 in H5. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O Z Z *) apply(sum_O_B); tauto. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) subst Z. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) assert(forall A B : Tpoint,Col O E A -> Col O E B -> exists C : Tpoint, Sum O E E' A B C). (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: forall (A B : @Tpoint Tn) (_ : @Col Tn O E A) (_ : @Col Tn O E B), @ex (@Tpoint Tn) (fun C : @Tpoint Tn => @Sum Tn O E E' A B C) *) apply(sum_exists O E E' ). (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: not (@Col Tn O E E') *) unfold Sum in H11. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: not (@Col Tn O E E') *) spliter. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: not (@Col Tn O E E') *) unfold Ar2 in H11. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: not (@Col Tn O E E') *) tauto. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) assert(HS:= H16 AB BC H10 H7). (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) ex_and HS AC'. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) assert(Bet O AB AC'). (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Bet Tn O AB AC' *) apply(l14_36_a O E E' AB BC AC' H17). (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Out Tn O AB BC *) eapply (l6_7 _ _ E). (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Out Tn O E BC *) (* Goal: @Out Tn O AB E *) assumption. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Out Tn O E BC *) apply l6_6. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Out Tn O BC E *) assumption. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) assert(HH:= l15_3 O E E' AB BC AC' H17). (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) assert(Cong O AC' A C). (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Cong Tn O AC' A C *) apply(l2_11 O AB AC' A B C); Cong. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Cong Tn AB AC' B C *) apply cong_transitivity with O BC; Cong. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) assert(HP:= sum_pos_pos O E E' AB BC AC' H13 H14 H17). (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) assert(AC = AC'). (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @eq (@Tpoint Tn) AC AC' *) apply(l6_11_uniqueness O A C E AC AC'). (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Cong Tn O AC' A C *) (* Goal: @Out Tn O AC' E *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: not (@eq (@Tpoint Tn) A C) *) (* Goal: not (@eq (@Tpoint Tn) E O) *) intro. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Cong Tn O AC' A C *) (* Goal: @Out Tn O AC' E *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: not (@eq (@Tpoint Tn) A C) *) (* Goal: False *) subst E. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Cong Tn O AC' A C *) (* Goal: @Out Tn O AC' E *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: not (@eq (@Tpoint Tn) A C) *) (* Goal: False *) unfold Ps in H15. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Cong Tn O AC' A C *) (* Goal: @Out Tn O AC' E *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: not (@eq (@Tpoint Tn) A C) *) (* Goal: False *) unfold Out in H15. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Cong Tn O AC' A C *) (* Goal: @Out Tn O AC' E *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: not (@eq (@Tpoint Tn) A C) *) (* Goal: False *) tauto. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Cong Tn O AC' A C *) (* Goal: @Out Tn O AC' E *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: not (@eq (@Tpoint Tn) A C) *) intro. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Cong Tn O AC' A C *) (* Goal: @Out Tn O AC' E *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: False *) subst C. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Cong Tn O AC' A C *) (* Goal: @Out Tn O AC' E *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: False *) apply between_identity in H0. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Cong Tn O AC' A C *) (* Goal: @Out Tn O AC' E *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: False *) subst B. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Cong Tn O AC' A C *) (* Goal: @Out Tn O AC' E *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: False *) apply cong_identity in H6. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Cong Tn O AC' A C *) (* Goal: @Out Tn O AC' E *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: False *) subst AC. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Cong Tn O AC' A C *) (* Goal: @Out Tn O AC' E *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: False *) unfold Ps in H15. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Cong Tn O AC' A C *) (* Goal: @Out Tn O AC' E *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: False *) unfold Out in H15. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Cong Tn O AC' A C *) (* Goal: @Out Tn O AC' E *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: False *) tauto. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Cong Tn O AC' A C *) (* Goal: @Out Tn O AC' E *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) unfold Ps in H15. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Cong Tn O AC' A C *) (* Goal: @Out Tn O AC' E *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) assumption. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Cong Tn O AC' A C *) (* Goal: @Out Tn O AC' E *) (* Goal: @Cong Tn O AC A C *) Cong. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Cong Tn O AC' A C *) (* Goal: @Out Tn O AC' E *) unfold Ps in HP. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Cong Tn O AC' A C *) (* Goal: @Out Tn O AC' E *) assumption. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Cong Tn O AC' A C *) Cong. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) subst AC'. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) assumption. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) subst AC. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC O *) apply cong_symmetry in H6. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC O *) apply cong_identity in H6. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC O *) subst C. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC O *) apply between_identity in H0. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC O *) subst B. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC O *) apply cong_identity in H12. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC O *) subst AB. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O BC O *) apply cong_identity in H9. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O BC O *) subst BC. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O O O *) unfold LtP in H8. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O O O *) ex_and H8 X. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O O O *) apply diff_sum in H0. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O O O *) assert(X=O). (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O O O *) (* Goal: @eq (@Tpoint Tn) X O *) apply(sum_uniqueness O E E' O X). (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O O O *) (* Goal: @Sum Tn O E E' O X O *) (* Goal: @Sum Tn O E E' O X X *) apply sum_O_B. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O O O *) (* Goal: @Sum Tn O E E' O X O *) (* Goal: @Col Tn O E X *) (* Goal: not (@Col Tn O E E') *) unfold Sum in H0. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O O O *) (* Goal: @Sum Tn O E E' O X O *) (* Goal: @Col Tn O E X *) (* Goal: not (@Col Tn O E E') *) spliter. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O O O *) (* Goal: @Sum Tn O E E' O X O *) (* Goal: @Col Tn O E X *) (* Goal: not (@Col Tn O E E') *) unfold Ar2 in H0. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O O O *) (* Goal: @Sum Tn O E E' O X O *) (* Goal: @Col Tn O E X *) (* Goal: not (@Col Tn O E E') *) tauto. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O O O *) (* Goal: @Sum Tn O E E' O X O *) (* Goal: @Col Tn O E X *) unfold Ps in H5. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O O O *) (* Goal: @Sum Tn O E E' O X O *) (* Goal: @Col Tn O E X *) apply out_col in H5. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O O O *) (* Goal: @Sum Tn O E E' O X O *) (* Goal: @Col Tn O E X *) Col. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O O O *) (* Goal: @Sum Tn O E E' O X O *) assumption. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O O O *) subst X. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O O O *) unfold Ps in H5. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O O O *) unfold Out in H5. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O O O *) tauto. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) subst BC. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB O AC *) apply cong_symmetry in H9. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB O AC *) apply cong_identity in H9. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB O AC *) subst C. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB O AC *) assert(Cong O AB O AC). (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB O AC *) (* Goal: @Cong Tn O AB O AC *) apply cong_transitivity with A B; Cong. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB O AC *) unfold LtP in H11. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB O AC *) ex_and H11 X. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB O AC *) apply diff_sum in H9. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB O AC *) assert(X = AB). (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB O AC *) (* Goal: @eq (@Tpoint Tn) X AB *) apply (sum_uniqueness O E E' O X). (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB O AC *) (* Goal: @Sum Tn O E E' O X AB *) (* Goal: @Sum Tn O E E' O X X *) apply sum_O_B. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB O AC *) (* Goal: @Sum Tn O E E' O X AB *) (* Goal: @Col Tn O E X *) (* Goal: not (@Col Tn O E E') *) unfold Sum in H9. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB O AC *) (* Goal: @Sum Tn O E E' O X AB *) (* Goal: @Col Tn O E X *) (* Goal: not (@Col Tn O E E') *) spliter. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB O AC *) (* Goal: @Sum Tn O E E' O X AB *) (* Goal: @Col Tn O E X *) (* Goal: not (@Col Tn O E E') *) unfold Ar2 in H9. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB O AC *) (* Goal: @Sum Tn O E E' O X AB *) (* Goal: @Col Tn O E X *) (* Goal: not (@Col Tn O E E') *) tauto. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB O AC *) (* Goal: @Sum Tn O E E' O X AB *) (* Goal: @Col Tn O E X *) unfold Ps in H11. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB O AC *) (* Goal: @Sum Tn O E E' O X AB *) (* Goal: @Col Tn O E X *) apply out_col in H11. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB O AC *) (* Goal: @Sum Tn O E E' O X AB *) (* Goal: @Col Tn O E X *) Col. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB O AC *) (* Goal: @Sum Tn O E E' O X AB *) assumption. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB O AC *) subst X. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB O AC *) unfold LtP in H5. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB O AC *) ex_and H5 Y. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB O AC *) apply diff_sum in H5. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB O AC *) assert(Y = AC). (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB O AC *) (* Goal: @eq (@Tpoint Tn) Y AC *) apply (sum_uniqueness O E E' O Y). (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB O AC *) (* Goal: @Sum Tn O E E' O Y AC *) (* Goal: @Sum Tn O E E' O Y Y *) apply sum_O_B. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB O AC *) (* Goal: @Sum Tn O E E' O Y AC *) (* Goal: @Col Tn O E Y *) (* Goal: not (@Col Tn O E E') *) unfold Sum in H9. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB O AC *) (* Goal: @Sum Tn O E E' O Y AC *) (* Goal: @Col Tn O E Y *) (* Goal: not (@Col Tn O E E') *) spliter. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB O AC *) (* Goal: @Sum Tn O E E' O Y AC *) (* Goal: @Col Tn O E Y *) (* Goal: not (@Col Tn O E E') *) unfold Ar2 in H9. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB O AC *) (* Goal: @Sum Tn O E E' O Y AC *) (* Goal: @Col Tn O E Y *) (* Goal: not (@Col Tn O E E') *) tauto. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB O AC *) (* Goal: @Sum Tn O E E' O Y AC *) (* Goal: @Col Tn O E Y *) unfold Ps in H13. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB O AC *) (* Goal: @Sum Tn O E E' O Y AC *) (* Goal: @Col Tn O E Y *) apply out_col in H13. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB O AC *) (* Goal: @Sum Tn O E E' O Y AC *) (* Goal: @Col Tn O E Y *) Col. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB O AC *) (* Goal: @Sum Tn O E E' O Y AC *) assumption. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB O AC *) subst Y. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB O AC *) assert(AB = AC). (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB O AC *) (* Goal: @eq (@Tpoint Tn) AB AC *) apply(l6_11_uniqueness O A B E AB AC). (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB O AC *) (* Goal: @Cong Tn O AC A B *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O AB A B *) (* Goal: @Out Tn O AB E *) (* Goal: not (@eq (@Tpoint Tn) A B) *) (* Goal: not (@eq (@Tpoint Tn) E O) *) intro. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB O AC *) (* Goal: @Cong Tn O AC A B *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O AB A B *) (* Goal: @Out Tn O AB E *) (* Goal: not (@eq (@Tpoint Tn) A B) *) (* Goal: False *) subst E. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB O AC *) (* Goal: @Cong Tn O AC A B *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O AB A B *) (* Goal: @Out Tn O AB E *) (* Goal: not (@eq (@Tpoint Tn) A B) *) (* Goal: False *) unfold Ps in H13. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB O AC *) (* Goal: @Cong Tn O AC A B *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O AB A B *) (* Goal: @Out Tn O AB E *) (* Goal: not (@eq (@Tpoint Tn) A B) *) (* Goal: False *) unfold Out in H13. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB O AC *) (* Goal: @Cong Tn O AC A B *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O AB A B *) (* Goal: @Out Tn O AB E *) (* Goal: not (@eq (@Tpoint Tn) A B) *) (* Goal: False *) tauto. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB O AC *) (* Goal: @Cong Tn O AC A B *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O AB A B *) (* Goal: @Out Tn O AB E *) (* Goal: not (@eq (@Tpoint Tn) A B) *) intro. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB O AC *) (* Goal: @Cong Tn O AC A B *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O AB A B *) (* Goal: @Out Tn O AB E *) (* Goal: False *) subst B. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB O AC *) (* Goal: @Cong Tn O AC A B *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O AB A B *) (* Goal: @Out Tn O AB E *) (* Goal: False *) apply cong_identity in H6. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB O AC *) (* Goal: @Cong Tn O AC A B *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O AB A B *) (* Goal: @Out Tn O AB E *) (* Goal: False *) subst AC. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB O AC *) (* Goal: @Cong Tn O AC A B *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O AB A B *) (* Goal: @Out Tn O AB E *) (* Goal: False *) unfold Ps in H13. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB O AC *) (* Goal: @Cong Tn O AC A B *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O AB A B *) (* Goal: @Out Tn O AB E *) (* Goal: False *) unfold Out in H13. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB O AC *) (* Goal: @Cong Tn O AC A B *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O AB A B *) (* Goal: @Out Tn O AB E *) (* Goal: False *) tauto. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB O AC *) (* Goal: @Cong Tn O AC A B *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O AB A B *) (* Goal: @Out Tn O AB E *) unfold Ps in H11. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB O AC *) (* Goal: @Cong Tn O AC A B *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O AB A B *) (* Goal: @Out Tn O AB E *) assumption. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB O AC *) (* Goal: @Cong Tn O AC A B *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O AB A B *) Cong. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB O AC *) (* Goal: @Cong Tn O AC A B *) (* Goal: @Out Tn O AC E *) unfold Ps in H13. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB O AC *) (* Goal: @Cong Tn O AC A B *) (* Goal: @Out Tn O AC E *) assumption. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB O AC *) (* Goal: @Cong Tn O AC A B *) Cong. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB O AC *) subst AB. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AC O AC *) apply sum_A_O. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Col Tn O E AC *) (* Goal: not (@Col Tn O E E') *) unfold Sum in H9. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Col Tn O E AC *) (* Goal: not (@Col Tn O E E') *) unfold Ar2 in H9. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Col Tn O E AC *) (* Goal: not (@Col Tn O E E') *) tauto. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Col Tn O E AC *) unfold Ps in H11. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Col Tn O E AC *) apply out_col in H11. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Col Tn O E AC *) Col. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) subst AC. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC O *) subst BC. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB O O *) apply cong_symmetry in H6. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB O O *) apply cong_identity in H6. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB O O *) subst C. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB O O *) apply cong_symmetry in H9. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB O O *) apply cong_identity in H9. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB O O *) subst B. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB O O *) apply cong_identity in H12. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB O O *) subst AB. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O O O *) apply sum_O_O. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: not (@Col Tn O E E') *) unfold LtP in H11. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: not (@Col Tn O E E') *) ex_and H11 X. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: not (@Col Tn O E E') *) apply diff_sum in H5. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: not (@Col Tn O E E') *) unfold Sum in H5. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: not (@Col Tn O E E') *) unfold Ar2 in H5. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: not (@Col Tn O E E') *) tauto. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) subst AB. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O BC AC *) apply cong_symmetry in H12. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O BC AC *) apply cong_identity in H12. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O BC AC *) subst B. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O BC AC *) assert(BC = AC). (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O BC AC *) (* Goal: @eq (@Tpoint Tn) BC AC *) apply(l6_11_uniqueness O A C E BC AC). (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) (* Goal: not (@eq (@Tpoint Tn) A C) *) (* Goal: not (@eq (@Tpoint Tn) E O) *) intro. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) (* Goal: not (@eq (@Tpoint Tn) A C) *) (* Goal: False *) subst E. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) (* Goal: not (@eq (@Tpoint Tn) A C) *) (* Goal: False *) tauto. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) (* Goal: not (@eq (@Tpoint Tn) A C) *) intro. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) (* Goal: False *) subst C. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) (* Goal: False *) apply cong_identity in H9. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) (* Goal: False *) subst BC. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) (* Goal: False *) unfold LtP in H8. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) (* Goal: False *) ex_and H8 X. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) (* Goal: False *) apply diff_sum in H8. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) (* Goal: False *) assert(X = O). (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) (* Goal: False *) (* Goal: @eq (@Tpoint Tn) X O *) apply (sum_uniqueness O E E' O X). (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) (* Goal: False *) (* Goal: @Sum Tn O E E' O X O *) (* Goal: @Sum Tn O E E' O X X *) apply sum_O_B. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) (* Goal: False *) (* Goal: @Sum Tn O E E' O X O *) (* Goal: @Col Tn O E X *) (* Goal: not (@Col Tn O E E') *) unfold Sum in H8. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) (* Goal: False *) (* Goal: @Sum Tn O E E' O X O *) (* Goal: @Col Tn O E X *) (* Goal: not (@Col Tn O E E') *) unfold Ar2 in H8. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) (* Goal: False *) (* Goal: @Sum Tn O E E' O X O *) (* Goal: @Col Tn O E X *) (* Goal: not (@Col Tn O E E') *) tauto; unfold Ps in H13. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) (* Goal: False *) (* Goal: @Sum Tn O E E' O X O *) (* Goal: @Col Tn O E X *) unfold Ps in H9. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) (* Goal: False *) (* Goal: @Sum Tn O E E' O X O *) (* Goal: @Col Tn O E X *) apply out_col in H9. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) (* Goal: False *) (* Goal: @Sum Tn O E E' O X O *) (* Goal: @Col Tn O E X *) Col. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) (* Goal: False *) (* Goal: @Sum Tn O E E' O X O *) assumption. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) (* Goal: False *) subst X. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) (* Goal: False *) unfold Ps in H9. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) (* Goal: False *) unfold Out in H9. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) (* Goal: False *) tauto. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) unfold LtP in H8. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) ex_and H8 X. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) apply diff_sum in H8. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) assert(X = BC). (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) (* Goal: @eq (@Tpoint Tn) X BC *) apply (sum_uniqueness O E E' O X). (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) (* Goal: @Sum Tn O E E' O X BC *) (* Goal: @Sum Tn O E E' O X X *) apply sum_O_B. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) (* Goal: @Sum Tn O E E' O X BC *) (* Goal: @Col Tn O E X *) (* Goal: not (@Col Tn O E E') *) unfold Sum in H8. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) (* Goal: @Sum Tn O E E' O X BC *) (* Goal: @Col Tn O E X *) (* Goal: not (@Col Tn O E E') *) unfold Ar2 in H8. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) (* Goal: @Sum Tn O E E' O X BC *) (* Goal: @Col Tn O E X *) (* Goal: not (@Col Tn O E E') *) tauto; unfold Out in H13. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) (* Goal: @Sum Tn O E E' O X BC *) (* Goal: @Col Tn O E X *) unfold Ps in H11. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) (* Goal: @Sum Tn O E E' O X BC *) (* Goal: @Col Tn O E X *) apply out_col in H11. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) (* Goal: @Sum Tn O E E' O X BC *) (* Goal: @Col Tn O E X *) Col. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) (* Goal: @Sum Tn O E E' O X BC *) assumption. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) subst X. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) unfold Ps in H11. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) (* Goal: @Out Tn O BC E *) assumption. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Cong Tn O BC A C *) Cong. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) unfold LtP in H5. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) ex_and H5 X. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) apply diff_sum in H5. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) assert(X = AC). (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @eq (@Tpoint Tn) X AC *) apply (sum_uniqueness O E E' O X). (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Sum Tn O E E' O X AC *) (* Goal: @Sum Tn O E E' O X X *) apply sum_O_B. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Sum Tn O E E' O X AC *) (* Goal: @Col Tn O E X *) (* Goal: not (@Col Tn O E E') *) unfold Sum in H5. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Sum Tn O E E' O X AC *) (* Goal: @Col Tn O E X *) (* Goal: not (@Col Tn O E E') *) unfold Ar2 in H5. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Sum Tn O E E' O X AC *) (* Goal: @Col Tn O E X *) (* Goal: not (@Col Tn O E E') *) tauto; unfold Out in H13. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Sum Tn O E E' O X AC *) (* Goal: @Col Tn O E X *) unfold Ps in H11. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Sum Tn O E E' O X AC *) (* Goal: @Col Tn O E X *) apply out_col in H11. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Sum Tn O E E' O X AC *) (* Goal: @Col Tn O E X *) Col. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) (* Goal: @Sum Tn O E E' O X AC *) assumption. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) subst X. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) unfold Ps in H11. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) (* Goal: @Out Tn O AC E *) assumption. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O BC AC *) (* Goal: @Cong Tn O AC A C *) Cong. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O BC AC *) subst AC. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O BC BC *) apply sum_O_B. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Col Tn O E BC *) (* Goal: not (@Col Tn O E E') *) unfold LtP in H5. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Col Tn O E BC *) (* Goal: not (@Col Tn O E E') *) ex_and H5 X. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Col Tn O E BC *) (* Goal: not (@Col Tn O E E') *) apply diff_sum in H5. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Col Tn O E BC *) (* Goal: not (@Col Tn O E E') *) unfold Sum in H5. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Col Tn O E BC *) (* Goal: not (@Col Tn O E E') *) unfold Ar2 in H5. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Col Tn O E BC *) (* Goal: not (@Col Tn O E E') *) tauto. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Col Tn O E BC *) Col. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) subst AC. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC O *) subst AB. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O BC O *) apply cong_symmetry in H12. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O BC O *) apply cong_identity in H12. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O BC O *) subst B. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O BC O *) apply cong_symmetry in H6. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O BC O *) apply cong_identity in H6. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O BC O *) subst C. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O BC O *) apply cong_identity in H9. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O BC O *) subst BC. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O O O *) apply sum_O_O. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: not (@Col Tn O E E') *) unfold LtP in H8. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: not (@Col Tn O E E') *) ex_and H8 X. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: not (@Col Tn O E E') *) apply diff_sum in H5. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: not (@Col Tn O E E') *) unfold Sum in H5. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: not (@Col Tn O E E') *) unfold Ar2 in H5. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: not (@Col Tn O E E') *) tauto. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' AB BC AC *) subst AB. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O BC AC *) subst BC. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O O AC *) apply cong_symmetry in H9. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O O AC *) apply cong_identity in H9. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O O AC *) subst C. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O O AC *) apply cong_symmetry in H12. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O O AC *) apply cong_identity in H12. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O O AC *) subst B. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O O AC *) apply cong_identity in H6. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O O AC *) subst AC. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: @Sum Tn O E E' O O O *) apply sum_O_O. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: not (@Col Tn O E E') *) unfold LtP in H5. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: not (@Col Tn O E E') *) ex_and H5 X. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: not (@Col Tn O E E') *) apply diff_sum in H5. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: not (@Col Tn O E E') *) unfold Sum in H5. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: not (@Col Tn O E E') *) unfold Ar2 in H5. (* Goal: @Sum Tn O E E' AB BC AC *) (* Goal: not (@Col Tn O E E') *) tauto. (* Goal: @Sum Tn O E E' AB BC AC *) subst AB. (* Goal: @Sum Tn O E E' O BC AC *) subst AC. (* Goal: @Sum Tn O E E' O BC O *) subst BC. (* Goal: @Sum Tn O E E' O O O *) apply cong_symmetry in H12. (* Goal: @Sum Tn O E E' O O O *) apply cong_identity in H12. (* Goal: @Sum Tn O E E' O O O *) subst B. (* Goal: @Sum Tn O E E' O O O *) apply cong_symmetry in H9. (* Goal: @Sum Tn O E E' O O O *) apply cong_identity in H9. (* Goal: @Sum Tn O E E' O O O *) subst C. (* Goal: @Sum Tn O E E' O O O *) apply cong_identity in H6. (* Goal: @Sum Tn O E E' O O O *) induction HH0; tauto. Qed. Lemma length_out : forall O E E' A B C D AB CD, A <> B -> C <> D -> Length O E E' A B AB -> Length O E E' C D CD -> Out O AB CD. Proof. (* Goal: forall (O E E' A B C D AB CD : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) A B)) (_ : not (@eq (@Tpoint Tn) C D)) (_ : @Length Tn O E E' A B AB) (_ : @Length Tn O E E' C D CD), @Out Tn O AB CD *) intros. (* Goal: @Out Tn O AB CD *) unfold Length in *. (* Goal: @Out Tn O AB CD *) spliter. (* Goal: @Out Tn O AB CD *) unfold LeP in *. (* Goal: @Out Tn O AB CD *) induction H7; induction H4. (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) unfold LtP in *. (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) ex_and H7 X. (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) ex_and H4 Y. (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) apply diff_sum in H7. (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) apply diff_sum in H4. (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) assert(X = AB). (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @eq (@Tpoint Tn) X AB *) apply (sum_uniqueness O E E' O X). (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Sum Tn O E E' O X AB *) (* Goal: @Sum Tn O E E' O X X *) apply sum_O_B. (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Sum Tn O E E' O X AB *) (* Goal: @Col Tn O E X *) (* Goal: not (@Col Tn O E E') *) unfold Sum in H4. (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Sum Tn O E E' O X AB *) (* Goal: @Col Tn O E X *) (* Goal: not (@Col Tn O E E') *) spliter. (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Sum Tn O E E' O X AB *) (* Goal: @Col Tn O E X *) (* Goal: not (@Col Tn O E E') *) unfold Ar2 in H4. (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Sum Tn O E E' O X AB *) (* Goal: @Col Tn O E X *) (* Goal: not (@Col Tn O E E') *) tauto. (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Sum Tn O E E' O X AB *) (* Goal: @Col Tn O E X *) unfold Ps in H9. (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Sum Tn O E E' O X AB *) (* Goal: @Col Tn O E X *) apply out_col in H9. (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Sum Tn O E E' O X AB *) (* Goal: @Col Tn O E X *) Col. (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Sum Tn O E E' O X AB *) assumption. (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) subst X. (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) assert(Y = CD). (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @eq (@Tpoint Tn) Y CD *) apply (sum_uniqueness O E E' O Y). (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Sum Tn O E E' O Y CD *) (* Goal: @Sum Tn O E E' O Y Y *) apply sum_O_B. (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Sum Tn O E E' O Y CD *) (* Goal: @Col Tn O E Y *) (* Goal: not (@Col Tn O E E') *) unfold Sum in H4. (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Sum Tn O E E' O Y CD *) (* Goal: @Col Tn O E Y *) (* Goal: not (@Col Tn O E E') *) spliter. (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Sum Tn O E E' O Y CD *) (* Goal: @Col Tn O E Y *) (* Goal: not (@Col Tn O E E') *) unfold Ar2 in H4. (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Sum Tn O E E' O Y CD *) (* Goal: @Col Tn O E Y *) (* Goal: not (@Col Tn O E E') *) tauto. (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Sum Tn O E E' O Y CD *) (* Goal: @Col Tn O E Y *) unfold Ps in H10. (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Sum Tn O E E' O Y CD *) (* Goal: @Col Tn O E Y *) apply out_col in H10. (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Sum Tn O E E' O Y CD *) (* Goal: @Col Tn O E Y *) Col. (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Sum Tn O E E' O Y CD *) assumption. (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) subst Y. (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) unfold Ps in *. (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) eapply (l6_7 _ _ E). (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O E CD *) (* Goal: @Out Tn O AB E *) assumption. (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O E CD *) apply l6_6. (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O CD E *) assumption. (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) subst CD. (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB O *) apply cong_symmetry in H5. (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB O *) apply cong_identity in H5. (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB O *) contradiction. (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O AB CD *) subst AB. (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O O CD *) apply cong_symmetry in H8. (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O O CD *) apply cong_identity in H8. (* Goal: @Out Tn O AB CD *) (* Goal: @Out Tn O O CD *) contradiction. (* Goal: @Out Tn O AB CD *) subst CD. (* Goal: @Out Tn O AB O *) apply cong_symmetry in H5. (* Goal: @Out Tn O AB O *) apply cong_identity in H5. (* Goal: @Out Tn O AB O *) contradiction. Qed. Lemma image_preserves_bet1 : forall X Y A B C A' B' C', Bet A B C -> Reflect A A' X Y -> Reflect B B' X Y -> Reflect C C' X Y -> Bet A' B' C'. Proof. (* Goal: forall (X Y A B C A' B' C' : @Tpoint Tn) (_ : @Bet Tn A B C) (_ : @Reflect Tn A A' X Y) (_ : @Reflect Tn B B' X Y) (_ : @Reflect Tn C C' X Y), @Bet Tn A' B' C' *) intros. (* Goal: @Bet Tn A' B' C' *) induction(eq_dec_points X Y). (* Goal: @Bet Tn A' B' C' *) (* Goal: @Bet Tn A' B' C' *) subst Y. (* Goal: @Bet Tn A' B' C' *) (* Goal: @Bet Tn A' B' C' *) unfold Reflect in *. (* Goal: @Bet Tn A' B' C' *) (* Goal: @Bet Tn A' B' C' *) induction H0. (* Goal: @Bet Tn A' B' C' *) (* Goal: @Bet Tn A' B' C' *) (* Goal: @Bet Tn A' B' C' *) tauto. (* Goal: @Bet Tn A' B' C' *) (* Goal: @Bet Tn A' B' C' *) induction H1. (* Goal: @Bet Tn A' B' C' *) (* Goal: @Bet Tn A' B' C' *) (* Goal: @Bet Tn A' B' C' *) tauto. (* Goal: @Bet Tn A' B' C' *) (* Goal: @Bet Tn A' B' C' *) induction H2. (* Goal: @Bet Tn A' B' C' *) (* Goal: @Bet Tn A' B' C' *) (* Goal: @Bet Tn A' B' C' *) tauto. (* Goal: @Bet Tn A' B' C' *) (* Goal: @Bet Tn A' B' C' *) spliter. (* Goal: @Bet Tn A' B' C' *) (* Goal: @Bet Tn A' B' C' *) clean_duplicated_hyps. (* Goal: @Bet Tn A' B' C' *) (* Goal: @Bet Tn A' B' C' *) apply(l7_15 A B C A' B' C' X). (* Goal: @Bet Tn A' B' C' *) (* Goal: @Bet Tn A B C *) (* Goal: @Midpoint Tn X C C' *) (* Goal: @Midpoint Tn X B B' *) (* Goal: @Midpoint Tn X A A' *) apply l7_2. (* Goal: @Bet Tn A' B' C' *) (* Goal: @Bet Tn A B C *) (* Goal: @Midpoint Tn X C C' *) (* Goal: @Midpoint Tn X B B' *) (* Goal: @Midpoint Tn X A' A *) auto. (* Goal: @Bet Tn A' B' C' *) (* Goal: @Bet Tn A B C *) (* Goal: @Midpoint Tn X C C' *) (* Goal: @Midpoint Tn X B B' *) apply l7_2; auto. (* Goal: @Bet Tn A' B' C' *) (* Goal: @Bet Tn A B C *) (* Goal: @Midpoint Tn X C C' *) apply l7_2; auto. (* Goal: @Bet Tn A' B' C' *) (* Goal: @Bet Tn A B C *) assumption. (* Goal: @Bet Tn A' B' C' *) apply (image_preserves_bet A B C A' B' C' X Y). (* Goal: @Bet Tn A B C *) (* Goal: @ReflectL Tn C C' X Y *) (* Goal: @ReflectL Tn B B' X Y *) (* Goal: @ReflectL Tn A A' X Y *) unfold Reflect in H0. (* Goal: @Bet Tn A B C *) (* Goal: @ReflectL Tn C C' X Y *) (* Goal: @ReflectL Tn B B' X Y *) (* Goal: @ReflectL Tn A A' X Y *) induction H0. (* Goal: @Bet Tn A B C *) (* Goal: @ReflectL Tn C C' X Y *) (* Goal: @ReflectL Tn B B' X Y *) (* Goal: @ReflectL Tn A A' X Y *) (* Goal: @ReflectL Tn A A' X Y *) tauto. (* Goal: @Bet Tn A B C *) (* Goal: @ReflectL Tn C C' X Y *) (* Goal: @ReflectL Tn B B' X Y *) (* Goal: @ReflectL Tn A A' X Y *) spliter. (* Goal: @Bet Tn A B C *) (* Goal: @ReflectL Tn C C' X Y *) (* Goal: @ReflectL Tn B B' X Y *) (* Goal: @ReflectL Tn A A' X Y *) contradiction. (* Goal: @Bet Tn A B C *) (* Goal: @ReflectL Tn C C' X Y *) (* Goal: @ReflectL Tn B B' X Y *) unfold Reflect in *. (* Goal: @Bet Tn A B C *) (* Goal: @ReflectL Tn C C' X Y *) (* Goal: @ReflectL Tn B B' X Y *) induction H0; induction H1; induction H2; try( spliter; contradiction). (* Goal: @Bet Tn A B C *) (* Goal: @ReflectL Tn C C' X Y *) (* Goal: @ReflectL Tn B B' X Y *) spliter. (* Goal: @Bet Tn A B C *) (* Goal: @ReflectL Tn C C' X Y *) (* Goal: @ReflectL Tn B B' X Y *) auto. (* Goal: @Bet Tn A B C *) (* Goal: @ReflectL Tn C C' X Y *) induction H0; induction H1; induction H2; try( spliter; contradiction). (* Goal: @Bet Tn A B C *) (* Goal: @ReflectL Tn C C' X Y *) spliter. (* Goal: @Bet Tn A B C *) (* Goal: @ReflectL Tn C C' X Y *) auto. (* Goal: @Bet Tn A B C *) induction H0; induction H1; induction H2; try( spliter; contradiction). (* Goal: @Bet Tn A B C *) spliter. (* Goal: @Bet Tn A B C *) auto. Qed. Lemma image_preserves_col : forall X Y A B C A' B' C', Col A B C -> Reflect A A' X Y -> Reflect B B' X Y -> Reflect C C' X Y -> Col A' B' C'. Proof. (* Goal: forall (X Y A B C A' B' C' : @Tpoint Tn) (_ : @Col Tn A B C) (_ : @Reflect Tn A A' X Y) (_ : @Reflect Tn B B' X Y) (_ : @Reflect Tn C C' X Y), @Col Tn A' B' C' *) intros. (* Goal: @Col Tn A' B' C' *) induction H. (* Goal: @Col Tn A' B' C' *) (* Goal: @Col Tn A' B' C' *) unfold Col. (* Goal: @Col Tn A' B' C' *) (* Goal: or (@Bet Tn A' B' C') (or (@Bet Tn B' C' A') (@Bet Tn C' A' B')) *) left. (* Goal: @Col Tn A' B' C' *) (* Goal: @Bet Tn A' B' C' *) apply (image_preserves_bet1 X Y A B C A' B' C'); auto. (* Goal: @Col Tn A' B' C' *) induction H. (* Goal: @Col Tn A' B' C' *) (* Goal: @Col Tn A' B' C' *) unfold Col. (* Goal: @Col Tn A' B' C' *) (* Goal: or (@Bet Tn A' B' C') (or (@Bet Tn B' C' A') (@Bet Tn C' A' B')) *) right; left. (* Goal: @Col Tn A' B' C' *) (* Goal: @Bet Tn B' C' A' *) apply (image_preserves_bet1 X Y B C A B' C' A'); auto. (* Goal: @Col Tn A' B' C' *) unfold Col. (* Goal: or (@Bet Tn A' B' C') (or (@Bet Tn B' C' A') (@Bet Tn C' A' B')) *) right; right. (* Goal: @Bet Tn C' A' B' *) apply (image_preserves_bet1 X Y C A B C' A' B'); auto. Qed. Lemma image_preserves_out : forall X Y A B C A' B' C', Out A B C -> Reflect A A' X Y -> Reflect B B' X Y -> Reflect C C' X Y -> Out A' B' C'. Proof. (* Goal: forall (X Y A B C A' B' C' : @Tpoint Tn) (_ : @Out Tn A B C) (_ : @Reflect Tn A A' X Y) (_ : @Reflect Tn B B' X Y) (_ : @Reflect Tn C C' X Y), @Out Tn A' B' C' *) intros. (* Goal: @Out Tn A' B' C' *) unfold Out in *. (* Goal: and (not (@eq (@Tpoint Tn) B' A')) (and (not (@eq (@Tpoint Tn) C' A')) (or (@Bet Tn A' B' C') (@Bet Tn A' C' B'))) *) spliter. (* Goal: and (not (@eq (@Tpoint Tn) B' A')) (and (not (@eq (@Tpoint Tn) C' A')) (or (@Bet Tn A' B' C') (@Bet Tn A' C' B'))) *) repeat split; auto. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: not (@eq (@Tpoint Tn) C' A') *) (* Goal: not (@eq (@Tpoint Tn) B' A') *) intro. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: not (@eq (@Tpoint Tn) C' A') *) (* Goal: False *) subst B'. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: not (@eq (@Tpoint Tn) C' A') *) (* Goal: False *) assert(B = A). (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: not (@eq (@Tpoint Tn) C' A') *) (* Goal: False *) (* Goal: @eq (@Tpoint Tn) B A *) apply (l10_2_uniqueness X Y A' B A H1 H0). (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: not (@eq (@Tpoint Tn) C' A') *) (* Goal: False *) contradiction. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: not (@eq (@Tpoint Tn) C' A') *) intro. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: False *) subst C'. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: False *) assert(C=A). (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: False *) (* Goal: @eq (@Tpoint Tn) C A *) apply (l10_2_uniqueness X Y A' C A H2 H0). (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: False *) contradiction. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) induction H4. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) left. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: @Bet Tn A' B' C' *) apply (image_preserves_bet1 X Y A B C); auto. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) right. (* Goal: @Bet Tn A' C' B' *) apply (image_preserves_bet1 X Y A C B); auto. Qed. Lemma project_preserves_out : forall A B C A' B' C' P Q X Y, Out A B C -> ~Par A B X Y -> Proj A A' P Q X Y -> Proj B B' P Q X Y -> Proj C C' P Q X Y -> Out A' B' C'. Proof. (* Goal: forall (A B C A' B' C' P Q X Y : @Tpoint Tn) (_ : @Out Tn A B C) (_ : not (@Par Tn A B X Y)) (_ : @Proj Tn A A' P Q X Y) (_ : @Proj Tn B B' P Q X Y) (_ : @Proj Tn C C' P Q X Y), @Out Tn A' B' C' *) intros. (* Goal: @Out Tn A' B' C' *) repeat split. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: not (@eq (@Tpoint Tn) C' A') *) (* Goal: not (@eq (@Tpoint Tn) B' A') *) intro. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: not (@eq (@Tpoint Tn) C' A') *) (* Goal: False *) subst B'. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: not (@eq (@Tpoint Tn) C' A') *) (* Goal: False *) unfold Out in H. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: not (@eq (@Tpoint Tn) C' A') *) (* Goal: False *) spliter. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: not (@eq (@Tpoint Tn) C' A') *) (* Goal: False *) unfold Proj in H1. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: not (@eq (@Tpoint Tn) C' A') *) (* Goal: False *) unfold Proj in H2. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: not (@eq (@Tpoint Tn) C' A') *) (* Goal: False *) spliter. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: not (@eq (@Tpoint Tn) C' A') *) (* Goal: False *) induction H9; induction H13. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: not (@eq (@Tpoint Tn) C' A') *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) assert(Par A A' B A'). (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: not (@eq (@Tpoint Tn) C' A') *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: @Par Tn A A' B A' *) apply (par_trans _ _ X Y); auto. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: not (@eq (@Tpoint Tn) C' A') *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: @Par Tn X Y B A' *) apply par_symmetry. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: not (@eq (@Tpoint Tn) C' A') *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: @Par Tn B A' X Y *) assumption. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: not (@eq (@Tpoint Tn) C' A') *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) induction H14. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: not (@eq (@Tpoint Tn) C' A') *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) apply H14. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: not (@eq (@Tpoint Tn) C' A') *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A A') (@Col Tn X B A')) *) exists A'. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: not (@eq (@Tpoint Tn) C' A') *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: and (@Col Tn A' A A') (@Col Tn A' B A') *) split; Col. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: not (@eq (@Tpoint Tn) C' A') *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) spliter. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: not (@eq (@Tpoint Tn) C' A') *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) apply H0. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: not (@eq (@Tpoint Tn) C' A') *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: @Par Tn A B X Y *) apply par_symmetry. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: not (@eq (@Tpoint Tn) C' A') *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: @Par Tn X Y A B *) apply(par_col_par X Y A A' B). (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: not (@eq (@Tpoint Tn) C' A') *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: @Col Tn A A' B *) (* Goal: @Par Tn X Y A A' *) (* Goal: not (@eq (@Tpoint Tn) A B) *) intro. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: not (@eq (@Tpoint Tn) C' A') *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: @Col Tn A A' B *) (* Goal: @Par Tn X Y A A' *) (* Goal: False *) subst B. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: not (@eq (@Tpoint Tn) C' A') *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: @Col Tn A A' B *) (* Goal: @Par Tn X Y A A' *) (* Goal: False *) tauto. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: not (@eq (@Tpoint Tn) C' A') *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: @Col Tn A A' B *) (* Goal: @Par Tn X Y A A' *) apply par_symmetry. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: not (@eq (@Tpoint Tn) C' A') *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: @Col Tn A A' B *) (* Goal: @Par Tn A A' X Y *) assumption. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: not (@eq (@Tpoint Tn) C' A') *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: @Col Tn A A' B *) Col. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: not (@eq (@Tpoint Tn) C' A') *) (* Goal: False *) (* Goal: False *) (* Goal: False *) subst A'. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: not (@eq (@Tpoint Tn) C' A') *) (* Goal: False *) (* Goal: False *) (* Goal: False *) apply H0. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: not (@eq (@Tpoint Tn) C' A') *) (* Goal: False *) (* Goal: False *) (* Goal: @Par Tn A B X Y *) apply par_left_comm. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: not (@eq (@Tpoint Tn) C' A') *) (* Goal: False *) (* Goal: False *) (* Goal: @Par Tn B A X Y *) assumption. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: not (@eq (@Tpoint Tn) C' A') *) (* Goal: False *) (* Goal: False *) subst A'. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: not (@eq (@Tpoint Tn) C' A') *) (* Goal: False *) (* Goal: False *) contradiction. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: not (@eq (@Tpoint Tn) C' A') *) (* Goal: False *) subst A'. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: not (@eq (@Tpoint Tn) C' A') *) (* Goal: False *) contradiction. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: not (@eq (@Tpoint Tn) C' A') *) assert(HC:Col A B C). (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: not (@eq (@Tpoint Tn) C' A') *) (* Goal: @Col Tn A B C *) apply out_col in H. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: not (@eq (@Tpoint Tn) C' A') *) (* Goal: @Col Tn A B C *) assumption. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: not (@eq (@Tpoint Tn) C' A') *) unfold Out in H. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: not (@eq (@Tpoint Tn) C' A') *) spliter. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: not (@eq (@Tpoint Tn) C' A') *) intro. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: False *) subst C'. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: False *) unfold Proj in H1 ,H3. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: False *) spliter. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: False *) induction H9; induction H13. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) assert(Par A A' C A'). (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: @Par Tn A A' C A' *) apply (par_trans _ _ X Y). (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: @Par Tn X Y C A' *) (* Goal: @Par Tn A A' X Y *) assumption. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: @Par Tn X Y C A' *) apply par_symmetry. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: @Par Tn C A' X Y *) assumption. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) induction H14. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) apply H14. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A A') (@Col Tn X C A')) *) exists A'. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: and (@Col Tn A' A A') (@Col Tn A' C A') *) split; Col. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) spliter. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: False *) apply H0. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: @Par Tn A B X Y *) apply par_symmetry. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: @Par Tn X Y A B *) apply (par_col_par X Y A A' B). (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: @Col Tn A A' B *) (* Goal: @Par Tn X Y A A' *) (* Goal: not (@eq (@Tpoint Tn) A B) *) intro. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: @Col Tn A A' B *) (* Goal: @Par Tn X Y A A' *) (* Goal: False *) subst B. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: @Col Tn A A' B *) (* Goal: @Par Tn X Y A A' *) (* Goal: False *) tauto. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: @Col Tn A A' B *) (* Goal: @Par Tn X Y A A' *) apply par_symmetry. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: @Col Tn A A' B *) (* Goal: @Par Tn A A' X Y *) assumption. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: False *) (* Goal: False *) (* Goal: False *) (* Goal: @Col Tn A A' B *) ColR. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: False *) (* Goal: False *) (* Goal: False *) subst A'. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: False *) (* Goal: False *) (* Goal: False *) apply H0. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: False *) (* Goal: False *) (* Goal: @Par Tn A B X Y *) apply par_symmetry. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: False *) (* Goal: False *) (* Goal: @Par Tn X Y A B *) apply(par_col_par X Y A C B). (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: False *) (* Goal: False *) (* Goal: @Col Tn A C B *) (* Goal: @Par Tn X Y A C *) (* Goal: not (@eq (@Tpoint Tn) A B) *) intro. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: False *) (* Goal: False *) (* Goal: @Col Tn A C B *) (* Goal: @Par Tn X Y A C *) (* Goal: False *) subst B. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: False *) (* Goal: False *) (* Goal: @Col Tn A C B *) (* Goal: @Par Tn X Y A C *) (* Goal: False *) tauto. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: False *) (* Goal: False *) (* Goal: @Col Tn A C B *) (* Goal: @Par Tn X Y A C *) apply par_symmetry. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: False *) (* Goal: False *) (* Goal: @Col Tn A C B *) (* Goal: @Par Tn A C X Y *) apply par_left_comm. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: False *) (* Goal: False *) (* Goal: @Col Tn A C B *) (* Goal: @Par Tn C A X Y *) assumption. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: False *) (* Goal: False *) (* Goal: @Col Tn A C B *) Col. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: False *) (* Goal: False *) subst A'. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: False *) (* Goal: False *) apply H0. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: False *) (* Goal: @Par Tn A B X Y *) apply par_symmetry. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: False *) (* Goal: @Par Tn X Y A B *) apply(par_col_par X Y A C B). (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: False *) (* Goal: @Col Tn A C B *) (* Goal: @Par Tn X Y A C *) (* Goal: not (@eq (@Tpoint Tn) A B) *) intro. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: False *) (* Goal: @Col Tn A C B *) (* Goal: @Par Tn X Y A C *) (* Goal: False *) subst B. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: False *) (* Goal: @Col Tn A C B *) (* Goal: @Par Tn X Y A C *) (* Goal: False *) tauto. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: False *) (* Goal: @Col Tn A C B *) (* Goal: @Par Tn X Y A C *) apply par_symmetry. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: False *) (* Goal: @Col Tn A C B *) (* Goal: @Par Tn A C X Y *) assumption. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: False *) (* Goal: @Col Tn A C B *) Col. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: False *) subst A'. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: False *) contradiction. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) unfold Out in H. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) spliter. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) induction H5. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) left. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) (* Goal: @Bet Tn A' B' C' *) apply (project_preserves_bet P Q X Y A B C A' B' C'); assumption. (* Goal: or (@Bet Tn A' B' C') (@Bet Tn A' C' B') *) right. (* Goal: @Bet Tn A' C' B' *) apply (project_preserves_bet P Q X Y A C B A' C' B'); assumption. Qed. Lemma conga_bet_conga : forall A B C D E F A' C' D' F', CongA A B C D E F -> A' <> B -> C' <> B -> D' <> E -> F' <> E -> Bet A B A' -> Bet C B C' -> Bet D E D' -> Bet F E F' -> CongA A' B C' D' E F'. Proof. (* Goal: forall (A B C D E F A' C' D' F' : @Tpoint Tn) (_ : @CongA Tn A B C D E F) (_ : not (@eq (@Tpoint Tn) A' B)) (_ : not (@eq (@Tpoint Tn) C' B)) (_ : not (@eq (@Tpoint Tn) D' E)) (_ : not (@eq (@Tpoint Tn) F' E)) (_ : @Bet Tn A B A') (_ : @Bet Tn C B C') (_ : @Bet Tn D E D') (_ : @Bet Tn F E F'), @CongA Tn A' B C' D' E F' *) intros. (* Goal: @CongA Tn A' B C' D' E F' *) assert(HH:= l11_13 A B C D E F A' D' H H4 H0 H6 H2). (* Goal: @CongA Tn A' B C' D' E F' *) apply conga_comm. (* Goal: @CongA Tn C' B A' F' E D' *) apply(l11_13 C B A' F E D' C' F'); auto. (* Goal: @CongA Tn C B A' F E D' *) apply conga_comm. (* Goal: @CongA Tn A' B C D' E F *) assumption. Qed. Lemma thales : forall O E E' P A B C D A1 B1 C1 D1 AD, O <> E -> Col P A B -> Col P C D -> ~ Col P A C -> Pj A C B D -> Length O E E' P A A1 -> Length O E E' P B B1 -> Length O E E' P C C1 -> Length O E E' P D D1 -> Prodg O E E' A1 D1 AD -> Prodg O E E' C1 B1 AD. Lemma length_existence : forall O E E' A B, ~ Col O E E' -> exists AB, Length O E E' A B AB. Proof. (* Goal: forall (O E E' A B : @Tpoint Tn) (_ : not (@Col Tn O E E')), @ex (@Tpoint Tn) (fun AB : @Tpoint Tn => @Length Tn O E E' A B AB) *) intros. (* Goal: @ex (@Tpoint Tn) (fun AB : @Tpoint Tn => @Length Tn O E E' A B AB) *) assert(NEO : E <> O). (* Goal: @ex (@Tpoint Tn) (fun AB : @Tpoint Tn => @Length Tn O E E' A B AB) *) (* Goal: not (@eq (@Tpoint Tn) E O) *) intro. (* Goal: @ex (@Tpoint Tn) (fun AB : @Tpoint Tn => @Length Tn O E E' A B AB) *) (* Goal: False *) subst E. (* Goal: @ex (@Tpoint Tn) (fun AB : @Tpoint Tn => @Length Tn O E E' A B AB) *) (* Goal: False *) apply H. (* Goal: @ex (@Tpoint Tn) (fun AB : @Tpoint Tn => @Length Tn O E E' A B AB) *) (* Goal: @Col Tn O O E' *) Col. (* Goal: @ex (@Tpoint Tn) (fun AB : @Tpoint Tn => @Length Tn O E E' A B AB) *) assert(HH:= segment_construction_2 E O A B NEO). (* Goal: @ex (@Tpoint Tn) (fun AB : @Tpoint Tn => @Length Tn O E E' A B AB) *) ex_and HH AB. (* Goal: @ex (@Tpoint Tn) (fun AB : @Tpoint Tn => @Length Tn O E E' A B AB) *) exists AB. (* Goal: @Length Tn O E E' A B AB *) unfold Length. (* Goal: and (not (@eq (@Tpoint Tn) O E)) (and (@Col Tn O E AB) (and (@LeP Tn O E E' O AB) (@Cong Tn O AB A B))) *) assert(AB = O \/ Out O E AB). (* Goal: and (not (@eq (@Tpoint Tn) O E)) (and (@Col Tn O E AB) (and (@LeP Tn O E E' O AB) (@Cong Tn O AB A B))) *) (* Goal: or (@eq (@Tpoint Tn) AB O) (@Out Tn O E AB) *) induction(eq_dec_points AB O). (* Goal: and (not (@eq (@Tpoint Tn) O E)) (and (@Col Tn O E AB) (and (@LeP Tn O E E' O AB) (@Cong Tn O AB A B))) *) (* Goal: or (@eq (@Tpoint Tn) AB O) (@Out Tn O E AB) *) (* Goal: or (@eq (@Tpoint Tn) AB O) (@Out Tn O E AB) *) left; assumption. (* Goal: and (not (@eq (@Tpoint Tn) O E)) (and (@Col Tn O E AB) (and (@LeP Tn O E E' O AB) (@Cong Tn O AB A B))) *) (* Goal: or (@eq (@Tpoint Tn) AB O) (@Out Tn O E AB) *) right. (* Goal: and (not (@eq (@Tpoint Tn) O E)) (and (@Col Tn O E AB) (and (@LeP Tn O E E' O AB) (@Cong Tn O AB A B))) *) (* Goal: @Out Tn O E AB *) repeat split; auto. (* Goal: and (not (@eq (@Tpoint Tn) O E)) (and (@Col Tn O E AB) (and (@LeP Tn O E E' O AB) (@Cong Tn O AB A B))) *) assert(Col O E AB). (* Goal: and (not (@eq (@Tpoint Tn) O E)) (and (@Col Tn O E AB) (and (@LeP Tn O E E' O AB) (@Cong Tn O AB A B))) *) (* Goal: @Col Tn O E AB *) induction H2. (* Goal: and (not (@eq (@Tpoint Tn) O E)) (and (@Col Tn O E AB) (and (@LeP Tn O E E' O AB) (@Cong Tn O AB A B))) *) (* Goal: @Col Tn O E AB *) (* Goal: @Col Tn O E AB *) subst AB. (* Goal: and (not (@eq (@Tpoint Tn) O E)) (and (@Col Tn O E AB) (and (@LeP Tn O E E' O AB) (@Cong Tn O AB A B))) *) (* Goal: @Col Tn O E AB *) (* Goal: @Col Tn O E O *) Col. (* Goal: and (not (@eq (@Tpoint Tn) O E)) (and (@Col Tn O E AB) (and (@LeP Tn O E E' O AB) (@Cong Tn O AB A B))) *) (* Goal: @Col Tn O E AB *) apply out_col. (* Goal: and (not (@eq (@Tpoint Tn) O E)) (and (@Col Tn O E AB) (and (@LeP Tn O E E' O AB) (@Cong Tn O AB A B))) *) (* Goal: @Out Tn O E AB *) assumption. (* Goal: and (not (@eq (@Tpoint Tn) O E)) (and (@Col Tn O E AB) (and (@LeP Tn O E E' O AB) (@Cong Tn O AB A B))) *) repeat split; Col. (* Goal: @LeP Tn O E E' O AB *) unfold LeP. (* Goal: or (@LtP Tn O E E' O AB) (@eq (@Tpoint Tn) O AB) *) induction H2. (* Goal: or (@LtP Tn O E E' O AB) (@eq (@Tpoint Tn) O AB) *) (* Goal: or (@LtP Tn O E E' O AB) (@eq (@Tpoint Tn) O AB) *) right; auto. (* Goal: or (@LtP Tn O E E' O AB) (@eq (@Tpoint Tn) O AB) *) left. (* Goal: @LtP Tn O E E' O AB *) unfold LtP. (* Goal: @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (@Diff Tn O E E' AB O D) (@Ps Tn O E D)) *) exists AB. (* Goal: and (@Diff Tn O E E' AB O AB) (@Ps Tn O E AB) *) repeat split. (* Goal: or (@Bet Tn O AB E) (@Bet Tn O E AB) *) (* Goal: not (@eq (@Tpoint Tn) E O) *) (* Goal: not (@eq (@Tpoint Tn) AB O) *) (* Goal: @Diff Tn O E E' AB O AB *) apply diff_A_O; Col. (* Goal: or (@Bet Tn O AB E) (@Bet Tn O E AB) *) (* Goal: not (@eq (@Tpoint Tn) E O) *) (* Goal: not (@eq (@Tpoint Tn) AB O) *) unfold Out in H2. (* Goal: or (@Bet Tn O AB E) (@Bet Tn O E AB) *) (* Goal: not (@eq (@Tpoint Tn) E O) *) (* Goal: not (@eq (@Tpoint Tn) AB O) *) tauto. (* Goal: or (@Bet Tn O AB E) (@Bet Tn O E AB) *) (* Goal: not (@eq (@Tpoint Tn) E O) *) auto. (* Goal: or (@Bet Tn O AB E) (@Bet Tn O E AB) *) induction H0. (* Goal: or (@Bet Tn O AB E) (@Bet Tn O E AB) *) (* Goal: or (@Bet Tn O AB E) (@Bet Tn O E AB) *) right; assumption. (* Goal: or (@Bet Tn O AB E) (@Bet Tn O E AB) *) left; assumption. Qed. Lemma l15_7 : forall O E E' A B C H AB AC AH AC2, O<>E -> Per A C B -> Perp_at H C H A B -> Length O E E' A B AB -> Length O E E' A C AC -> Length O E E' A H AH -> (Prod O E E' AC AC AC2 <-> Prod O E E' AB AH AC2). Proof. (* Goal: forall (O E E' A B C H AB AC AH AC2 : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) O E)) (_ : @Per Tn A C B) (_ : @Perp_at Tn H C H A B) (_ : @Length Tn O E E' A B AB) (_ : @Length Tn O E E' A C AC) (_ : @Length Tn O E E' A H AH), iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) intros. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) induction(eq_dec_points AB O). (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) subst AB. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' O AH AC2) *) assert(A = B). (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' O AH AC2) *) (* Goal: @eq (@Tpoint Tn) A B *) apply (length_id_1 O E E'); assumption. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' O AH AC2) *) subst B. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' O AH AC2) *) apply perp_in_distinct in H2. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' O AH AC2) *) tauto. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) assert(~Col O E E' /\ Col O E AB). (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: and (not (@Col Tn O E E')) (@Col Tn O E AB) *) unfold Length in H3. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: and (not (@Col Tn O E E')) (@Col Tn O E AB) *) spliter. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: and (not (@Col Tn O E E')) (@Col Tn O E AB) *) unfold LeP in H8. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: and (not (@Col Tn O E E')) (@Col Tn O E AB) *) induction H8. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: and (not (@Col Tn O E E')) (@Col Tn O E AB) *) (* Goal: and (not (@Col Tn O E E')) (@Col Tn O E AB) *) unfold LtP in H8. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: and (not (@Col Tn O E E')) (@Col Tn O E AB) *) (* Goal: and (not (@Col Tn O E E')) (@Col Tn O E AB) *) ex_and H8 X. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: and (not (@Col Tn O E E')) (@Col Tn O E AB) *) (* Goal: and (not (@Col Tn O E E')) (@Col Tn O E AB) *) apply diff_sum in H8. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: and (not (@Col Tn O E E')) (@Col Tn O E AB) *) (* Goal: and (not (@Col Tn O E E')) (@Col Tn O E AB) *) apply sum_ar2 in H8. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: and (not (@Col Tn O E E')) (@Col Tn O E AB) *) (* Goal: and (not (@Col Tn O E E')) (@Col Tn O E AB) *) unfold Ar2 in H8. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: and (not (@Col Tn O E E')) (@Col Tn O E AB) *) (* Goal: and (not (@Col Tn O E E')) (@Col Tn O E AB) *) tauto. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: and (not (@Col Tn O E E')) (@Col Tn O E AB) *) subst AB. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: and (not (@Col Tn O E E')) (@Col Tn O E O) *) tauto. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) spliter. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) induction(eq_dec_points H A). (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) subst H. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) assert(AH=O). (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @eq (@Tpoint Tn) AH O *) apply (length_uniqueness O E E' A A); auto. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Length Tn O E E' A A O *) apply length_id_2. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: not (@eq (@Tpoint Tn) O E) *) assumption. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) subst AH. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB O AC2) *) apply perp_in_per in H2. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB O AC2) *) assert(A = C). (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB O AC2) *) (* Goal: @eq (@Tpoint Tn) A C *) apply (l8_7 B); finish. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB O AC2) *) subst C. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB O AC2) *) assert(AC = O). (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB O AC2) *) (* Goal: @eq (@Tpoint Tn) AC O *) apply (length_uniqueness O E E' A A); auto. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB O AC2) *) subst AC. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: iff (@Prod Tn O E E' O O AC2) (@Prod Tn O E E' AB O AC2) *) split;intros; assert(AC2=O). (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Prod Tn O E E' O O AC2 *) (* Goal: @eq (@Tpoint Tn) AC2 O *) (* Goal: @Prod Tn O E E' AB O AC2 *) (* Goal: @eq (@Tpoint Tn) AC2 O *) apply (prod_uniqueness O E E' O O); auto. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Prod Tn O E E' O O AC2 *) (* Goal: @eq (@Tpoint Tn) AC2 O *) (* Goal: @Prod Tn O E E' AB O AC2 *) (* Goal: @Prod Tn O E E' O O O *) apply prod_0_r; Col. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Prod Tn O E E' O O AC2 *) (* Goal: @eq (@Tpoint Tn) AC2 O *) (* Goal: @Prod Tn O E E' AB O AC2 *) subst AC2. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Prod Tn O E E' O O AC2 *) (* Goal: @eq (@Tpoint Tn) AC2 O *) (* Goal: @Prod Tn O E E' AB O O *) apply prod_0_r; Col. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Prod Tn O E E' O O AC2 *) (* Goal: @eq (@Tpoint Tn) AC2 O *) apply (prod_uniqueness O E E' AB O); auto. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Prod Tn O E E' O O AC2 *) (* Goal: @Prod Tn O E E' AB O O *) apply prod_0_r; Col. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Prod Tn O E E' O O AC2 *) subst AC2. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Prod Tn O E E' O O O *) apply prod_0_r; Col. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) assert(C <> A). (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: not (@eq (@Tpoint Tn) C A) *) intro. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: False *) subst C. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: False *) apply perp_in_right_comm in H2. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: False *) apply perp_in_id in H2. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: False *) contradiction. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) assert(HH:= segment_construction_2 H A A C H9). (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) ex_and HH C'. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) assert(Out A H C'). (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Out Tn A H C' *) unfold Out. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: and (not (@eq (@Tpoint Tn) H A)) (and (not (@eq (@Tpoint Tn) C' A)) (or (@Bet Tn A H C') (@Bet Tn A C' H))) *) repeat split; auto. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: not (@eq (@Tpoint Tn) C' A) *) intro. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: False *) subst C'. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: False *) apply cong_symmetry in H12. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: False *) apply cong_identity in H12. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: False *) subst C. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: False *) tauto. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) assert(HH:= segment_construction_2 C A A H H10). (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) ex_and HH H'. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) assert(Out A C H'). (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Out Tn A C H' *) repeat split;auto. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: not (@eq (@Tpoint Tn) H' A) *) intro. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: False *) subst H'. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: False *) apply cong_symmetry in H15. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: False *) apply cong_identity in H15. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: False *) subst H. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: False *) tauto. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) assert(H <> C). (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: not (@eq (@Tpoint Tn) H C) *) intro. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: False *) subst H. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: False *) apply perp_in_distinct in H2. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: False *) tauto. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) assert(Cong H C H' C' /\ (H <> C -> CongA A H C A H' C' /\ CongA A C H A C' H')). (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: and (@Cong Tn H C H' C') (forall _ : not (@eq (@Tpoint Tn) H C), and (@CongA Tn A H C A H' C') (@CongA Tn A C H A C' H')) *) apply(l11_49 H A C H' A C'). (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Cong Tn A C A C' *) (* Goal: @Cong Tn A H A H' *) (* Goal: @CongA Tn H A C H' A C' *) apply (l11_10 H A C C A H). (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Cong Tn A C A C' *) (* Goal: @Cong Tn A H A H' *) (* Goal: @Out Tn A C' H *) (* Goal: @Out Tn A H' C *) (* Goal: @Out Tn A C C *) (* Goal: @Out Tn A H H *) (* Goal: @CongA Tn H A C C A H *) apply conga_right_comm. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Cong Tn A C A C' *) (* Goal: @Cong Tn A H A H' *) (* Goal: @Out Tn A C' H *) (* Goal: @Out Tn A H' C *) (* Goal: @Out Tn A C C *) (* Goal: @Out Tn A H H *) (* Goal: @CongA Tn H A C H A C *) apply conga_refl; auto. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Cong Tn A C A C' *) (* Goal: @Cong Tn A H A H' *) (* Goal: @Out Tn A C' H *) (* Goal: @Out Tn A H' C *) (* Goal: @Out Tn A C C *) (* Goal: @Out Tn A H H *) apply out_trivial; auto. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Cong Tn A C A C' *) (* Goal: @Cong Tn A H A H' *) (* Goal: @Out Tn A C' H *) (* Goal: @Out Tn A H' C *) (* Goal: @Out Tn A C C *) apply out_trivial; auto. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Cong Tn A C A C' *) (* Goal: @Cong Tn A H A H' *) (* Goal: @Out Tn A C' H *) (* Goal: @Out Tn A H' C *) apply l6_6. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Cong Tn A C A C' *) (* Goal: @Cong Tn A H A H' *) (* Goal: @Out Tn A C' H *) (* Goal: @Out Tn A C H' *) assumption. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Cong Tn A C A C' *) (* Goal: @Cong Tn A H A H' *) (* Goal: @Out Tn A C' H *) apply l6_6. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Cong Tn A C A C' *) (* Goal: @Cong Tn A H A H' *) (* Goal: @Out Tn A H C' *) assumption. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Cong Tn A C A C' *) (* Goal: @Cong Tn A H A H' *) Cong. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Cong Tn A C A C' *) Cong. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) spliter. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) assert(HH:= H19 H17). (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) clear H19. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) spliter. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) assert(Per A H C). (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Per Tn A H C *) apply perp_in_per. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Perp_at Tn H A H H C *) apply perp_in_comm. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Perp_at Tn H H A C H *) apply perp_perp_in. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Perp Tn H A C H *) apply perp_comm. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Perp Tn A H H C *) apply (perp_col _ B). (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Col Tn A B H *) (* Goal: @Perp Tn A B H C *) (* Goal: not (@eq (@Tpoint Tn) A H) *) auto. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Col Tn A B H *) (* Goal: @Perp Tn A B H C *) apply perp_in_perp_bis in H2. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Col Tn A B H *) (* Goal: @Perp Tn A B H C *) induction H2. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Col Tn A B H *) (* Goal: @Perp Tn A B H C *) (* Goal: @Perp Tn A B H C *) apply perp_distinct in H2. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Col Tn A B H *) (* Goal: @Perp Tn A B H C *) (* Goal: @Perp Tn A B H C *) tauto. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Col Tn A B H *) (* Goal: @Perp Tn A B H C *) apply perp_sym. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Col Tn A B H *) (* Goal: @Perp Tn H C A B *) apply perp_left_comm. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Col Tn A B H *) (* Goal: @Perp Tn C H A B *) assumption. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Col Tn A B H *) apply perp_in_col in H2. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Col Tn A B H *) tauto. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) assert(HH:= l11_17 A H C A H' C' H21 H19). (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) assert(Par C B H' C'). (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Par Tn C B H' C' *) apply(l12_9_2D C B H' C' A C). (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Perp Tn H' C' A C *) (* Goal: @Perp Tn C B A C *) apply per_perp_in in H1. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Perp Tn H' C' A C *) (* Goal: not (@eq (@Tpoint Tn) C B) *) (* Goal: not (@eq (@Tpoint Tn) A C) *) (* Goal: @Perp Tn C B A C *) apply perp_in_comm in H1. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Perp Tn H' C' A C *) (* Goal: not (@eq (@Tpoint Tn) C B) *) (* Goal: not (@eq (@Tpoint Tn) A C) *) (* Goal: @Perp Tn C B A C *) apply perp_in_perp_bis in H1. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Perp Tn H' C' A C *) (* Goal: not (@eq (@Tpoint Tn) C B) *) (* Goal: not (@eq (@Tpoint Tn) A C) *) (* Goal: @Perp Tn C B A C *) induction H1. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Perp Tn H' C' A C *) (* Goal: not (@eq (@Tpoint Tn) C B) *) (* Goal: not (@eq (@Tpoint Tn) A C) *) (* Goal: @Perp Tn C B A C *) (* Goal: @Perp Tn C B A C *) finish. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Perp Tn H' C' A C *) (* Goal: not (@eq (@Tpoint Tn) C B) *) (* Goal: not (@eq (@Tpoint Tn) A C) *) (* Goal: @Perp Tn C B A C *) apply perp_distinct in H1. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Perp Tn H' C' A C *) (* Goal: not (@eq (@Tpoint Tn) C B) *) (* Goal: not (@eq (@Tpoint Tn) A C) *) (* Goal: @Perp Tn C B A C *) tauto. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Perp Tn H' C' A C *) (* Goal: not (@eq (@Tpoint Tn) C B) *) (* Goal: not (@eq (@Tpoint Tn) A C) *) auto. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Perp Tn H' C' A C *) (* Goal: not (@eq (@Tpoint Tn) C B) *) intro. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Perp Tn H' C' A C *) (* Goal: False *) subst C. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Perp Tn H' C' A C *) (* Goal: False *) apply perp_in_id in H2. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Perp Tn H' C' A C *) (* Goal: False *) contradiction. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Perp Tn H' C' A C *) apply per_perp_in in HH. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: not (@eq (@Tpoint Tn) H' C') *) (* Goal: not (@eq (@Tpoint Tn) A H') *) (* Goal: @Perp Tn H' C' A C *) apply perp_in_comm in HH. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: not (@eq (@Tpoint Tn) H' C') *) (* Goal: not (@eq (@Tpoint Tn) A H') *) (* Goal: @Perp Tn H' C' A C *) apply perp_in_perp_bis in HH. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: not (@eq (@Tpoint Tn) H' C') *) (* Goal: not (@eq (@Tpoint Tn) A H') *) (* Goal: @Perp Tn H' C' A C *) apply perp_sym. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: not (@eq (@Tpoint Tn) H' C') *) (* Goal: not (@eq (@Tpoint Tn) A H') *) (* Goal: @Perp Tn A C H' C' *) apply perp_right_comm. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: not (@eq (@Tpoint Tn) H' C') *) (* Goal: not (@eq (@Tpoint Tn) A H') *) (* Goal: @Perp Tn A C C' H' *) apply(perp_col A H' C' H' C). (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: not (@eq (@Tpoint Tn) H' C') *) (* Goal: not (@eq (@Tpoint Tn) A H') *) (* Goal: @Col Tn A H' C *) (* Goal: @Perp Tn A H' C' H' *) (* Goal: not (@eq (@Tpoint Tn) A C) *) auto. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: not (@eq (@Tpoint Tn) H' C') *) (* Goal: not (@eq (@Tpoint Tn) A H') *) (* Goal: @Col Tn A H' C *) (* Goal: @Perp Tn A H' C' H' *) induction HH. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: not (@eq (@Tpoint Tn) H' C') *) (* Goal: not (@eq (@Tpoint Tn) A H') *) (* Goal: @Col Tn A H' C *) (* Goal: @Perp Tn A H' C' H' *) (* Goal: @Perp Tn A H' C' H' *) finish. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: not (@eq (@Tpoint Tn) H' C') *) (* Goal: not (@eq (@Tpoint Tn) A H') *) (* Goal: @Col Tn A H' C *) (* Goal: @Perp Tn A H' C' H' *) apply perp_distinct in H22. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: not (@eq (@Tpoint Tn) H' C') *) (* Goal: not (@eq (@Tpoint Tn) A H') *) (* Goal: @Col Tn A H' C *) (* Goal: @Perp Tn A H' C' H' *) tauto. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: not (@eq (@Tpoint Tn) H' C') *) (* Goal: not (@eq (@Tpoint Tn) A H') *) (* Goal: @Col Tn A H' C *) apply out_col in H16. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: not (@eq (@Tpoint Tn) H' C') *) (* Goal: not (@eq (@Tpoint Tn) A H') *) (* Goal: @Col Tn A H' C *) Col. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: not (@eq (@Tpoint Tn) H' C') *) (* Goal: not (@eq (@Tpoint Tn) A H') *) intro. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: not (@eq (@Tpoint Tn) H' C') *) (* Goal: False *) subst H'. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: not (@eq (@Tpoint Tn) H' C') *) (* Goal: False *) apply conga_distinct in H19. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: not (@eq (@Tpoint Tn) H' C') *) (* Goal: False *) tauto. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: not (@eq (@Tpoint Tn) H' C') *) intro. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: False *) subst H'. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: False *) apply conga_distinct in H19. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: False *) tauto. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) assert(HL1:=length_existence O E E' A H' H7). (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) ex_and HL1 AH'. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) assert(HL1:=length_existence O E E' A C' H7). (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) ex_and HL1 AC'. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) assert(exists P : Tpoint, Prod O E E' AC' AC P). (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => @Prod Tn O E E' AC' AC P) *) apply(prod_exists O E E' H7 AC' AC). (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Col Tn O E AC *) (* Goal: @Col Tn O E AC' *) unfold Length in H24. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Col Tn O E AC *) (* Goal: @Col Tn O E AC' *) tauto. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Col Tn O E AC *) unfold Length in H4. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Col Tn O E AC *) tauto. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) ex_and H25 P. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) assert(Perp C H A B). (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Perp Tn C H A B *) apply perp_in_perp_bis in H2. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Perp Tn C H A B *) induction H2. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Perp Tn C H A B *) (* Goal: @Perp Tn C H A B *) apply perp_distinct in H2. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Perp Tn C H A B *) (* Goal: @Perp Tn C H A B *) tauto. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Perp Tn C H A B *) assumption. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) assert(Prodg O E E' AH' AB P). (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Prodg Tn O E E' AH' AB P *) apply(thales O E E' A C' B H' C AC' AB AH' AC P); Col. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Prodg Tn O E E' AC' AC P *) (* Goal: @Pj Tn C' H' B C *) (* Goal: not (@Col Tn A C' H') *) (* Goal: @Col Tn A C' B *) apply perp_in_col in H2. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Prodg Tn O E E' AC' AC P *) (* Goal: @Pj Tn C' H' B C *) (* Goal: not (@Col Tn A C' H') *) (* Goal: @Col Tn A C' B *) spliter. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Prodg Tn O E E' AC' AC P *) (* Goal: @Pj Tn C' H' B C *) (* Goal: not (@Col Tn A C' H') *) (* Goal: @Col Tn A C' B *) apply out_col in H13. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Prodg Tn O E E' AC' AC P *) (* Goal: @Pj Tn C' H' B C *) (* Goal: not (@Col Tn A C' H') *) (* Goal: @Col Tn A C' B *) ColR. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Prodg Tn O E E' AC' AC P *) (* Goal: @Pj Tn C' H' B C *) (* Goal: not (@Col Tn A C' H') *) apply out_col in H16. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Prodg Tn O E E' AC' AC P *) (* Goal: @Pj Tn C' H' B C *) (* Goal: not (@Col Tn A C' H') *) Col. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Prodg Tn O E E' AC' AC P *) (* Goal: @Pj Tn C' H' B C *) (* Goal: not (@Col Tn A C' H') *) intro. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Prodg Tn O E E' AC' AC P *) (* Goal: @Pj Tn C' H' B C *) (* Goal: False *) assert(Perp H A C H). (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Prodg Tn O E E' AC' AC P *) (* Goal: @Pj Tn C' H' B C *) (* Goal: False *) (* Goal: @Perp Tn H A C H *) apply perp_comm. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Prodg Tn O E E' AC' AC P *) (* Goal: @Pj Tn C' H' B C *) (* Goal: False *) (* Goal: @Perp Tn A H H C *) apply(perp_col A B H C H). (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Prodg Tn O E E' AC' AC P *) (* Goal: @Pj Tn C' H' B C *) (* Goal: False *) (* Goal: @Col Tn A B H *) (* Goal: @Perp Tn A B H C *) (* Goal: not (@eq (@Tpoint Tn) A H) *) intro. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Prodg Tn O E E' AC' AC P *) (* Goal: @Pj Tn C' H' B C *) (* Goal: False *) (* Goal: @Col Tn A B H *) (* Goal: @Perp Tn A B H C *) (* Goal: False *) subst H. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Prodg Tn O E E' AC' AC P *) (* Goal: @Pj Tn C' H' B C *) (* Goal: False *) (* Goal: @Col Tn A B H *) (* Goal: @Perp Tn A B H C *) (* Goal: False *) apply conga_distinct in H19. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Prodg Tn O E E' AC' AC P *) (* Goal: @Pj Tn C' H' B C *) (* Goal: False *) (* Goal: @Col Tn A B H *) (* Goal: @Perp Tn A B H C *) (* Goal: False *) tauto. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Prodg Tn O E E' AC' AC P *) (* Goal: @Pj Tn C' H' B C *) (* Goal: False *) (* Goal: @Col Tn A B H *) (* Goal: @Perp Tn A B H C *) finish. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Prodg Tn O E E' AC' AC P *) (* Goal: @Pj Tn C' H' B C *) (* Goal: False *) (* Goal: @Col Tn A B H *) apply perp_in_col in H2. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Prodg Tn O E E' AC' AC P *) (* Goal: @Pj Tn C' H' B C *) (* Goal: False *) (* Goal: @Col Tn A B H *) tauto. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Prodg Tn O E E' AC' AC P *) (* Goal: @Pj Tn C' H' B C *) (* Goal: False *) apply perp_not_col in H28. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Prodg Tn O E E' AC' AC P *) (* Goal: @Pj Tn C' H' B C *) (* Goal: False *) apply H28. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Prodg Tn O E E' AC' AC P *) (* Goal: @Pj Tn C' H' B C *) (* Goal: @Col Tn H A C *) assert(A <> C'). (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Prodg Tn O E E' AC' AC P *) (* Goal: @Pj Tn C' H' B C *) (* Goal: @Col Tn H A C *) (* Goal: not (@eq (@Tpoint Tn) A C') *) intro. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Prodg Tn O E E' AC' AC P *) (* Goal: @Pj Tn C' H' B C *) (* Goal: @Col Tn H A C *) (* Goal: False *) subst C'. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Prodg Tn O E E' AC' AC P *) (* Goal: @Pj Tn C' H' B C *) (* Goal: @Col Tn H A C *) (* Goal: False *) unfold CongA in H20. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Prodg Tn O E E' AC' AC P *) (* Goal: @Pj Tn C' H' B C *) (* Goal: @Col Tn H A C *) (* Goal: False *) tauto. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Prodg Tn O E E' AC' AC P *) (* Goal: @Pj Tn C' H' B C *) (* Goal: @Col Tn H A C *) assert(Col A H H'). (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Prodg Tn O E E' AC' AC P *) (* Goal: @Pj Tn C' H' B C *) (* Goal: @Col Tn H A C *) (* Goal: @Col Tn A H H' *) ColR. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Prodg Tn O E E' AC' AC P *) (* Goal: @Pj Tn C' H' B C *) (* Goal: @Col Tn H A C *) assert(A <> H'). (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Prodg Tn O E E' AC' AC P *) (* Goal: @Pj Tn C' H' B C *) (* Goal: @Col Tn H A C *) (* Goal: not (@eq (@Tpoint Tn) A H') *) intro. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Prodg Tn O E E' AC' AC P *) (* Goal: @Pj Tn C' H' B C *) (* Goal: @Col Tn H A C *) (* Goal: False *) subst H'. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Prodg Tn O E E' AC' AC P *) (* Goal: @Pj Tn C' H' B C *) (* Goal: @Col Tn H A C *) (* Goal: False *) unfold CongA in H19. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Prodg Tn O E E' AC' AC P *) (* Goal: @Pj Tn C' H' B C *) (* Goal: @Col Tn H A C *) (* Goal: False *) tauto. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Prodg Tn O E E' AC' AC P *) (* Goal: @Pj Tn C' H' B C *) (* Goal: @Col Tn H A C *) ColR. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Prodg Tn O E E' AC' AC P *) (* Goal: @Pj Tn C' H' B C *) left. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Prodg Tn O E E' AC' AC P *) (* Goal: @Par Tn C' H' B C *) finish. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Prodg Tn O E E' AC' AC P *) left. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Prod Tn O E E' AC' AC P *) assumption. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) assert(Prod O E E' AH' AB P). (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Prod Tn O E E' AH' AB P *) induction H27. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Prod Tn O E E' AH' AB P *) (* Goal: @Prod Tn O E E' AH' AB P *) assumption. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Prod Tn O E E' AH' AB P *) spliter. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Prod Tn O E E' AH' AB P *) apply False_ind. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: False *) apply H27. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Ar2 Tn O E E' AH' AB AB *) repeat split; Col. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Col Tn O E AH' *) unfold Length in H23. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Col Tn O E AH' *) tauto. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) assert(Length O E E' A H' AH). (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Length Tn O E E' A H' AH *) apply(length_eq_cong_2 O E E' A H A H' AH H5). (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Cong Tn A H A H' *) Cong. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) assert(AH = AH'). (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @eq (@Tpoint Tn) AH AH' *) apply (length_uniqueness O E E' A H'); auto. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) subst AH'. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) assert(Length O E E' A C' AC). (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Length Tn O E E' A C' AC *) apply(length_eq_cong_2 O E E' A C A C' AC H4). (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @Cong Tn A C A C' *) Cong. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) assert(AC = AC'). (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) (* Goal: @eq (@Tpoint Tn) AC AC' *) apply (length_uniqueness O E E' A C'); auto. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) subst AC'. (* Goal: iff (@Prod Tn O E E' AC AC AC2) (@Prod Tn O E E' AB AH AC2) *) split. (* Goal: forall _ : @Prod Tn O E E' AB AH AC2, @Prod Tn O E E' AC AC AC2 *) (* Goal: forall _ : @Prod Tn O E E' AC AC AC2, @Prod Tn O E E' AB AH AC2 *) intro. (* Goal: forall _ : @Prod Tn O E E' AB AH AC2, @Prod Tn O E E' AC AC AC2 *) (* Goal: @Prod Tn O E E' AB AH AC2 *) assert(P = AC2). (* Goal: forall _ : @Prod Tn O E E' AB AH AC2, @Prod Tn O E E' AC AC AC2 *) (* Goal: @Prod Tn O E E' AB AH AC2 *) (* Goal: @eq (@Tpoint Tn) P AC2 *) apply (prod_uniqueness O E E' AC AC); auto. (* Goal: forall _ : @Prod Tn O E E' AB AH AC2, @Prod Tn O E E' AC AC AC2 *) (* Goal: @Prod Tn O E E' AB AH AC2 *) subst P. (* Goal: forall _ : @Prod Tn O E E' AB AH AC2, @Prod Tn O E E' AC AC AC2 *) (* Goal: @Prod Tn O E E' AB AH AC2 *) apply prod_comm. (* Goal: forall _ : @Prod Tn O E E' AB AH AC2, @Prod Tn O E E' AC AC AC2 *) (* Goal: @Prod Tn O E E' AH AB AC2 *) assumption. (* Goal: forall _ : @Prod Tn O E E' AB AH AC2, @Prod Tn O E E' AC AC AC2 *) intro. (* Goal: @Prod Tn O E E' AC AC AC2 *) assert(P = AC2). (* Goal: @Prod Tn O E E' AC AC AC2 *) (* Goal: @eq (@Tpoint Tn) P AC2 *) apply (prod_uniqueness O E E' AB AH); auto. (* Goal: @Prod Tn O E E' AC AC AC2 *) (* Goal: @Prod Tn O E E' AB AH P *) apply prod_sym. (* Goal: @Prod Tn O E E' AC AC AC2 *) (* Goal: @Prod Tn O E E' AH AB P *) assumption. (* Goal: @Prod Tn O E E' AC AC AC2 *) subst P. (* Goal: @Prod Tn O E E' AC AC AC2 *) assumption. Qed. Lemma l15_7_1 : forall O E E' A B C H AB AC AH AC2, O<>E -> Per A C B -> Perp_at H C H A B -> Length O E E' A B AB -> Length O E E' A C AC -> Length O E E' A H AH -> Prod O E E' AC AC AC2 -> Prod O E E' AB AH AC2. Proof. (* Goal: forall (O E E' A B C H AB AC AH AC2 : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) O E)) (_ : @Per Tn A C B) (_ : @Perp_at Tn H C H A B) (_ : @Length Tn O E E' A B AB) (_ : @Length Tn O E E' A C AC) (_ : @Length Tn O E E' A H AH) (_ : @Prod Tn O E E' AC AC AC2), @Prod Tn O E E' AB AH AC2 *) intros. (* Goal: @Prod Tn O E E' AB AH AC2 *) destruct(l15_7 O E E' A B C H AB AC AH AC2 H0 H1 H2 H3 H4 H5). (* Goal: @Prod Tn O E E' AB AH AC2 *) apply H7. (* Goal: @Prod Tn O E E' AC AC AC2 *) assumption. Qed. Lemma l15_7_2 : forall O E E' A B C H AB AC AH AC2, O<>E -> Per A C B -> Perp_at H C H A B -> Length O E E' A B AB -> Length O E E' A C AC -> Length O E E' A H AH -> Prod O E E' AB AH AC2 -> Prod O E E' AC AC AC2. Proof. (* Goal: forall (O E E' A B C H AB AC AH AC2 : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) O E)) (_ : @Per Tn A C B) (_ : @Perp_at Tn H C H A B) (_ : @Length Tn O E E' A B AB) (_ : @Length Tn O E E' A C AC) (_ : @Length Tn O E E' A H AH) (_ : @Prod Tn O E E' AB AH AC2), @Prod Tn O E E' AC AC AC2 *) intros. (* Goal: @Prod Tn O E E' AC AC AC2 *) destruct(l15_7 O E E' A B C H AB AC AH AC2 H0 H1 H2 H3 H4 H5). (* Goal: @Prod Tn O E E' AC AC AC2 *) apply H8. (* Goal: @Prod Tn O E E' AB AH AC2 *) assumption. Qed. Lemma length_sym : forall O E E' A B AB, Length O E E' A B AB -> Length O E E' B A AB. Proof. (* Goal: forall (O E E' A B AB : @Tpoint Tn) (_ : @Length Tn O E E' A B AB), @Length Tn O E E' B A AB *) intros. (* Goal: @Length Tn O E E' B A AB *) unfold Length in *. (* Goal: and (not (@eq (@Tpoint Tn) O E)) (and (@Col Tn O E AB) (and (@LeP Tn O E E' O AB) (@Cong Tn O AB B A))) *) spliter. (* Goal: and (not (@eq (@Tpoint Tn) O E)) (and (@Col Tn O E AB) (and (@LeP Tn O E E' O AB) (@Cong Tn O AB B A))) *) repeat split; auto. (* Goal: @Cong Tn O AB B A *) Cong. Qed. Lemma pythagoras : forall O E E' A B C AC BC AB AC2 BC2 AB2, O <> E -> Per A C B -> Length O E E' A B AB -> Length O E E' A C AC -> Length O E E' B C BC -> Prod O E E' AC AC AC2 -> Prod O E E' BC BC BC2 -> Prod O E E' AB AB AB2 -> Sum O E E' AC2 BC2 AB2. Proof. (* Goal: forall (O E E' A B C AC BC AB AC2 BC2 AB2 : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) O E)) (_ : @Per Tn A C B) (_ : @Length Tn O E E' A B AB) (_ : @Length Tn O E E' A C AC) (_ : @Length Tn O E E' B C BC) (_ : @Prod Tn O E E' AC AC AC2) (_ : @Prod Tn O E E' BC BC BC2) (_ : @Prod Tn O E E' AB AB AB2), @Sum Tn O E E' AC2 BC2 AB2 *) intros. (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) assert(~Col O E E' /\ Col O E AB2 /\ Col O E AC2 /\ Col O E BC). (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: and (not (@Col Tn O E E')) (and (@Col Tn O E AB2) (and (@Col Tn O E AC2) (@Col Tn O E BC))) *) unfold Prod in *. (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: and (not (@Col Tn O E E')) (and (@Col Tn O E AB2) (and (@Col Tn O E AC2) (@Col Tn O E BC))) *) spliter. (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: and (not (@Col Tn O E E')) (and (@Col Tn O E AB2) (and (@Col Tn O E AC2) (@Col Tn O E BC))) *) unfold Ar2 in H4 ,H5 ,H6. (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: and (not (@Col Tn O E E')) (and (@Col Tn O E AB2) (and (@Col Tn O E AC2) (@Col Tn O E BC))) *) repeat split; tauto. (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) spliter. (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) induction(col_dec A C B). (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) assert(HH:=l8_9 A C B H0 H11). (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) induction HH. (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) subst C. (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) assert(AB = BC). (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @eq (@Tpoint Tn) AB BC *) apply(length_uniqueness O E E' A B). (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @Length Tn O E E' A B BC *) (* Goal: @Length Tn O E E' A B AB *) assumption. (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @Length Tn O E E' A B BC *) apply length_sym. (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @Length Tn O E E' B A BC *) assumption. (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) subst BC. (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) assert(AB2 = BC2). (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @eq (@Tpoint Tn) AB2 BC2 *) apply(prod_uniqueness O E E' AB AB); auto. (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) subst BC2. (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @Sum Tn O E E' AC2 AB2 AB2 *) assert(AC = O). (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @Sum Tn O E E' AC2 AB2 AB2 *) (* Goal: @eq (@Tpoint Tn) AC O *) apply(length_uniqueness O E E' A A). (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @Sum Tn O E E' AC2 AB2 AB2 *) (* Goal: @Length Tn O E E' A A O *) (* Goal: @Length Tn O E E' A A AC *) assumption. (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @Sum Tn O E E' AC2 AB2 AB2 *) (* Goal: @Length Tn O E E' A A O *) apply length_id_2; assumption. (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @Sum Tn O E E' AC2 AB2 AB2 *) subst AC. (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @Sum Tn O E E' AC2 AB2 AB2 *) assert(AC2=O). (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @Sum Tn O E E' AC2 AB2 AB2 *) (* Goal: @eq (@Tpoint Tn) AC2 O *) apply(prod_uniqueness O E E' O O). (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @Sum Tn O E E' AC2 AB2 AB2 *) (* Goal: @Prod Tn O E E' O O O *) (* Goal: @Prod Tn O E E' O O AC2 *) assumption. (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @Sum Tn O E E' AC2 AB2 AB2 *) (* Goal: @Prod Tn O E E' O O O *) apply prod_0_l; Col. (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @Sum Tn O E E' AC2 AB2 AB2 *) subst AC2. (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @Sum Tn O E E' O AB2 AB2 *) apply sum_O_B; Col. (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) subst C. (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) assert(AB = AC). (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @eq (@Tpoint Tn) AB AC *) apply(length_uniqueness O E E' A B). (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @Length Tn O E E' A B AC *) (* Goal: @Length Tn O E E' A B AB *) assumption. (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @Length Tn O E E' A B AC *) assumption. (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) subst AC. (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) assert(AB2 = AC2). (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @eq (@Tpoint Tn) AB2 AC2 *) apply(prod_uniqueness O E E' AB AB); auto. (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) subst AC2. (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @Sum Tn O E E' AB2 BC2 AB2 *) assert(BC = O). (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @Sum Tn O E E' AB2 BC2 AB2 *) (* Goal: @eq (@Tpoint Tn) BC O *) apply(length_uniqueness O E E' B B). (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @Sum Tn O E E' AB2 BC2 AB2 *) (* Goal: @Length Tn O E E' B B O *) (* Goal: @Length Tn O E E' B B BC *) assumption. (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @Sum Tn O E E' AB2 BC2 AB2 *) (* Goal: @Length Tn O E E' B B O *) apply length_id_2; assumption. (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @Sum Tn O E E' AB2 BC2 AB2 *) subst BC. (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @Sum Tn O E E' AB2 BC2 AB2 *) assert(BC2=O). (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @Sum Tn O E E' AB2 BC2 AB2 *) (* Goal: @eq (@Tpoint Tn) BC2 O *) apply(prod_uniqueness O E E' O O). (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @Sum Tn O E E' AB2 BC2 AB2 *) (* Goal: @Prod Tn O E E' O O O *) (* Goal: @Prod Tn O E E' O O BC2 *) assumption. (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @Sum Tn O E E' AB2 BC2 AB2 *) (* Goal: @Prod Tn O E E' O O O *) apply prod_0_l; Col. (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @Sum Tn O E E' AB2 BC2 AB2 *) subst BC2. (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @Sum Tn O E E' AB2 O AB2 *) apply sum_A_O; Col. (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) assert(exists X : Tpoint, Col A B X /\ Perp A B C X). (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn A B X) (@Perp Tn A B C X)) *) apply(l8_18_existence A B C); Col. (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) ex_and H12 P. (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) assert(Perp_at P A B C P). (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @Perp_at Tn P A B C P *) apply(l8_14_2_1b_bis A B C P P H13); Col. (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) assert(Bet A P B /\ A <> P /\ B <> P). (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: and (@Bet Tn A P B) (and (not (@eq (@Tpoint Tn) A P)) (not (@eq (@Tpoint Tn) B P))) *) apply(l11_47 A B C P H0). (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @Perp_at Tn P C P A B *) finish. (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) spliter. (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) assert(HL1:= length_existence O E E' A P H7). (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) assert(HL2:= length_existence O E E' B P H7). (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) ex_and HL1 AP. (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) ex_and HL2 BP. (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) assert(Sum O E E' AP BP AB). (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @Sum Tn O E E' AP BP AB *) apply(triangular_equality_bis O E E' A P B AP BP AB); auto. (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @Length Tn O E E' P B BP *) apply length_sym. (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @Length Tn O E E' B P BP *) assumption. (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) assert(Prod O E E' AB AP AC2). (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @Prod Tn O E E' AB AP AC2 *) apply(l15_7_1 O E E' A B C P AB AC AP AC2 H H0); finish. (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) assert(Prod O E E' AB BP BC2). (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @Prod Tn O E E' AB BP BC2 *) eapply(l15_7_1 O E E' B A C P AB BC); finish. (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) (* Goal: @Length Tn O E E' B A AB *) apply length_sym;auto. (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) assert(HD:=distr_l O E E' AB AP BP AB AC2 BC2 AB2 H20 H21 H22 H6). (* Goal: @Sum Tn O E E' AC2 BC2 AB2 *) assumption. Qed. Lemma is_length_exists : forall O E E' X Y, ~ Col O E E' -> exists XY, Is_length O E E' X Y XY. Proof. (* Goal: forall (O E E' X Y : @Tpoint Tn) (_ : not (@Col Tn O E E')), @ex (@Tpoint Tn) (fun XY : @Tpoint Tn => @Is_length Tn O E E' X Y XY) *) intros O E E' X Y HNC. (* Goal: @ex (@Tpoint Tn) (fun XY : @Tpoint Tn => @Is_length Tn O E E' X Y XY) *) elim (eq_dec_points X Y); intro HXY; [treat_equalities; exists O; left; apply length_id_2; assert_diffs; auto| destruct (length_existence O E E' X Y) as [XY HLength]; Col; exists XY; left; auto]. Qed. Lemma lt_to_ltp : forall O E E' A B L C D M, Length O E E' A B L -> Length O E E' C D M -> Lt A B C D -> LtP O E E' L M. Proof. (* Goal: forall (O E E' A B L C D M : @Tpoint Tn) (_ : @Length Tn O E E' A B L) (_ : @Length Tn O E E' C D M) (_ : @Lt Tn A B C D), @LtP Tn O E E' L M *) intros. (* Goal: @LtP Tn O E E' L M *) induction(eq_dec_points L M). (* Goal: @LtP Tn O E E' L M *) (* Goal: @LtP Tn O E E' L M *) { (* Goal: @LtP Tn O E E' L M *) subst M. (* Goal: @LtP Tn O E E' L L *) apply length_cong in H0. (* Goal: @LtP Tn O E E' L L *) apply length_cong in H. (* Goal: @LtP Tn O E E' L L *) unfold Lt in H1. (* Goal: @LtP Tn O E E' L L *) spliter. (* Goal: @LtP Tn O E E' L L *) apply False_ind. (* Goal: False *) apply H2; eCong. (* BG Goal: @LtP Tn O E E' L M *) } (* Goal: @LtP Tn O E E' L M *) { (* Goal: @LtP Tn O E E' L M *) assert(Le A B C D). (* Goal: @LtP Tn O E E' L M *) (* Goal: @Le Tn A B C D *) { (* Goal: @Le Tn A B C D *) apply lt__le; auto. (* BG Goal: @LtP Tn O E E' L M *) } (* Goal: @LtP Tn O E E' L M *) assert(HH:= length_leP_le_2 O E E' A B C D L M H H0 H3). (* Goal: @LtP Tn O E E' L M *) unfold LeP in HH. (* Goal: @LtP Tn O E E' L M *) induction HH. (* Goal: @LtP Tn O E E' L M *) (* Goal: @LtP Tn O E E' L M *) { (* Goal: @LtP Tn O E E' L M *) assumption. (* BG Goal: @LtP Tn O E E' L M *) } (* Goal: @LtP Tn O E E' L M *) { (* Goal: @LtP Tn O E E' L M *) contradiction. Qed. Lemma ltp_to_lep : forall O E E' L M, LtP O E E' L M -> LeP O E E' L M. Proof. (* Goal: forall (O E E' L M : @Tpoint Tn) (_ : @LtP Tn O E E' L M), @LeP Tn O E E' L M *) intros. (* Goal: @LeP Tn O E E' L M *) unfold LeP. (* Goal: or (@LtP Tn O E E' L M) (@eq (@Tpoint Tn) L M) *) left; auto. Qed. Lemma ltp_to_lt : forall O E E' A B L C D M, Length O E E' A B L -> Length O E E' C D M -> LtP O E E' L M -> Lt A B C D. Proof. (* Goal: forall (O E E' A B L C D M : @Tpoint Tn) (_ : @Length Tn O E E' A B L) (_ : @Length Tn O E E' C D M) (_ : @LtP Tn O E E' L M), @Lt Tn A B C D *) intros. (* Goal: @Lt Tn A B C D *) assert(LeP O E E' L M). (* Goal: @Lt Tn A B C D *) (* Goal: @LeP Tn O E E' L M *) apply ltp_to_lep; auto. (* Goal: @Lt Tn A B C D *) unfold Lt. (* Goal: and (@Le Tn A B C D) (not (@Cong Tn A B C D)) *) split. (* Goal: not (@Cong Tn A B C D) *) (* Goal: @Le Tn A B C D *) apply(length_leP_le_1 O E E' A B C D L M); auto. (* Goal: not (@Cong Tn A B C D) *) intro. (* Goal: False *) assert(HH:= length_eq_cong_2 O E E' A B C D L H H3). (* Goal: False *) assert(L = M). (* Goal: False *) (* Goal: @eq (@Tpoint Tn) L M *) { (* Goal: @eq (@Tpoint Tn) L M *) apply (length_uniqueness O E E' C D); auto. (* BG Goal: False *) } (* Goal: False *) subst M. (* Goal: False *) unfold LtP in H1. (* Goal: False *) ex_and H1 P. (* Goal: False *) assert(~Col O E E' /\ Col O E L). (* Goal: False *) (* Goal: and (not (@Col Tn O E E')) (@Col Tn O E L) *) { (* Goal: and (not (@Col Tn O E E')) (@Col Tn O E L) *) unfold Diff in H1. (* Goal: and (not (@Col Tn O E E')) (@Col Tn O E L) *) ex_and H1 X. (* Goal: and (not (@Col Tn O E E')) (@Col Tn O E L) *) unfold Sum in H5. (* Goal: and (not (@Col Tn O E E')) (@Col Tn O E L) *) unfold Ar2 in H5. (* Goal: and (not (@Col Tn O E E')) (@Col Tn O E L) *) spliter. (* Goal: and (not (@Col Tn O E E')) (@Col Tn O E L) *) tauto. (* BG Goal: False *) } (* Goal: False *) spliter. (* Goal: False *) assert(HP:= diff_null O E E' L H5 H6). (* Goal: False *) assert(P = O). (* Goal: False *) (* Goal: @eq (@Tpoint Tn) P O *) apply(diff_uniqueness O E E' L L P O); auto. (* Goal: False *) subst P. (* Goal: False *) unfold Ps in H4. (* Goal: False *) unfold Out in H4. (* Goal: False *) tauto. Qed. Lemma prod_col : forall O E E' A B AB ,Ar2 O E E' A B A -> Prod O E E' A B AB -> Col O E AB. Proof. (* Goal: forall (O E E' A B AB : @Tpoint Tn) (_ : @Ar2 Tn O E E' A B A) (_ : @Prod Tn O E E' A B AB), @Col Tn O E AB *) intros. (* Goal: @Col Tn O E AB *) unfold Prod in H0. (* Goal: @Col Tn O E AB *) spliter. (* Goal: @Col Tn O E AB *) unfold Ar2 in H0. (* Goal: @Col Tn O E AB *) tauto. Qed. Lemma square_increase_strict : forall O E E' A B A2 B2, Ar2 O E E' A B A -> Ps O E A -> Ps O E B -> LtP O E E' A B -> Prod O E E' A A A2 -> Prod O E E' B B B2 -> LtP O E E' A2 B2. Proof. (* Goal: forall (O E E' A B A2 B2 : @Tpoint Tn) (_ : @Ar2 Tn O E E' A B A) (_ : @Ps Tn O E A) (_ : @Ps Tn O E B) (_ : @LtP Tn O E E' A B) (_ : @Prod Tn O E E' A A A2) (_ : @Prod Tn O E E' B B B2), @LtP Tn O E E' A2 B2 *) intros. (* Goal: @LtP Tn O E E' A2 B2 *) assert(HA2 : Col O E A2). (* Goal: @LtP Tn O E E' A2 B2 *) (* Goal: @Col Tn O E A2 *) { (* Goal: @Col Tn O E A2 *) apply (prod_col O E E' A A); auto. (* Goal: @Ar2 Tn O E E' A A A *) unfold Ar2 in *. (* Goal: and (not (@Col Tn O E E')) (and (@Col Tn O E A) (and (@Col Tn O E A) (@Col Tn O E A))) *) tauto. (* BG Goal: @LtP Tn O E E' A2 B2 *) } (* Goal: @LtP Tn O E E' A2 B2 *) assert(HB2: Col O E B2). (* Goal: @LtP Tn O E E' A2 B2 *) (* Goal: @Col Tn O E B2 *) { (* Goal: @Col Tn O E B2 *) apply (prod_col O E E' B B); auto. (* Goal: @Ar2 Tn O E E' B B B *) unfold Ar2 in *. (* Goal: and (not (@Col Tn O E E')) (and (@Col Tn O E B) (and (@Col Tn O E B) (@Col Tn O E B))) *) tauto. (* BG Goal: @LtP Tn O E E' A2 B2 *) } (* Goal: @LtP Tn O E E' A2 B2 *) unfold Ar2 in H. (* Goal: @LtP Tn O E E' A2 B2 *) spliter. (* Goal: @LtP Tn O E E' A2 B2 *) assert(HD:=diff_exists O E E' B A H H6 H7). (* Goal: @LtP Tn O E E' A2 B2 *) ex_and HD BmA. (* Goal: @LtP Tn O E E' A2 B2 *) assert(HS:=sum_exists O E E' H B A H6 H7). (* Goal: @LtP Tn O E E' A2 B2 *) ex_and HS BpA. (* Goal: @LtP Tn O E E' A2 B2 *) assert(HD:=diff_exists O E E' B2 A2 H HB2 HA2). (* Goal: @LtP Tn O E E' A2 B2 *) ex_and HD B2mA2. (* Goal: @LtP Tn O E E' A2 B2 *) assert(Col O E BpA). (* Goal: @LtP Tn O E E' A2 B2 *) (* Goal: @Col Tn O E BpA *) { (* Goal: @Col Tn O E BpA *) apply sum_ar2 in H9. (* Goal: @Col Tn O E BpA *) unfold Ar2 in H9. (* Goal: @Col Tn O E BpA *) tauto. (* BG Goal: @LtP Tn O E E' A2 B2 *) } (* Goal: @LtP Tn O E E' A2 B2 *) assert(Col O E BmA). (* Goal: @LtP Tn O E E' A2 B2 *) (* Goal: @Col Tn O E BmA *) { (* Goal: @Col Tn O E BmA *) apply diff_ar2 in H8. (* Goal: @Col Tn O E BmA *) unfold Ar2 in H8. (* Goal: @Col Tn O E BmA *) tauto. (* BG Goal: @LtP Tn O E E' A2 B2 *) } (* Goal: @LtP Tn O E E' A2 B2 *) assert(Col O E B2mA2). (* Goal: @LtP Tn O E E' A2 B2 *) (* Goal: @Col Tn O E B2mA2 *) { (* Goal: @Col Tn O E B2mA2 *) apply diff_ar2 in H10. (* Goal: @Col Tn O E B2mA2 *) unfold Ar2 in H10. (* Goal: @Col Tn O E B2mA2 *) tauto. (* BG Goal: @LtP Tn O E E' A2 B2 *) } (* Goal: @LtP Tn O E E' A2 B2 *) assert(HP:= prod_exists O E E' H BpA BmA H11 H12). (* Goal: @LtP Tn O E E' A2 B2 *) ex_and HP F. (* Goal: @LtP Tn O E E' A2 B2 *) assert(HC:= diff_of_squares O E E' B A B2 A2 B2mA2 BpA BmA F H4 H3 H10 H9 H8 H14). (* Goal: @LtP Tn O E E' A2 B2 *) subst F. (* Goal: @LtP Tn O E E' A2 B2 *) unfold LtP. (* Goal: @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (@Diff Tn O E E' B2 A2 D) (@Ps Tn O E D)) *) exists B2mA2. (* Goal: and (@Diff Tn O E E' B2 A2 B2mA2) (@Ps Tn O E B2mA2) *) split; auto. (* Goal: @Ps Tn O E B2mA2 *) apply (prod_pos_pos O E E' BpA BmA); auto. (* Goal: @Ps Tn O E BmA *) (* Goal: @Ps Tn O E BpA *) apply (sum_pos_pos O E E' B A); auto. (* Goal: @Ps Tn O E BmA *) apply (lt_diff_ps O E E' B A); auto. Qed. Lemma square_increase : forall O E E' A B A2 B2, Ar2 O E E' A B A -> Ps O E A -> Ps O E B -> LeP O E E' A B -> Prod O E E' A A A2 -> Prod O E E' B B B2 -> LeP O E E' A2 B2. Proof. (* Goal: forall (O E E' A B A2 B2 : @Tpoint Tn) (_ : @Ar2 Tn O E E' A B A) (_ : @Ps Tn O E A) (_ : @Ps Tn O E B) (_ : @LeP Tn O E E' A B) (_ : @Prod Tn O E E' A A A2) (_ : @Prod Tn O E E' B B B2), @LeP Tn O E E' A2 B2 *) intros. (* Goal: @LeP Tn O E E' A2 B2 *) unfold LeP in H2. (* Goal: @LeP Tn O E E' A2 B2 *) induction H2. (* Goal: @LeP Tn O E E' A2 B2 *) (* Goal: @LeP Tn O E E' A2 B2 *) apply (square_increase_strict O E E' A B A2 B2) in H2; auto. (* Goal: @LeP Tn O E E' A2 B2 *) (* Goal: @LeP Tn O E E' A2 B2 *) apply ltp_to_lep in H2; auto. (* Goal: @LeP Tn O E E' A2 B2 *) subst B. (* Goal: @LeP Tn O E E' A2 B2 *) assert(A2 = B2). (* Goal: @LeP Tn O E E' A2 B2 *) (* Goal: @eq (@Tpoint Tn) A2 B2 *) { (* Goal: @eq (@Tpoint Tn) A2 B2 *) apply (prod_uniqueness O E E' A A); auto. (* BG Goal: @LeP Tn O E E' A2 B2 *) } (* Goal: @LeP Tn O E E' A2 B2 *) subst B2. (* Goal: @LeP Tn O E E' A2 A2 *) unfold LeP. (* Goal: or (@LtP Tn O E E' A2 A2) (@eq (@Tpoint Tn) A2 A2) *) right; auto. Qed. Lemma signeq__prod_pos : forall O E E' A B C, SignEq O E A B -> Prod O E E' A B C -> Ps O E C. Lemma pos_neg__prod_neg : forall O E E' A B C, Ps O E A -> Ng O E B -> Prod O E E' A B C -> Ng O E C. Lemma sign_dec : forall O E A, Col O E A -> O <> E -> A = O \/ Ps O E A \/ Ng O E A. Proof. (* Goal: forall (O E A : @Tpoint Tn) (_ : @Col Tn O E A) (_ : not (@eq (@Tpoint Tn) O E)), or (@eq (@Tpoint Tn) A O) (or (@Ps Tn O E A) (@Ng Tn O E A)) *) intros. (* Goal: or (@eq (@Tpoint Tn) A O) (or (@Ps Tn O E A) (@Ng Tn O E A)) *) induction(eq_dec_points A O). (* Goal: or (@eq (@Tpoint Tn) A O) (or (@Ps Tn O E A) (@Ng Tn O E A)) *) (* Goal: or (@eq (@Tpoint Tn) A O) (or (@Ps Tn O E A) (@Ng Tn O E A)) *) left; auto. (* Goal: or (@eq (@Tpoint Tn) A O) (or (@Ps Tn O E A) (@Ng Tn O E A)) *) assert(HH:= third_point O E A H). (* Goal: or (@eq (@Tpoint Tn) A O) (or (@Ps Tn O E A) (@Ng Tn O E A)) *) induction HH. (* Goal: or (@eq (@Tpoint Tn) A O) (or (@Ps Tn O E A) (@Ng Tn O E A)) *) (* Goal: or (@eq (@Tpoint Tn) A O) (or (@Ps Tn O E A) (@Ng Tn O E A)) *) { (* Goal: or (@eq (@Tpoint Tn) A O) (or (@Ps Tn O E A) (@Ng Tn O E A)) *) right;right. (* Goal: @Ng Tn O E A *) unfold Ng. (* Goal: and (not (@eq (@Tpoint Tn) A O)) (and (not (@eq (@Tpoint Tn) E O)) (@Bet Tn A O E)) *) repeat split; auto. (* BG Goal: or (@eq (@Tpoint Tn) A O) (or (@Ps Tn O E A) (@Ng Tn O E A)) *) } (* Goal: or (@eq (@Tpoint Tn) A O) (or (@Ps Tn O E A) (@Ng Tn O E A)) *) { (* Goal: or (@eq (@Tpoint Tn) A O) (or (@Ps Tn O E A) (@Ng Tn O E A)) *) right;left. (* Goal: @Ps Tn O E A *) unfold Ps. (* Goal: @Out Tn O A E *) unfold Out. (* Goal: and (not (@eq (@Tpoint Tn) A O)) (and (not (@eq (@Tpoint Tn) E O)) (or (@Bet Tn O A E) (@Bet Tn O E A))) *) repeat split; auto. Qed. Lemma not_signEq_prod_neg : forall O E E' A B C, A <> O -> B <> O -> ~SignEq O E A B -> Prod O E E' A B C -> Ng O E C. Lemma prod_pos__signeq : forall O E E' A B C, A <> O -> B <> O -> Prod O E E' A B C -> Ps O E C -> SignEq O E A B. Lemma prod_ng___not_signeq : forall O E E' A B C, A <> O -> B <> O -> Prod O E E' A B C -> Ng O E C -> ~SignEq O E A B. Lemma ltp__diff_pos : forall O E E' A B D, LtP O E E' A B -> Diff O E E' B A D -> Ps O E D. Proof. (* Goal: forall (O E E' A B D : @Tpoint Tn) (_ : @LtP Tn O E E' A B) (_ : @Diff Tn O E E' B A D), @Ps Tn O E D *) intros. (* Goal: @Ps Tn O E D *) unfold LtP in H. (* Goal: @Ps Tn O E D *) ex_and H D'. (* Goal: @Ps Tn O E D *) assert(D = D'). (* Goal: @Ps Tn O E D *) (* Goal: @eq (@Tpoint Tn) D D' *) { (* Goal: @eq (@Tpoint Tn) D D' *) apply (diff_uniqueness O E E' B A); auto. (* BG Goal: @Ps Tn O E D *) } (* Goal: @Ps Tn O E D *) subst D'. (* Goal: @Ps Tn O E D *) assumption. Qed. Lemma diff_pos__ltp : forall O E E' A B D, Diff O E E' B A D -> Ps O E D -> LtP O E E' A B. Proof. (* Goal: forall (O E E' A B D : @Tpoint Tn) (_ : @Diff Tn O E E' B A D) (_ : @Ps Tn O E D), @LtP Tn O E E' A B *) intros. (* Goal: @LtP Tn O E E' A B *) unfold LtP. (* Goal: @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (@Diff Tn O E E' B A D) (@Ps Tn O E D)) *) exists D. (* Goal: and (@Diff Tn O E E' B A D) (@Ps Tn O E D) *) split; auto. Qed. Lemma square_increase_rev : forall O E E' A B A2 B2, Ps O E A -> Ps O E B -> LtP O E E' A2 B2 -> Prod O E E' A A A2 -> Prod O E E' B B B2 -> LtP O E E' A B. Lemma ltp__ltps: forall O E E' A B, LtP O E E' A B -> LtPs O E E' A B. Proof. (* Goal: forall (O E E' A B : @Tpoint Tn) (_ : @LtP Tn O E E' A B), @LtPs Tn O E E' A B *) intros. (* Goal: @LtPs Tn O E E' A B *) unfold LtP in H. (* Goal: @LtPs Tn O E E' A B *) ex_and H D. (* Goal: @LtPs Tn O E E' A B *) unfold LtPs. (* Goal: @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (@Ps Tn O E D) (@Sum Tn O E E' A D B)) *) exists D. (* Goal: and (@Ps Tn O E D) (@Sum Tn O E E' A D B) *) split; auto. (* Goal: @Sum Tn O E E' A D B *) apply diff_sum. (* Goal: @Diff Tn O E E' B A D *) assumption. Qed. Lemma ltps__ltp: forall O E E' A B, LtPs O E E' A B -> LtP O E E' A B. Proof. (* Goal: forall (O E E' A B : @Tpoint Tn) (_ : @LtPs Tn O E E' A B), @LtP Tn O E E' A B *) intros. (* Goal: @LtP Tn O E E' A B *) unfold LtPs in H. (* Goal: @LtP Tn O E E' A B *) ex_and H D. (* Goal: @LtP Tn O E E' A B *) unfold LtP. (* Goal: @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (@Diff Tn O E E' B A D) (@Ps Tn O E D)) *) exists D. (* Goal: and (@Diff Tn O E E' B A D) (@Ps Tn O E D) *) split; auto. (* Goal: @Diff Tn O E E' B A D *) apply sum_diff. (* Goal: @Sum Tn O E E' A D B *) assumption. Qed. Lemma ltp__lep_neq : forall O E E' A B, LtP O E E' A B -> LeP O E E' A B /\ A <> B. Proof. (* Goal: forall (O E E' A B : @Tpoint Tn) (_ : @LtP Tn O E E' A B), and (@LeP Tn O E E' A B) (not (@eq (@Tpoint Tn) A B)) *) intros. (* Goal: and (@LeP Tn O E E' A B) (not (@eq (@Tpoint Tn) A B)) *) unfold LeP. (* Goal: and (or (@LtP Tn O E E' A B) (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) A B)) *) split. (* Goal: not (@eq (@Tpoint Tn) A B) *) (* Goal: or (@LtP Tn O E E' A B) (@eq (@Tpoint Tn) A B) *) left; auto. (* Goal: not (@eq (@Tpoint Tn) A B) *) unfold LtP in H. (* Goal: not (@eq (@Tpoint Tn) A B) *) ex_and H D. (* Goal: not (@eq (@Tpoint Tn) A B) *) intro. (* Goal: False *) subst B. (* Goal: False *) assert(HD:= H). (* Goal: False *) unfold Diff in HD. (* Goal: False *) ex_and HD B'. (* Goal: False *) unfold Sum in H2. (* Goal: False *) unfold Ar2 in H2. (* Goal: False *) spliter. (* Goal: False *) clear H3. (* Goal: False *) assert(Diff O E E' A A O). (* Goal: False *) (* Goal: @Diff Tn O E E' A A O *) apply diff_null; auto. (* Goal: False *) assert(D = O). (* Goal: False *) (* Goal: @eq (@Tpoint Tn) D O *) apply (diff_uniqueness O E E' A A); auto. (* Goal: False *) subst D. (* Goal: False *) unfold Ps in H0. (* Goal: False *) unfold Out in H0. (* Goal: False *) tauto. Qed. Lemma lep_neq__ltp : forall O E E' A B, LeP O E E' A B /\ A <> B -> LtP O E E' A B. Proof. (* Goal: forall (O E E' A B : @Tpoint Tn) (_ : and (@LeP Tn O E E' A B) (not (@eq (@Tpoint Tn) A B))), @LtP Tn O E E' A B *) intros. (* Goal: @LtP Tn O E E' A B *) spliter. (* Goal: @LtP Tn O E E' A B *) unfold LeP in H. (* Goal: @LtP Tn O E E' A B *) induction H. (* Goal: @LtP Tn O E E' A B *) (* Goal: @LtP Tn O E E' A B *) assumption. (* Goal: @LtP Tn O E E' A B *) contradiction. Qed. Lemma sum_preserves_ltp : forall O E E' A B C AC BC, LtP O E E' A B -> Sum O E E' A C AC -> Sum O E E' B C BC -> LtP O E E' AC BC. Proof. (* Goal: forall (O E E' A B C AC BC : @Tpoint Tn) (_ : @LtP Tn O E E' A B) (_ : @Sum Tn O E E' A C AC) (_ : @Sum Tn O E E' B C BC), @LtP Tn O E E' AC BC *) intros. (* Goal: @LtP Tn O E E' AC BC *) apply ltp__lep_neq in H. (* Goal: @LtP Tn O E E' AC BC *) spliter. (* Goal: @LtP Tn O E E' AC BC *) apply lep_neq__ltp. (* Goal: and (@LeP Tn O E E' AC BC) (not (@eq (@Tpoint Tn) AC BC)) *) split. (* Goal: not (@eq (@Tpoint Tn) AC BC) *) (* Goal: @LeP Tn O E E' AC BC *) apply(compatibility_of_sum_with_order O E E' A B C AC BC H H0 H1). (* Goal: not (@eq (@Tpoint Tn) AC BC) *) intro. (* Goal: False *) subst BC. (* Goal: False *) assert(HS:= H0). (* Goal: False *) unfold Sum in HS. (* Goal: False *) unfold Ar2 in HS. (* Goal: False *) spliter. (* Goal: False *) clear H4. (* Goal: False *) assert(A = B). (* Goal: False *) (* Goal: @eq (@Tpoint Tn) A B *) { (* Goal: @eq (@Tpoint Tn) A B *) apply (sum_uniquenessA O E E' H3 C A B AC); auto. (* BG Goal: False *) } (* Goal: False *) contradiction. Qed. Lemma sum_preserves_lep : forall O E E' A B C AC BC, LeP O E E' A B -> Sum O E E' A C AC -> Sum O E E' B C BC -> LeP O E E' AC BC. Proof. (* Goal: forall (O E E' A B C AC BC : @Tpoint Tn) (_ : @LeP Tn O E E' A B) (_ : @Sum Tn O E E' A C AC) (_ : @Sum Tn O E E' B C BC), @LeP Tn O E E' AC BC *) intros. (* Goal: @LeP Tn O E E' AC BC *) induction(eq_dec_points A B). (* Goal: @LeP Tn O E E' AC BC *) (* Goal: @LeP Tn O E E' AC BC *) { (* Goal: @LeP Tn O E E' AC BC *) subst B. (* Goal: @LeP Tn O E E' AC BC *) assert(HH:=sum_uniqueness O E E' A C AC BC H0 H1). (* Goal: @LeP Tn O E E' AC BC *) subst BC. (* Goal: @LeP Tn O E E' AC AC *) apply leP_refl. (* BG Goal: @LeP Tn O E E' AC BC *) } (* Goal: @LeP Tn O E E' AC BC *) { (* Goal: @LeP Tn O E E' AC BC *) assert(LtP O E E' A B). (* Goal: @LeP Tn O E E' AC BC *) (* Goal: @LtP Tn O E E' A B *) { (* Goal: @LtP Tn O E E' A B *) apply(lep_neq__ltp O E E' A B ); auto. (* BG Goal: @LeP Tn O E E' AC BC *) } (* Goal: @LeP Tn O E E' AC BC *) apply ltp_to_lep. (* Goal: @LtP Tn O E E' AC BC *) apply (sum_preserves_ltp O E E' A B C AC BC); auto. Qed. Lemma sum_preserves_ltp_rev : forall O E E' A B C AC BC, Sum O E E' A C AC -> Sum O E E' B C BC -> LtP O E E' AC BC -> LtP O E E' A B. Proof. (* Goal: forall (O E E' A B C AC BC : @Tpoint Tn) (_ : @Sum Tn O E E' A C AC) (_ : @Sum Tn O E E' B C BC) (_ : @LtP Tn O E E' AC BC), @LtP Tn O E E' A B *) intros. (* Goal: @LtP Tn O E E' A B *) assert(HS1:= H). (* Goal: @LtP Tn O E E' A B *) assert(HS2:= H0). (* Goal: @LtP Tn O E E' A B *) unfold Sum in HS1. (* Goal: @LtP Tn O E E' A B *) unfold Sum in HS2. (* Goal: @LtP Tn O E E' A B *) unfold Ar2 in *. (* Goal: @LtP Tn O E E' A B *) spliter. (* Goal: @LtP Tn O E E' A B *) clear H8. (* Goal: @LtP Tn O E E' A B *) clear H3. (* Goal: @LtP Tn O E E' A B *) assert(HH:= opp_exists O E E' H2 C H10). (* Goal: @LtP Tn O E E' A B *) ex_and HH C'. (* Goal: @LtP Tn O E E' A B *) assert (OP:=H3). (* Goal: @LtP Tn O E E' A B *) unfold Opp in OP. (* Goal: @LtP Tn O E E' A B *) unfold Sum in OP. (* Goal: @LtP Tn O E E' A B *) unfold Ar2 in *. (* Goal: @LtP Tn O E E' A B *) spliter. (* Goal: @LtP Tn O E E' A B *) clear H12. (* Goal: @LtP Tn O E E' A B *) unfold Opp in H3. (* Goal: @LtP Tn O E E' A B *) apply sum_comm in H3; Col. (* Goal: @LtP Tn O E E' A B *) assert(HH:= sum_exists O E E' H7 AC C' H11 H13). (* Goal: @LtP Tn O E E' A B *) ex_and HH D. (* Goal: @LtP Tn O E E' A B *) assert(HH:=sum_assoc O E E' A C C' AC O D H H3). (* Goal: @LtP Tn O E E' A B *) destruct HH. (* Goal: @LtP Tn O E E' A B *) assert(Sum O E E' A O D). (* Goal: @LtP Tn O E E' A B *) (* Goal: @Sum Tn O E E' A O D *) { (* Goal: @Sum Tn O E E' A O D *) apply H17; auto. (* BG Goal: @LtP Tn O E E' A B *) } (* Goal: @LtP Tn O E E' A B *) assert(HS:=sum_A_O_eq O E E' H2 A D H18). (* Goal: @LtP Tn O E E' A B *) subst D. (* Goal: @LtP Tn O E E' A B *) assert(HH:= sum_exists O E E' H7 BC C' H6 H13). (* Goal: @LtP Tn O E E' A B *) ex_and HH D. (* Goal: @LtP Tn O E E' A B *) assert(HH:=sum_assoc O E E' B C C' BC O D H0 H3). (* Goal: @LtP Tn O E E' A B *) destruct HH. (* Goal: @LtP Tn O E E' A B *) assert(Sum O E E' B O D). (* Goal: @LtP Tn O E E' A B *) (* Goal: @Sum Tn O E E' B O D *) { (* Goal: @Sum Tn O E E' B O D *) apply H21; auto. (* BG Goal: @LtP Tn O E E' A B *) } (* Goal: @LtP Tn O E E' A B *) assert(HS:=sum_A_O_eq O E E' H2 B D H22). (* Goal: @LtP Tn O E E' A B *) subst D. (* Goal: @LtP Tn O E E' A B *) apply(sum_preserves_ltp O E E' AC BC C' A B H1 H12 H19). Qed. Lemma sum_preserves_lep_rev : forall O E E' A B C AC BC, Sum O E E' A C AC -> Sum O E E' B C BC -> LeP O E E' AC BC -> LeP O E E' A B. Proof. (* Goal: forall (O E E' A B C AC BC : @Tpoint Tn) (_ : @Sum Tn O E E' A C AC) (_ : @Sum Tn O E E' B C BC) (_ : @LeP Tn O E E' AC BC), @LeP Tn O E E' A B *) intros. (* Goal: @LeP Tn O E E' A B *) intros. (* Goal: @LeP Tn O E E' A B *) assert(HS1:= H). (* Goal: @LeP Tn O E E' A B *) assert(HS2:= H0). (* Goal: @LeP Tn O E E' A B *) unfold Sum in HS1. (* Goal: @LeP Tn O E E' A B *) unfold Sum in HS2. (* Goal: @LeP Tn O E E' A B *) unfold Ar2 in *. (* Goal: @LeP Tn O E E' A B *) spliter. (* Goal: @LeP Tn O E E' A B *) clear H8. (* Goal: @LeP Tn O E E' A B *) clear H3. (* Goal: @LeP Tn O E E' A B *) unfold LeP in *. (* Goal: or (@LtP Tn O E E' A B) (@eq (@Tpoint Tn) A B) *) induction H1. (* Goal: or (@LtP Tn O E E' A B) (@eq (@Tpoint Tn) A B) *) (* Goal: or (@LtP Tn O E E' A B) (@eq (@Tpoint Tn) A B) *) { (* Goal: or (@LtP Tn O E E' A B) (@eq (@Tpoint Tn) A B) *) left. (* Goal: @LtP Tn O E E' A B *) apply (sum_preserves_ltp_rev O E E' A B C AC BC); auto. (* BG Goal: or (@LtP Tn O E E' A B) (@eq (@Tpoint Tn) A B) *) } (* Goal: or (@LtP Tn O E E' A B) (@eq (@Tpoint Tn) A B) *) { (* Goal: or (@LtP Tn O E E' A B) (@eq (@Tpoint Tn) A B) *) subst BC. (* Goal: or (@LtP Tn O E E' A B) (@eq (@Tpoint Tn) A B) *) right. (* Goal: @eq (@Tpoint Tn) A B *) apply (sum_uniquenessA O E E' H7 C A B AC); auto. Qed. Lemma cong2_lea__le : forall A B C D E F : Tpoint, Cong A B D E -> Cong A C D F -> LeA F D E C A B -> Le E F B C. Proof. (* Goal: forall (A B C D E F : @Tpoint Tn) (_ : @Cong Tn A B D E) (_ : @Cong Tn A C D F) (_ : @LeA Tn F D E C A B), @Le Tn E F B C *) intros. (* Goal: @Le Tn E F B C *) assert(LtA F D E C A B \/ CongA F D E C A B). (* Goal: @Le Tn E F B C *) (* Goal: or (@LtA Tn F D E C A B) (@CongA Tn F D E C A B) *) { (* Goal: or (@LtA Tn F D E C A B) (@CongA Tn F D E C A B) *) unfold LtA. (* Goal: or (and (@LeA Tn F D E C A B) (not (@CongA Tn F D E C A B))) (@CongA Tn F D E C A B) *) induction (conga_dec F D E C A B). (* Goal: or (and (@LeA Tn F D E C A B) (not (@CongA Tn F D E C A B))) (@CongA Tn F D E C A B) *) (* Goal: or (and (@LeA Tn F D E C A B) (not (@CongA Tn F D E C A B))) (@CongA Tn F D E C A B) *) { (* Goal: or (and (@LeA Tn F D E C A B) (not (@CongA Tn F D E C A B))) (@CongA Tn F D E C A B) *) right; assumption. (* BG Goal: @Le Tn E F B C *) (* BG Goal: or (and (@LeA Tn F D E C A B) (not (@CongA Tn F D E C A B))) (@CongA Tn F D E C A B) *) } (* Goal: or (and (@LeA Tn F D E C A B) (not (@CongA Tn F D E C A B))) (@CongA Tn F D E C A B) *) { (* Goal: or (and (@LeA Tn F D E C A B) (not (@CongA Tn F D E C A B))) (@CongA Tn F D E C A B) *) left. (* Goal: and (@LeA Tn F D E C A B) (not (@CongA Tn F D E C A B)) *) split; auto. (* BG Goal: @Le Tn E F B C *) } (* BG Goal: @Le Tn E F B C *) } (* Goal: @Le Tn E F B C *) induction H2. (* Goal: @Le Tn E F B C *) (* Goal: @Le Tn E F B C *) { (* Goal: @Le Tn E F B C *) assert(Lt E F B C). (* Goal: @Le Tn E F B C *) (* Goal: @Lt Tn E F B C *) { (* Goal: @Lt Tn E F B C *) apply(t18_18 A B C D E F);auto. (* BG Goal: @Le Tn E F B C *) (* BG Goal: @Le Tn E F B C *) } (* Goal: @Le Tn E F B C *) apply lt__le. (* Goal: @Lt Tn E F B C *) assumption. (* BG Goal: @Le Tn E F B C *) } (* Goal: @Le Tn E F B C *) assert(Cong F E C B /\ (F <> E -> CongA D F E A C B /\ CongA D E F A B C)). (* Goal: @Le Tn E F B C *) (* Goal: and (@Cong Tn F E C B) (forall _ : not (@eq (@Tpoint Tn) F E), and (@CongA Tn D F E A C B) (@CongA Tn D E F A B C)) *) apply(l11_49 F D E C A B); Cong. (* Goal: @Le Tn E F B C *) spliter. (* Goal: @Le Tn E F B C *) unfold Le. (* Goal: @ex (@Tpoint Tn) (fun E0 : @Tpoint Tn => and (@Bet Tn B E0 C) (@Cong Tn E F B E0)) *) exists C. (* Goal: and (@Bet Tn B C C) (@Cong Tn E F B C) *) split;Cong. (* Goal: @Bet Tn B C C *) Between. Qed. Lemma lea_out_lea : forall A B C D E F A' C' D' F', Out B A A' -> Out B C C' -> Out E D D' -> Out E F F' -> LeA A B C D E F -> LeA A' B C' D' E F'. Proof. (* Goal: forall (A B C D E F A' C' D' F' : @Tpoint Tn) (_ : @Out Tn B A A') (_ : @Out Tn B C C') (_ : @Out Tn E D D') (_ : @Out Tn E F F') (_ : @LeA Tn A B C D E F), @LeA Tn A' B C' D' E F' *) intros. (* Goal: @LeA Tn A' B C' D' E F' *) unfold LeA in *. (* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@InAngle Tn P D' E F') (@CongA Tn A' B C' D' E P)) *) ex_and H3 P. (* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@InAngle Tn P D' E F') (@CongA Tn A' B C' D' E P)) *) exists P. (* Goal: and (@InAngle Tn P D' E F') (@CongA Tn A' B C' D' E P) *) split. (* Goal: @CongA Tn A' B C' D' E P *) (* Goal: @InAngle Tn P D' E F' *) apply (l11_25 P D E F D' F' P); try(apply l6_6); auto. (* Goal: @CongA Tn A' B C' D' E P *) (* Goal: @Out Tn E P P *) apply out_trivial. (* Goal: @CongA Tn A' B C' D' E P *) (* Goal: not (@eq (@Tpoint Tn) P E) *) unfold CongA in H4. (* Goal: @CongA Tn A' B C' D' E P *) (* Goal: not (@eq (@Tpoint Tn) P E) *) tauto. (* Goal: @CongA Tn A' B C' D' E P *) apply (out_conga A B C D E P); auto. (* Goal: @Out Tn E P P *) apply out_trivial. (* Goal: not (@eq (@Tpoint Tn) P E) *) unfold CongA in H4. (* Goal: not (@eq (@Tpoint Tn) P E) *) tauto. Qed. Lemma lta_out_lta : forall A B C D E F A' C' D' F', Out B A A' -> Out B C C' -> Out E D D' -> Out E F F' -> LtA A B C D E F -> LtA A' B C' D' E F'. Proof. (* Goal: forall (A B C D E F A' C' D' F' : @Tpoint Tn) (_ : @Out Tn B A A') (_ : @Out Tn B C C') (_ : @Out Tn E D D') (_ : @Out Tn E F F') (_ : @LtA Tn A B C D E F), @LtA Tn A' B C' D' E F' *) intros. (* Goal: @LtA Tn A' B C' D' E F' *) unfold LtA in *. (* Goal: and (@LeA Tn A' B C' D' E F') (not (@CongA Tn A' B C' D' E F')) *) spliter. (* Goal: and (@LeA Tn A' B C' D' E F') (not (@CongA Tn A' B C' D' E F')) *) split. (* Goal: not (@CongA Tn A' B C' D' E F') *) (* Goal: @LeA Tn A' B C' D' E F' *) apply(lea_out_lea A B C D E F A' C' D' F');auto. (* Goal: not (@CongA Tn A' B C' D' E F') *) intro. (* Goal: False *) apply H4. (* Goal: @CongA Tn A B C D E F *) apply (out_conga A' B C' D' E F'); try(apply l6_6); auto. Qed. Lemma pythagoras_obtuse : forall O E E' A B C AC BC AB AC2 BC2 AB2 S2, O<>E -> Obtuse A C B -> Length O E E' A B AB -> Length O E E' A C AC -> Length O E E' B C BC -> Prod O E E' AC AC AC2 -> Prod O E E' BC BC BC2 -> Prod O E E' AB AB AB2 -> Sum O E E' AC2 BC2 S2 -> LtP O E E' S2 AB2. Lemma pythagoras_obtuse_or_per : forall O E E' A B C AC BC AB AC2 BC2 AB2 S2, O<>E -> Obtuse A C B \/ Per A C B -> Length O E E' A B AB -> Length O E E' A C AC -> Length O E E' B C BC -> Prod O E E' AC AC AC2 -> Prod O E E' BC BC BC2 -> Prod O E E' AB AB AB2 -> Sum O E E' AC2 BC2 S2 -> LeP O E E' S2 AB2. Proof. (* Goal: forall (O E E' A B C AC BC AB AC2 BC2 AB2 S2 : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) O E)) (_ : or (@Obtuse Tn A C B) (@Per Tn A C B)) (_ : @Length Tn O E E' A B AB) (_ : @Length Tn O E E' A C AC) (_ : @Length Tn O E E' B C BC) (_ : @Prod Tn O E E' AC AC AC2) (_ : @Prod Tn O E E' BC BC BC2) (_ : @Prod Tn O E E' AB AB AB2) (_ : @Sum Tn O E E' AC2 BC2 S2), @LeP Tn O E E' S2 AB2 *) intros. (* Goal: @LeP Tn O E E' S2 AB2 *) induction H0. (* Goal: @LeP Tn O E E' S2 AB2 *) (* Goal: @LeP Tn O E E' S2 AB2 *) { (* Goal: @LeP Tn O E E' S2 AB2 *) apply ltp_to_lep. (* Goal: @LtP Tn O E E' S2 AB2 *) apply (pythagoras_obtuse O E E' A B C AC BC AB AC2 BC2 AB2 S2); auto. (* BG Goal: @LeP Tn O E E' S2 AB2 *) } (* Goal: @LeP Tn O E E' S2 AB2 *) { (* Goal: @LeP Tn O E E' S2 AB2 *) assert(HH:= pythagoras O E E' A B C AC BC AB AC2 BC2 AB2 H H0 H1 H2 H3 H4 H5 H6). (* Goal: @LeP Tn O E E' S2 AB2 *) assert(S2 = AB2). (* Goal: @LeP Tn O E E' S2 AB2 *) (* Goal: @eq (@Tpoint Tn) S2 AB2 *) { (* Goal: @eq (@Tpoint Tn) S2 AB2 *) apply (sum_uniqueness O E E' AC2 BC2); auto. (* BG Goal: @LeP Tn O E E' S2 AB2 *) } (* Goal: @LeP Tn O E E' S2 AB2 *) subst S2. (* Goal: @LeP Tn O E E' AB2 AB2 *) apply leP_refl. Qed. Lemma pythagoras_acute : forall O E E' A B C AC BC AB AC2 BC2 AB2 S2, O<>E -> Acute A C B -> Length O E E' A B AB -> Length O E E' A C AC -> Length O E E' B C BC -> Prod O E E' AC AC AC2 -> Prod O E E' BC BC BC2 -> Prod O E E' AB AB AB2 -> Sum O E E' AC2 BC2 S2 -> LtP O E E' AB2 S2. Lemma pyth_context : forall O E E' A B C : Tpoint, ~Col O E E' -> exists AB BC AC AB2 BC2 AC2 SS, Col O E AB /\ Col O E BC /\ Col O E AC /\ Col O E AB2 /\ Col O E BC2 /\ Col O E AC2 /\ Length O E E' A B AB /\ Length O E E' B C BC /\ Length O E E' A C AC /\ Prod O E E' AB AB AB2 /\ Prod O E E' BC BC BC2 /\ Prod O E E' AC AC AC2 /\ Sum O E E' AB2 BC2 SS . Proof. (* Goal: forall (O E E' A B C : @Tpoint Tn) (_ : not (@Col Tn O E E')), @ex (@Tpoint Tn) (fun AB : @Tpoint Tn => @ex (@Tpoint Tn) (fun BC : @Tpoint Tn => @ex (@Tpoint Tn) (fun AC : @Tpoint Tn => @ex (@Tpoint Tn) (fun AB2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun BC2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun AC2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun SS : @Tpoint Tn => and (@Col Tn O E AB) (and (@Col Tn O E BC) (and (@Col Tn O E AC) (and (@Col Tn O E AB2) (and (@Col Tn O E BC2) (and (@Col Tn O E AC2) (and (@Length Tn O E E' A B AB) (and (@Length Tn O E E' B C BC) (and (@Length Tn O E E' A C AC) (and (@Prod Tn O E E' AB AB AB2) (and (@Prod Tn O E E' BC BC BC2) (and (@Prod Tn O E E' AC AC AC2) (@Sum Tn O E E' AB2 BC2 SS))))))))))))))))))) *) intros. (* Goal: @ex (@Tpoint Tn) (fun AB : @Tpoint Tn => @ex (@Tpoint Tn) (fun BC : @Tpoint Tn => @ex (@Tpoint Tn) (fun AC : @Tpoint Tn => @ex (@Tpoint Tn) (fun AB2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun BC2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun AC2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun SS : @Tpoint Tn => and (@Col Tn O E AB) (and (@Col Tn O E BC) (and (@Col Tn O E AC) (and (@Col Tn O E AB2) (and (@Col Tn O E BC2) (and (@Col Tn O E AC2) (and (@Length Tn O E E' A B AB) (and (@Length Tn O E E' B C BC) (and (@Length Tn O E E' A C AC) (and (@Prod Tn O E E' AB AB AB2) (and (@Prod Tn O E E' BC BC BC2) (and (@Prod Tn O E E' AC AC AC2) (@Sum Tn O E E' AB2 BC2 SS))))))))))))))))))) *) assert(Lab:=length_existence O E E' A B H). (* Goal: @ex (@Tpoint Tn) (fun AB : @Tpoint Tn => @ex (@Tpoint Tn) (fun BC : @Tpoint Tn => @ex (@Tpoint Tn) (fun AC : @Tpoint Tn => @ex (@Tpoint Tn) (fun AB2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun BC2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun AC2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun SS : @Tpoint Tn => and (@Col Tn O E AB) (and (@Col Tn O E BC) (and (@Col Tn O E AC) (and (@Col Tn O E AB2) (and (@Col Tn O E BC2) (and (@Col Tn O E AC2) (and (@Length Tn O E E' A B AB) (and (@Length Tn O E E' B C BC) (and (@Length Tn O E E' A C AC) (and (@Prod Tn O E E' AB AB AB2) (and (@Prod Tn O E E' BC BC BC2) (and (@Prod Tn O E E' AC AC AC2) (@Sum Tn O E E' AB2 BC2 SS))))))))))))))))))) *) ex_and Lab AB. (* Goal: @ex (@Tpoint Tn) (fun AB : @Tpoint Tn => @ex (@Tpoint Tn) (fun BC : @Tpoint Tn => @ex (@Tpoint Tn) (fun AC : @Tpoint Tn => @ex (@Tpoint Tn) (fun AB2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun BC2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun AC2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun SS : @Tpoint Tn => and (@Col Tn O E AB) (and (@Col Tn O E BC) (and (@Col Tn O E AC) (and (@Col Tn O E AB2) (and (@Col Tn O E BC2) (and (@Col Tn O E AC2) (and (@Length Tn O E E' A B AB) (and (@Length Tn O E E' B C BC) (and (@Length Tn O E E' A C AC) (and (@Prod Tn O E E' AB AB AB2) (and (@Prod Tn O E E' BC BC BC2) (and (@Prod Tn O E E' AC AC AC2) (@Sum Tn O E E' AB2 BC2 SS))))))))))))))))))) *) assert(Lbc:=length_existence O E E' B C H). (* Goal: @ex (@Tpoint Tn) (fun AB : @Tpoint Tn => @ex (@Tpoint Tn) (fun BC : @Tpoint Tn => @ex (@Tpoint Tn) (fun AC : @Tpoint Tn => @ex (@Tpoint Tn) (fun AB2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun BC2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun AC2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun SS : @Tpoint Tn => and (@Col Tn O E AB) (and (@Col Tn O E BC) (and (@Col Tn O E AC) (and (@Col Tn O E AB2) (and (@Col Tn O E BC2) (and (@Col Tn O E AC2) (and (@Length Tn O E E' A B AB) (and (@Length Tn O E E' B C BC) (and (@Length Tn O E E' A C AC) (and (@Prod Tn O E E' AB AB AB2) (and (@Prod Tn O E E' BC BC BC2) (and (@Prod Tn O E E' AC AC AC2) (@Sum Tn O E E' AB2 BC2 SS))))))))))))))))))) *) ex_and Lbc BC. (* Goal: @ex (@Tpoint Tn) (fun AB : @Tpoint Tn => @ex (@Tpoint Tn) (fun BC : @Tpoint Tn => @ex (@Tpoint Tn) (fun AC : @Tpoint Tn => @ex (@Tpoint Tn) (fun AB2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun BC2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun AC2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun SS : @Tpoint Tn => and (@Col Tn O E AB) (and (@Col Tn O E BC) (and (@Col Tn O E AC) (and (@Col Tn O E AB2) (and (@Col Tn O E BC2) (and (@Col Tn O E AC2) (and (@Length Tn O E E' A B AB) (and (@Length Tn O E E' B C BC) (and (@Length Tn O E E' A C AC) (and (@Prod Tn O E E' AB AB AB2) (and (@Prod Tn O E E' BC BC BC2) (and (@Prod Tn O E E' AC AC AC2) (@Sum Tn O E E' AB2 BC2 SS))))))))))))))))))) *) assert(Lac:=length_existence O E E' A C H). (* Goal: @ex (@Tpoint Tn) (fun AB : @Tpoint Tn => @ex (@Tpoint Tn) (fun BC : @Tpoint Tn => @ex (@Tpoint Tn) (fun AC : @Tpoint Tn => @ex (@Tpoint Tn) (fun AB2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun BC2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun AC2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun SS : @Tpoint Tn => and (@Col Tn O E AB) (and (@Col Tn O E BC) (and (@Col Tn O E AC) (and (@Col Tn O E AB2) (and (@Col Tn O E BC2) (and (@Col Tn O E AC2) (and (@Length Tn O E E' A B AB) (and (@Length Tn O E E' B C BC) (and (@Length Tn O E E' A C AC) (and (@Prod Tn O E E' AB AB AB2) (and (@Prod Tn O E E' BC BC BC2) (and (@Prod Tn O E E' AC AC AC2) (@Sum Tn O E E' AB2 BC2 SS))))))))))))))))))) *) ex_and Lac AC. (* Goal: @ex (@Tpoint Tn) (fun AB : @Tpoint Tn => @ex (@Tpoint Tn) (fun BC : @Tpoint Tn => @ex (@Tpoint Tn) (fun AC : @Tpoint Tn => @ex (@Tpoint Tn) (fun AB2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun BC2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun AC2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun SS : @Tpoint Tn => and (@Col Tn O E AB) (and (@Col Tn O E BC) (and (@Col Tn O E AC) (and (@Col Tn O E AB2) (and (@Col Tn O E BC2) (and (@Col Tn O E AC2) (and (@Length Tn O E E' A B AB) (and (@Length Tn O E E' B C BC) (and (@Length Tn O E E' A C AC) (and (@Prod Tn O E E' AB AB AB2) (and (@Prod Tn O E E' BC BC BC2) (and (@Prod Tn O E E' AC AC AC2) (@Sum Tn O E E' AB2 BC2 SS))))))))))))))))))) *) assert(Col O E AB /\ Col O E BC /\ Col O E AC). (* Goal: @ex (@Tpoint Tn) (fun AB : @Tpoint Tn => @ex (@Tpoint Tn) (fun BC : @Tpoint Tn => @ex (@Tpoint Tn) (fun AC : @Tpoint Tn => @ex (@Tpoint Tn) (fun AB2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun BC2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun AC2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun SS : @Tpoint Tn => and (@Col Tn O E AB) (and (@Col Tn O E BC) (and (@Col Tn O E AC) (and (@Col Tn O E AB2) (and (@Col Tn O E BC2) (and (@Col Tn O E AC2) (and (@Length Tn O E E' A B AB) (and (@Length Tn O E E' B C BC) (and (@Length Tn O E E' A C AC) (and (@Prod Tn O E E' AB AB AB2) (and (@Prod Tn O E E' BC BC BC2) (and (@Prod Tn O E E' AC AC AC2) (@Sum Tn O E E' AB2 BC2 SS))))))))))))))))))) *) (* Goal: and (@Col Tn O E AB) (and (@Col Tn O E BC) (@Col Tn O E AC)) *) unfold Length in *; tauto. (* Goal: @ex (@Tpoint Tn) (fun AB : @Tpoint Tn => @ex (@Tpoint Tn) (fun BC : @Tpoint Tn => @ex (@Tpoint Tn) (fun AC : @Tpoint Tn => @ex (@Tpoint Tn) (fun AB2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun BC2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun AC2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun SS : @Tpoint Tn => and (@Col Tn O E AB) (and (@Col Tn O E BC) (and (@Col Tn O E AC) (and (@Col Tn O E AB2) (and (@Col Tn O E BC2) (and (@Col Tn O E AC2) (and (@Length Tn O E E' A B AB) (and (@Length Tn O E E' B C BC) (and (@Length Tn O E E' A C AC) (and (@Prod Tn O E E' AB AB AB2) (and (@Prod Tn O E E' BC BC BC2) (and (@Prod Tn O E E' AC AC AC2) (@Sum Tn O E E' AB2 BC2 SS))))))))))))))))))) *) spliter. (* Goal: @ex (@Tpoint Tn) (fun AB : @Tpoint Tn => @ex (@Tpoint Tn) (fun BC : @Tpoint Tn => @ex (@Tpoint Tn) (fun AC : @Tpoint Tn => @ex (@Tpoint Tn) (fun AB2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun BC2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun AC2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun SS : @Tpoint Tn => and (@Col Tn O E AB) (and (@Col Tn O E BC) (and (@Col Tn O E AC) (and (@Col Tn O E AB2) (and (@Col Tn O E BC2) (and (@Col Tn O E AC2) (and (@Length Tn O E E' A B AB) (and (@Length Tn O E E' B C BC) (and (@Length Tn O E E' A C AC) (and (@Prod Tn O E E' AB AB AB2) (and (@Prod Tn O E E' BC BC BC2) (and (@Prod Tn O E E' AC AC AC2) (@Sum Tn O E E' AB2 BC2 SS))))))))))))))))))) *) assert(Pab:= prod_exists O E E' H AB AB H3 H3). (* Goal: @ex (@Tpoint Tn) (fun AB : @Tpoint Tn => @ex (@Tpoint Tn) (fun BC : @Tpoint Tn => @ex (@Tpoint Tn) (fun AC : @Tpoint Tn => @ex (@Tpoint Tn) (fun AB2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun BC2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun AC2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun SS : @Tpoint Tn => and (@Col Tn O E AB) (and (@Col Tn O E BC) (and (@Col Tn O E AC) (and (@Col Tn O E AB2) (and (@Col Tn O E BC2) (and (@Col Tn O E AC2) (and (@Length Tn O E E' A B AB) (and (@Length Tn O E E' B C BC) (and (@Length Tn O E E' A C AC) (and (@Prod Tn O E E' AB AB AB2) (and (@Prod Tn O E E' BC BC BC2) (and (@Prod Tn O E E' AC AC AC2) (@Sum Tn O E E' AB2 BC2 SS))))))))))))))))))) *) ex_and Pab AB2. (* Goal: @ex (@Tpoint Tn) (fun AB : @Tpoint Tn => @ex (@Tpoint Tn) (fun BC : @Tpoint Tn => @ex (@Tpoint Tn) (fun AC : @Tpoint Tn => @ex (@Tpoint Tn) (fun AB2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun BC2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun AC2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun SS : @Tpoint Tn => and (@Col Tn O E AB) (and (@Col Tn O E BC) (and (@Col Tn O E AC) (and (@Col Tn O E AB2) (and (@Col Tn O E BC2) (and (@Col Tn O E AC2) (and (@Length Tn O E E' A B AB) (and (@Length Tn O E E' B C BC) (and (@Length Tn O E E' A C AC) (and (@Prod Tn O E E' AB AB AB2) (and (@Prod Tn O E E' BC BC BC2) (and (@Prod Tn O E E' AC AC AC2) (@Sum Tn O E E' AB2 BC2 SS))))))))))))))))))) *) assert(Pbc:= prod_exists O E E' H BC BC H4 H4). (* Goal: @ex (@Tpoint Tn) (fun AB : @Tpoint Tn => @ex (@Tpoint Tn) (fun BC : @Tpoint Tn => @ex (@Tpoint Tn) (fun AC : @Tpoint Tn => @ex (@Tpoint Tn) (fun AB2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun BC2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun AC2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun SS : @Tpoint Tn => and (@Col Tn O E AB) (and (@Col Tn O E BC) (and (@Col Tn O E AC) (and (@Col Tn O E AB2) (and (@Col Tn O E BC2) (and (@Col Tn O E AC2) (and (@Length Tn O E E' A B AB) (and (@Length Tn O E E' B C BC) (and (@Length Tn O E E' A C AC) (and (@Prod Tn O E E' AB AB AB2) (and (@Prod Tn O E E' BC BC BC2) (and (@Prod Tn O E E' AC AC AC2) (@Sum Tn O E E' AB2 BC2 SS))))))))))))))))))) *) ex_and Pbc BC2. (* Goal: @ex (@Tpoint Tn) (fun AB : @Tpoint Tn => @ex (@Tpoint Tn) (fun BC : @Tpoint Tn => @ex (@Tpoint Tn) (fun AC : @Tpoint Tn => @ex (@Tpoint Tn) (fun AB2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun BC2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun AC2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun SS : @Tpoint Tn => and (@Col Tn O E AB) (and (@Col Tn O E BC) (and (@Col Tn O E AC) (and (@Col Tn O E AB2) (and (@Col Tn O E BC2) (and (@Col Tn O E AC2) (and (@Length Tn O E E' A B AB) (and (@Length Tn O E E' B C BC) (and (@Length Tn O E E' A C AC) (and (@Prod Tn O E E' AB AB AB2) (and (@Prod Tn O E E' BC BC BC2) (and (@Prod Tn O E E' AC AC AC2) (@Sum Tn O E E' AB2 BC2 SS))))))))))))))))))) *) assert(Pac:= prod_exists O E E' H AC AC H5 H5). (* Goal: @ex (@Tpoint Tn) (fun AB : @Tpoint Tn => @ex (@Tpoint Tn) (fun BC : @Tpoint Tn => @ex (@Tpoint Tn) (fun AC : @Tpoint Tn => @ex (@Tpoint Tn) (fun AB2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun BC2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun AC2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun SS : @Tpoint Tn => and (@Col Tn O E AB) (and (@Col Tn O E BC) (and (@Col Tn O E AC) (and (@Col Tn O E AB2) (and (@Col Tn O E BC2) (and (@Col Tn O E AC2) (and (@Length Tn O E E' A B AB) (and (@Length Tn O E E' B C BC) (and (@Length Tn O E E' A C AC) (and (@Prod Tn O E E' AB AB AB2) (and (@Prod Tn O E E' BC BC BC2) (and (@Prod Tn O E E' AC AC AC2) (@Sum Tn O E E' AB2 BC2 SS))))))))))))))))))) *) ex_and Pac AC2. (* Goal: @ex (@Tpoint Tn) (fun AB : @Tpoint Tn => @ex (@Tpoint Tn) (fun BC : @Tpoint Tn => @ex (@Tpoint Tn) (fun AC : @Tpoint Tn => @ex (@Tpoint Tn) (fun AB2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun BC2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun AC2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun SS : @Tpoint Tn => and (@Col Tn O E AB) (and (@Col Tn O E BC) (and (@Col Tn O E AC) (and (@Col Tn O E AB2) (and (@Col Tn O E BC2) (and (@Col Tn O E AC2) (and (@Length Tn O E E' A B AB) (and (@Length Tn O E E' B C BC) (and (@Length Tn O E E' A C AC) (and (@Prod Tn O E E' AB AB AB2) (and (@Prod Tn O E E' BC BC BC2) (and (@Prod Tn O E E' AC AC AC2) (@Sum Tn O E E' AB2 BC2 SS))))))))))))))))))) *) assert(Col O E AB2 /\ Col O E BC2 /\ Col O E AC2). (* Goal: @ex (@Tpoint Tn) (fun AB : @Tpoint Tn => @ex (@Tpoint Tn) (fun BC : @Tpoint Tn => @ex (@Tpoint Tn) (fun AC : @Tpoint Tn => @ex (@Tpoint Tn) (fun AB2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun BC2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun AC2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun SS : @Tpoint Tn => and (@Col Tn O E AB) (and (@Col Tn O E BC) (and (@Col Tn O E AC) (and (@Col Tn O E AB2) (and (@Col Tn O E BC2) (and (@Col Tn O E AC2) (and (@Length Tn O E E' A B AB) (and (@Length Tn O E E' B C BC) (and (@Length Tn O E E' A C AC) (and (@Prod Tn O E E' AB AB AB2) (and (@Prod Tn O E E' BC BC BC2) (and (@Prod Tn O E E' AC AC AC2) (@Sum Tn O E E' AB2 BC2 SS))))))))))))))))))) *) (* Goal: and (@Col Tn O E AB2) (and (@Col Tn O E BC2) (@Col Tn O E AC2)) *) unfold Prod in *. (* Goal: @ex (@Tpoint Tn) (fun AB : @Tpoint Tn => @ex (@Tpoint Tn) (fun BC : @Tpoint Tn => @ex (@Tpoint Tn) (fun AC : @Tpoint Tn => @ex (@Tpoint Tn) (fun AB2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun BC2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun AC2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun SS : @Tpoint Tn => and (@Col Tn O E AB) (and (@Col Tn O E BC) (and (@Col Tn O E AC) (and (@Col Tn O E AB2) (and (@Col Tn O E BC2) (and (@Col Tn O E AC2) (and (@Length Tn O E E' A B AB) (and (@Length Tn O E E' B C BC) (and (@Length Tn O E E' A C AC) (and (@Prod Tn O E E' AB AB AB2) (and (@Prod Tn O E E' BC BC BC2) (and (@Prod Tn O E E' AC AC AC2) (@Sum Tn O E E' AB2 BC2 SS))))))))))))))))))) *) (* Goal: and (@Col Tn O E AB2) (and (@Col Tn O E BC2) (@Col Tn O E AC2)) *) unfold Ar2 in *. (* Goal: @ex (@Tpoint Tn) (fun AB : @Tpoint Tn => @ex (@Tpoint Tn) (fun BC : @Tpoint Tn => @ex (@Tpoint Tn) (fun AC : @Tpoint Tn => @ex (@Tpoint Tn) (fun AB2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun BC2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun AC2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun SS : @Tpoint Tn => and (@Col Tn O E AB) (and (@Col Tn O E BC) (and (@Col Tn O E AC) (and (@Col Tn O E AB2) (and (@Col Tn O E BC2) (and (@Col Tn O E AC2) (and (@Length Tn O E E' A B AB) (and (@Length Tn O E E' B C BC) (and (@Length Tn O E E' A C AC) (and (@Prod Tn O E E' AB AB AB2) (and (@Prod Tn O E E' BC BC BC2) (and (@Prod Tn O E E' AC AC AC2) (@Sum Tn O E E' AB2 BC2 SS))))))))))))))))))) *) (* Goal: and (@Col Tn O E AB2) (and (@Col Tn O E BC2) (@Col Tn O E AC2)) *) tauto. (* Goal: @ex (@Tpoint Tn) (fun AB : @Tpoint Tn => @ex (@Tpoint Tn) (fun BC : @Tpoint Tn => @ex (@Tpoint Tn) (fun AC : @Tpoint Tn => @ex (@Tpoint Tn) (fun AB2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun BC2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun AC2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun SS : @Tpoint Tn => and (@Col Tn O E AB) (and (@Col Tn O E BC) (and (@Col Tn O E AC) (and (@Col Tn O E AB2) (and (@Col Tn O E BC2) (and (@Col Tn O E AC2) (and (@Length Tn O E E' A B AB) (and (@Length Tn O E E' B C BC) (and (@Length Tn O E E' A C AC) (and (@Prod Tn O E E' AB AB AB2) (and (@Prod Tn O E E' BC BC BC2) (and (@Prod Tn O E E' AC AC AC2) (@Sum Tn O E E' AB2 BC2 SS))))))))))))))))))) *) spliter. (* Goal: @ex (@Tpoint Tn) (fun AB : @Tpoint Tn => @ex (@Tpoint Tn) (fun BC : @Tpoint Tn => @ex (@Tpoint Tn) (fun AC : @Tpoint Tn => @ex (@Tpoint Tn) (fun AB2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun BC2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun AC2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun SS : @Tpoint Tn => and (@Col Tn O E AB) (and (@Col Tn O E BC) (and (@Col Tn O E AC) (and (@Col Tn O E AB2) (and (@Col Tn O E BC2) (and (@Col Tn O E AC2) (and (@Length Tn O E E' A B AB) (and (@Length Tn O E E' B C BC) (and (@Length Tn O E E' A C AC) (and (@Prod Tn O E E' AB AB AB2) (and (@Prod Tn O E E' BC BC BC2) (and (@Prod Tn O E E' AC AC AC2) (@Sum Tn O E E' AB2 BC2 SS))))))))))))))))))) *) assert(HS:= sum_exists O E E' H AB2 BC2 H9 H10). (* Goal: @ex (@Tpoint Tn) (fun AB : @Tpoint Tn => @ex (@Tpoint Tn) (fun BC : @Tpoint Tn => @ex (@Tpoint Tn) (fun AC : @Tpoint Tn => @ex (@Tpoint Tn) (fun AB2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun BC2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun AC2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun SS : @Tpoint Tn => and (@Col Tn O E AB) (and (@Col Tn O E BC) (and (@Col Tn O E AC) (and (@Col Tn O E AB2) (and (@Col Tn O E BC2) (and (@Col Tn O E AC2) (and (@Length Tn O E E' A B AB) (and (@Length Tn O E E' B C BC) (and (@Length Tn O E E' A C AC) (and (@Prod Tn O E E' AB AB AB2) (and (@Prod Tn O E E' BC BC BC2) (and (@Prod Tn O E E' AC AC AC2) (@Sum Tn O E E' AB2 BC2 SS))))))))))))))))))) *) ex_and HS SS. (* Goal: @ex (@Tpoint Tn) (fun AB : @Tpoint Tn => @ex (@Tpoint Tn) (fun BC : @Tpoint Tn => @ex (@Tpoint Tn) (fun AC : @Tpoint Tn => @ex (@Tpoint Tn) (fun AB2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun BC2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun AC2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun SS : @Tpoint Tn => and (@Col Tn O E AB) (and (@Col Tn O E BC) (and (@Col Tn O E AC) (and (@Col Tn O E AB2) (and (@Col Tn O E BC2) (and (@Col Tn O E AC2) (and (@Length Tn O E E' A B AB) (and (@Length Tn O E E' B C BC) (and (@Length Tn O E E' A C AC) (and (@Prod Tn O E E' AB AB AB2) (and (@Prod Tn O E E' BC BC BC2) (and (@Prod Tn O E E' AC AC AC2) (@Sum Tn O E E' AB2 BC2 SS))))))))))))))))))) *) exists AB. (* Goal: @ex (@Tpoint Tn) (fun BC : @Tpoint Tn => @ex (@Tpoint Tn) (fun AC : @Tpoint Tn => @ex (@Tpoint Tn) (fun AB2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun BC2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun AC2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun SS : @Tpoint Tn => and (@Col Tn O E AB) (and (@Col Tn O E BC) (and (@Col Tn O E AC) (and (@Col Tn O E AB2) (and (@Col Tn O E BC2) (and (@Col Tn O E AC2) (and (@Length Tn O E E' A B AB) (and (@Length Tn O E E' B C BC) (and (@Length Tn O E E' A C AC) (and (@Prod Tn O E E' AB AB AB2) (and (@Prod Tn O E E' BC BC BC2) (and (@Prod Tn O E E' AC AC AC2) (@Sum Tn O E E' AB2 BC2 SS)))))))))))))))))) *) exists BC. (* Goal: @ex (@Tpoint Tn) (fun AC : @Tpoint Tn => @ex (@Tpoint Tn) (fun AB2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun BC2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun AC2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun SS : @Tpoint Tn => and (@Col Tn O E AB) (and (@Col Tn O E BC) (and (@Col Tn O E AC) (and (@Col Tn O E AB2) (and (@Col Tn O E BC2) (and (@Col Tn O E AC2) (and (@Length Tn O E E' A B AB) (and (@Length Tn O E E' B C BC) (and (@Length Tn O E E' A C AC) (and (@Prod Tn O E E' AB AB AB2) (and (@Prod Tn O E E' BC BC BC2) (and (@Prod Tn O E E' AC AC AC2) (@Sum Tn O E E' AB2 BC2 SS))))))))))))))))) *) exists AC. (* Goal: @ex (@Tpoint Tn) (fun AB2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun BC2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun AC2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun SS : @Tpoint Tn => and (@Col Tn O E AB) (and (@Col Tn O E BC) (and (@Col Tn O E AC) (and (@Col Tn O E AB2) (and (@Col Tn O E BC2) (and (@Col Tn O E AC2) (and (@Length Tn O E E' A B AB) (and (@Length Tn O E E' B C BC) (and (@Length Tn O E E' A C AC) (and (@Prod Tn O E E' AB AB AB2) (and (@Prod Tn O E E' BC BC BC2) (and (@Prod Tn O E E' AC AC AC2) (@Sum Tn O E E' AB2 BC2 SS)))))))))))))))) *) exists AB2. (* Goal: @ex (@Tpoint Tn) (fun BC2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun AC2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun SS : @Tpoint Tn => and (@Col Tn O E AB) (and (@Col Tn O E BC) (and (@Col Tn O E AC) (and (@Col Tn O E AB2) (and (@Col Tn O E BC2) (and (@Col Tn O E AC2) (and (@Length Tn O E E' A B AB) (and (@Length Tn O E E' B C BC) (and (@Length Tn O E E' A C AC) (and (@Prod Tn O E E' AB AB AB2) (and (@Prod Tn O E E' BC BC BC2) (and (@Prod Tn O E E' AC AC AC2) (@Sum Tn O E E' AB2 BC2 SS))))))))))))))) *) exists BC2. (* Goal: @ex (@Tpoint Tn) (fun AC2 : @Tpoint Tn => @ex (@Tpoint Tn) (fun SS : @Tpoint Tn => and (@Col Tn O E AB) (and (@Col Tn O E BC) (and (@Col Tn O E AC) (and (@Col Tn O E AB2) (and (@Col Tn O E BC2) (and (@Col Tn O E AC2) (and (@Length Tn O E E' A B AB) (and (@Length Tn O E E' B C BC) (and (@Length Tn O E E' A C AC) (and (@Prod Tn O E E' AB AB AB2) (and (@Prod Tn O E E' BC BC BC2) (and (@Prod Tn O E E' AC AC AC2) (@Sum Tn O E E' AB2 BC2 SS)))))))))))))) *) exists AC2. (* Goal: @ex (@Tpoint Tn) (fun SS : @Tpoint Tn => and (@Col Tn O E AB) (and (@Col Tn O E BC) (and (@Col Tn O E AC) (and (@Col Tn O E AB2) (and (@Col Tn O E BC2) (and (@Col Tn O E AC2) (and (@Length Tn O E E' A B AB) (and (@Length Tn O E E' B C BC) (and (@Length Tn O E E' A C AC) (and (@Prod Tn O E E' AB AB AB2) (and (@Prod Tn O E E' BC BC BC2) (and (@Prod Tn O E E' AC AC AC2) (@Sum Tn O E E' AB2 BC2 SS))))))))))))) *) exists SS. (* Goal: and (@Col Tn O E AB) (and (@Col Tn O E BC) (and (@Col Tn O E AC) (and (@Col Tn O E AB2) (and (@Col Tn O E BC2) (and (@Col Tn O E AC2) (and (@Length Tn O E E' A B AB) (and (@Length Tn O E E' B C BC) (and (@Length Tn O E E' A C AC) (and (@Prod Tn O E E' AB AB AB2) (and (@Prod Tn O E E' BC BC BC2) (and (@Prod Tn O E E' AC AC AC2) (@Sum Tn O E E' AB2 BC2 SS)))))))))))) *) tauto. Qed. Lemma length_pos_or_null : forall O E E' A B AB, Length O E E' A B AB -> Ps O E AB \/ A = B. Lemma not_neg_pos : forall O E A, E <> O -> Col O E A -> ~Ng O E A -> Ps O E A \/ A = O. Proof. (* Goal: forall (O E A : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) E O)) (_ : @Col Tn O E A) (_ : not (@Ng Tn O E A)), or (@Ps Tn O E A) (@eq (@Tpoint Tn) A O) *) intros. (* Goal: or (@Ps Tn O E A) (@eq (@Tpoint Tn) A O) *) induction(eq_dec_points A O). (* Goal: or (@Ps Tn O E A) (@eq (@Tpoint Tn) A O) *) (* Goal: or (@Ps Tn O E A) (@eq (@Tpoint Tn) A O) *) { (* Goal: or (@Ps Tn O E A) (@eq (@Tpoint Tn) A O) *) right; auto. (* BG Goal: or (@Ps Tn O E A) (@eq (@Tpoint Tn) A O) *) } (* Goal: or (@Ps Tn O E A) (@eq (@Tpoint Tn) A O) *) { (* Goal: or (@Ps Tn O E A) (@eq (@Tpoint Tn) A O) *) left. (* Goal: @Ps Tn O E A *) unfold Out. (* Goal: @Ps Tn O E A *) apply l6_4_2. (* Goal: and (@Col Tn A O E) (not (@Bet Tn A O E)) *) split; Col. (* Goal: not (@Bet Tn A O E) *) intro. (* Goal: False *) apply H1. (* Goal: @Ng Tn O E A *) unfold Ng. (* Goal: and (not (@eq (@Tpoint Tn) A O)) (and (not (@eq (@Tpoint Tn) E O)) (@Bet Tn A O E)) *) repeat split; auto. Qed. Lemma sum_pos_null : forall O E E' A B, ~Ng O E A -> ~Ng O E B -> Sum O E E' A B O -> A = O /\ B = O. Lemma length_not_neg : forall O E E' A B AB, Length O E E' A B AB -> ~Ng O E AB. Proof. (* Goal: forall (O E E' A B AB : @Tpoint Tn) (_ : @Length Tn O E E' A B AB), not (@Ng Tn O E AB) *) intros. (* Goal: not (@Ng Tn O E AB) *) intro. (* Goal: False *) assert(HH:= length_cong O E E' A B AB H). (* Goal: False *) apply length_pos_or_null in H. (* Goal: False *) induction H. (* Goal: False *) (* Goal: False *) { (* Goal: False *) apply pos_not_neg in H. (* Goal: False *) contradiction. (* BG Goal: False *) } (* Goal: False *) { (* Goal: False *) unfold Ng in H0. (* Goal: False *) spliter. (* Goal: False *) subst B. (* Goal: False *) treat_equalities. (* Goal: False *) tauto. Qed. Lemma signEq_refl : forall O E A, O <> E -> Col O E A -> A = O \/ SignEq O E A A. Proof. (* Goal: forall (O E A : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) O E)) (_ : @Col Tn O E A), or (@eq (@Tpoint Tn) A O) (@SignEq Tn O E A A) *) intros. (* Goal: or (@eq (@Tpoint Tn) A O) (@SignEq Tn O E A A) *) assert(HH:= sign_dec O E A H0 H). (* Goal: or (@eq (@Tpoint Tn) A O) (@SignEq Tn O E A A) *) unfold SignEq. (* Goal: or (@eq (@Tpoint Tn) A O) (or (and (@Ps Tn O E A) (@Ps Tn O E A)) (and (@Ng Tn O E A) (@Ng Tn O E A))) *) induction HH. (* Goal: or (@eq (@Tpoint Tn) A O) (or (and (@Ps Tn O E A) (@Ps Tn O E A)) (and (@Ng Tn O E A) (@Ng Tn O E A))) *) (* Goal: or (@eq (@Tpoint Tn) A O) (or (and (@Ps Tn O E A) (@Ps Tn O E A)) (and (@Ng Tn O E A) (@Ng Tn O E A))) *) { (* Goal: or (@eq (@Tpoint Tn) A O) (or (and (@Ps Tn O E A) (@Ps Tn O E A)) (and (@Ng Tn O E A) (@Ng Tn O E A))) *) left; auto. (* BG Goal: or (@eq (@Tpoint Tn) A O) (or (and (@Ps Tn O E A) (@Ps Tn O E A)) (and (@Ng Tn O E A) (@Ng Tn O E A))) *) } (* Goal: or (@eq (@Tpoint Tn) A O) (or (and (@Ps Tn O E A) (@Ps Tn O E A)) (and (@Ng Tn O E A) (@Ng Tn O E A))) *) { (* Goal: or (@eq (@Tpoint Tn) A O) (or (and (@Ps Tn O E A) (@Ps Tn O E A)) (and (@Ng Tn O E A) (@Ng Tn O E A))) *) induction H1. (* Goal: or (@eq (@Tpoint Tn) A O) (or (and (@Ps Tn O E A) (@Ps Tn O E A)) (and (@Ng Tn O E A) (@Ng Tn O E A))) *) (* Goal: or (@eq (@Tpoint Tn) A O) (or (and (@Ps Tn O E A) (@Ps Tn O E A)) (and (@Ng Tn O E A) (@Ng Tn O E A))) *) { (* Goal: or (@eq (@Tpoint Tn) A O) (or (and (@Ps Tn O E A) (@Ps Tn O E A)) (and (@Ng Tn O E A) (@Ng Tn O E A))) *) right; left; auto. (* BG Goal: or (@eq (@Tpoint Tn) A O) (or (and (@Ps Tn O E A) (@Ps Tn O E A)) (and (@Ng Tn O E A) (@Ng Tn O E A))) *) } (* Goal: or (@eq (@Tpoint Tn) A O) (or (and (@Ps Tn O E A) (@Ps Tn O E A)) (and (@Ng Tn O E A) (@Ng Tn O E A))) *) { (* Goal: or (@eq (@Tpoint Tn) A O) (or (and (@Ps Tn O E A) (@Ps Tn O E A)) (and (@Ng Tn O E A) (@Ng Tn O E A))) *) right; right; auto. Qed. Lemma square_not_neg : forall O E E' A A2, Prod O E E' A A A2 -> ~Ng O E A2. Proof. (* Goal: forall (O E E' A A2 : @Tpoint Tn) (_ : @Prod Tn O E E' A A A2), not (@Ng Tn O E A2) *) intros. (* Goal: not (@Ng Tn O E A2) *) intro. (* Goal: False *) assert(O <> E /\ Col O E A). (* Goal: False *) (* Goal: and (not (@eq (@Tpoint Tn) O E)) (@Col Tn O E A) *) { (* Goal: and (not (@eq (@Tpoint Tn) O E)) (@Col Tn O E A) *) unfold Prod in H. (* Goal: and (not (@eq (@Tpoint Tn) O E)) (@Col Tn O E A) *) unfold Ar2 in H. (* Goal: and (not (@eq (@Tpoint Tn) O E)) (@Col Tn O E A) *) spliter. (* Goal: and (not (@eq (@Tpoint Tn) O E)) (@Col Tn O E A) *) split; Col. (* Goal: not (@eq (@Tpoint Tn) O E) *) intro; subst E; Col. (* BG Goal: False *) } (* Goal: False *) spliter. (* Goal: False *) assert(HP:=signEq_refl O E A H1 H2). (* Goal: False *) spliter. (* Goal: False *) induction HP. (* Goal: False *) (* Goal: False *) { (* Goal: False *) subst A. (* Goal: False *) assert(HH:=prod_O_l_eq O E E' O A2 H). (* Goal: False *) unfold Ng in H0. (* Goal: False *) spliter. (* Goal: False *) contradiction. (* BG Goal: False *) } (* Goal: False *) { (* Goal: False *) assert(HH:= signeq__prod_pos O E E' A A A2 H3 H). (* Goal: False *) apply pos_not_neg in HH. (* Goal: False *) contradiction. Qed. Lemma root_uniqueness : forall O E E' A B C, ~Ng O E A -> ~Ng O E B -> Prod O E E' A A C -> Prod O E E' B B C -> A = B. Proof. (* Goal: forall (O E E' A B C : @Tpoint Tn) (_ : not (@Ng Tn O E A)) (_ : not (@Ng Tn O E B)) (_ : @Prod Tn O E E' A A C) (_ : @Prod Tn O E E' B B C), @eq (@Tpoint Tn) A B *) intros O E E' A B C PA PB. (* Goal: forall (_ : @Prod Tn O E E' A A C) (_ : @Prod Tn O E E' B B C), @eq (@Tpoint Tn) A B *) intros. (* Goal: @eq (@Tpoint Tn) A B *) assert(~ Col O E E' /\ Col O E A /\ Col O E B /\ Col O E C). (* Goal: @eq (@Tpoint Tn) A B *) (* Goal: and (not (@Col Tn O E E')) (and (@Col Tn O E A) (and (@Col Tn O E B) (@Col Tn O E C))) *) { (* Goal: and (not (@Col Tn O E E')) (and (@Col Tn O E A) (and (@Col Tn O E B) (@Col Tn O E C))) *) unfold Prod in *. (* Goal: and (not (@Col Tn O E E')) (and (@Col Tn O E A) (and (@Col Tn O E B) (@Col Tn O E C))) *) unfold Ar2 in *. (* Goal: and (not (@Col Tn O E E')) (and (@Col Tn O E A) (and (@Col Tn O E B) (@Col Tn O E C))) *) tauto. (* BG Goal: @eq (@Tpoint Tn) A B *) } (* Goal: @eq (@Tpoint Tn) A B *) spliter. (* Goal: @eq (@Tpoint Tn) A B *) assert(HS:= sum_exists O E E' H1 A B H2 H3). (* Goal: @eq (@Tpoint Tn) A B *) ex_and HS ApB. (* Goal: @eq (@Tpoint Tn) A B *) assert(HD:= diff_exists O E E' A B H1 H2 H3). (* Goal: @eq (@Tpoint Tn) A B *) ex_and HD AmB. (* Goal: @eq (@Tpoint Tn) A B *) assert(Col O E ApB /\ Col O E AmB). (* Goal: @eq (@Tpoint Tn) A B *) (* Goal: and (@Col Tn O E ApB) (@Col Tn O E AmB) *) { (* Goal: and (@Col Tn O E ApB) (@Col Tn O E AmB) *) unfold Sum in H5. (* Goal: and (@Col Tn O E ApB) (@Col Tn O E AmB) *) unfold Diff in H6. (* Goal: and (@Col Tn O E ApB) (@Col Tn O E AmB) *) ex_and H6 X. (* Goal: and (@Col Tn O E ApB) (@Col Tn O E AmB) *) unfold Sum in H7. (* Goal: and (@Col Tn O E ApB) (@Col Tn O E AmB) *) unfold Ar2 in *. (* Goal: and (@Col Tn O E ApB) (@Col Tn O E AmB) *) tauto. (* BG Goal: @eq (@Tpoint Tn) A B *) } (* Goal: @eq (@Tpoint Tn) A B *) spliter. (* Goal: @eq (@Tpoint Tn) A B *) assert(HP:= prod_exists O E E' H1 ApB AmB H7 H8). (* Goal: @eq (@Tpoint Tn) A B *) ex_and HP PP. (* Goal: @eq (@Tpoint Tn) A B *) assert(Diff O E E' C C O). (* Goal: @eq (@Tpoint Tn) A B *) (* Goal: @Diff Tn O E E' C C O *) { (* Goal: @Diff Tn O E E' C C O *) apply diff_null; auto. (* BG Goal: @eq (@Tpoint Tn) A B *) } (* Goal: @eq (@Tpoint Tn) A B *) assert(HH:= diff_of_squares O E E' A B C C O ApB AmB PP H H0 H10 H5 H6 H9). (* Goal: @eq (@Tpoint Tn) A B *) treat_equalities. (* Goal: @eq (@Tpoint Tn) A B *) assert(HH:= prod_null O E E' ApB AmB H9). (* Goal: @eq (@Tpoint Tn) A B *) induction (eq_dec_points A O). (* Goal: @eq (@Tpoint Tn) A B *) (* Goal: @eq (@Tpoint Tn) A B *) { (* Goal: @eq (@Tpoint Tn) A B *) subst A. (* Goal: @eq (@Tpoint Tn) O B *) apply prod_O_l_eq in H. (* Goal: @eq (@Tpoint Tn) O B *) subst C. (* Goal: @eq (@Tpoint Tn) O B *) apply prod_null in H0. (* Goal: @eq (@Tpoint Tn) O B *) induction H0; subst B; auto. (* BG Goal: @eq (@Tpoint Tn) A B *) } (* Goal: @eq (@Tpoint Tn) A B *) { (* Goal: @eq (@Tpoint Tn) A B *) assert(E <> O). (* Goal: @eq (@Tpoint Tn) A B *) (* Goal: not (@eq (@Tpoint Tn) E O) *) { (* Goal: not (@eq (@Tpoint Tn) E O) *) intro. (* Goal: False *) subst E; Col. (* BG Goal: @eq (@Tpoint Tn) A B *) } (* Goal: @eq (@Tpoint Tn) A B *) induction (eq_dec_points B O). (* Goal: @eq (@Tpoint Tn) A B *) (* Goal: @eq (@Tpoint Tn) A B *) { (* Goal: @eq (@Tpoint Tn) A B *) subst B. (* Goal: @eq (@Tpoint Tn) A O *) apply prod_O_l_eq in H0. (* Goal: @eq (@Tpoint Tn) A O *) subst C. (* Goal: @eq (@Tpoint Tn) A O *) apply prod_null in H. (* Goal: @eq (@Tpoint Tn) A O *) induction H; subst A; auto. (* BG Goal: @eq (@Tpoint Tn) A B *) } (* Goal: @eq (@Tpoint Tn) A B *) { (* Goal: @eq (@Tpoint Tn) A B *) induction HH. (* Goal: @eq (@Tpoint Tn) A B *) (* Goal: @eq (@Tpoint Tn) A B *) { (* Goal: @eq (@Tpoint Tn) A B *) assert(Ps O E A \/ A = O). (* Goal: @eq (@Tpoint Tn) A B *) (* Goal: or (@Ps Tn O E A) (@eq (@Tpoint Tn) A O) *) { (* Goal: or (@Ps Tn O E A) (@eq (@Tpoint Tn) A O) *) apply(not_neg_pos O E A); auto. (* BG Goal: @eq (@Tpoint Tn) A B *) (* BG Goal: @eq (@Tpoint Tn) A B *) } (* Goal: @eq (@Tpoint Tn) A B *) assert(Ps O E B \/ B = O). (* Goal: @eq (@Tpoint Tn) A B *) (* Goal: or (@Ps Tn O E B) (@eq (@Tpoint Tn) B O) *) { (* Goal: or (@Ps Tn O E B) (@eq (@Tpoint Tn) B O) *) apply(not_neg_pos O E B); auto. (* BG Goal: @eq (@Tpoint Tn) A B *) (* BG Goal: @eq (@Tpoint Tn) A B *) } (* Goal: @eq (@Tpoint Tn) A B *) induction H15; induction H16; try(contradiction). (* Goal: @eq (@Tpoint Tn) A B *) { (* Goal: @eq (@Tpoint Tn) A B *) assert(HP:=sum_pos_pos O E E' A B ApB H15 H16 H5). (* Goal: @eq (@Tpoint Tn) A B *) unfold Ps in HP. (* Goal: @eq (@Tpoint Tn) A B *) unfold Out in HP. (* Goal: @eq (@Tpoint Tn) A B *) subst ApB. (* Goal: @eq (@Tpoint Tn) A B *) tauto. (* BG Goal: @eq (@Tpoint Tn) A B *) } (* BG Goal: @eq (@Tpoint Tn) A B *) } (* Goal: @eq (@Tpoint Tn) A B *) { (* Goal: @eq (@Tpoint Tn) A B *) subst AmB. (* Goal: @eq (@Tpoint Tn) A B *) apply diff_null_eq in H6. (* Goal: @eq (@Tpoint Tn) A B *) auto. Qed. Lemma inter_tangent_circle : forall P Q O M, P <> Q -> Cong P O Q O -> Col P O Q -> Le P M P O -> Le Q M Q O -> M = O. Proof. (* Goal: forall (P Q O M : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) P Q)) (_ : @Cong Tn P O Q O) (_ : @Col Tn P O Q) (_ : @Le Tn P M P O) (_ : @Le Tn Q M Q O), @eq (@Tpoint Tn) M O *) intros. (* Goal: @eq (@Tpoint Tn) M O *) assert(P = Q \/ Midpoint O P Q). (* Goal: @eq (@Tpoint Tn) M O *) (* Goal: or (@eq (@Tpoint Tn) P Q) (@Midpoint Tn O P Q) *) apply(l7_20 O P Q H1);Cong. (* Goal: @eq (@Tpoint Tn) M O *) induction H4. (* Goal: @eq (@Tpoint Tn) M O *) (* Goal: @eq (@Tpoint Tn) M O *) contradiction. (* Goal: @eq (@Tpoint Tn) M O *) unfold Midpoint in *. (* Goal: @eq (@Tpoint Tn) M O *) spliter. (* Goal: @eq (@Tpoint Tn) M O *) assert(Le Q M P O). (* Goal: @eq (@Tpoint Tn) M O *) (* Goal: @Le Tn Q M P O *) { (* Goal: @Le Tn Q M P O *) apply (l5_6 Q M Q O Q M P O H3); Cong. (* BG Goal: @eq (@Tpoint Tn) M O *) } (* Goal: @eq (@Tpoint Tn) M O *) assert(Le P M O P). (* Goal: @eq (@Tpoint Tn) M O *) (* Goal: @Le Tn P M O P *) { (* Goal: @Le Tn P M O P *) apply(l5_6 P M P O P M O P); Cong. (* BG Goal: @eq (@Tpoint Tn) M O *) } (* Goal: @eq (@Tpoint Tn) M O *) assert(Le Q M O Q). (* Goal: @eq (@Tpoint Tn) M O *) (* Goal: @Le Tn Q M O Q *) { (* Goal: @Le Tn Q M O Q *) apply(l5_6 Q M Q O Q M O Q); Cong. (* BG Goal: @eq (@Tpoint Tn) M O *) } (* Goal: @eq (@Tpoint Tn) M O *) unfold Le in H7. (* Goal: @eq (@Tpoint Tn) M O *) unfold Le in H8. (* Goal: @eq (@Tpoint Tn) M O *) ex_and H7 A. (* Goal: @eq (@Tpoint Tn) M O *) ex_and H8 B. (* Goal: @eq (@Tpoint Tn) M O *) assert(Bet A O B); eBetween. (* Goal: @eq (@Tpoint Tn) M O *) assert(Le P Q A B). (* Goal: @eq (@Tpoint Tn) M O *) (* Goal: @Le Tn P Q A B *) { (* Goal: @Le Tn P Q A B *) apply(triangle_inequality_2 P M Q A O B); Cong. (* BG Goal: @eq (@Tpoint Tn) M O *) } (* Goal: @eq (@Tpoint Tn) M O *) assert(Le A B P Q). (* Goal: @eq (@Tpoint Tn) M O *) (* Goal: @Le Tn A B P Q *) { (* Goal: @Le Tn A B P Q *) apply(bet2_le2__le O O P Q A B); Between. (* Goal: @Le Tn O B O Q *) (* Goal: @Le Tn O A O P *) unfold Le. (* Goal: @Le Tn O B O Q *) (* Goal: @ex (@Tpoint Tn) (fun E : @Tpoint Tn => and (@Bet Tn O E P) (@Cong Tn O A O E)) *) exists A; Cong. (* Goal: @Le Tn O B O Q *) exists B; Cong. (* BG Goal: @eq (@Tpoint Tn) M O *) } (* Goal: @eq (@Tpoint Tn) M O *) assert(Cong A B P Q). (* Goal: @eq (@Tpoint Tn) M O *) (* Goal: @Cong Tn A B P Q *) { (* Goal: @Cong Tn A B P Q *) apply le_anti_symmetry; auto. (* BG Goal: @eq (@Tpoint Tn) M O *) } (* Goal: @eq (@Tpoint Tn) M O *) assert(B = Q /\ P = A). (* Goal: @eq (@Tpoint Tn) M O *) (* Goal: and (@eq (@Tpoint Tn) B Q) (@eq (@Tpoint Tn) P A) *) apply(bet_cong_eq P A B Q);eBetween. (* Goal: @eq (@Tpoint Tn) M O *) spliter. (* Goal: @eq (@Tpoint Tn) M O *) subst A. (* Goal: @eq (@Tpoint Tn) M O *) subst B. (* Goal: @eq (@Tpoint Tn) M O *) clean_trivial_hyps. (* Goal: @eq (@Tpoint Tn) M O *) assert(Cong Q M O P); eCong. (* Goal: @eq (@Tpoint Tn) M O *) assert(Cong Q M P M); eCong. (* Goal: @eq (@Tpoint Tn) M O *) assert(O = M). (* Goal: @eq (@Tpoint Tn) M O *) (* Goal: @eq (@Tpoint Tn) O M *) { (* Goal: @eq (@Tpoint Tn) O M *) apply(l4_18 P Q O M); Col; induction(eq_dec_points M O); Cong. (* BG Goal: @eq (@Tpoint Tn) M O *) } (* Goal: @eq (@Tpoint Tn) M O *) auto. Qed. Lemma inter_circle_per : forall P Q A T M, Cong P A Q A -> Le P M P A -> Le Q M Q A -> Projp A T P Q -> Per P T M -> Le T M T A. Lemma inter_circle_obtuse : forall P Q A T M, Cong P A Q A -> Le P M P A -> Le Q M Q A -> Projp A T P Q -> Obtuse P T M \/ Per P T M -> Le T M T A. Lemma circle_projp_between : forall P Q A T, Cong P A Q A -> Projp A T P Q -> Bet P T Q. Proof. (* Goal: forall (P Q A T : @Tpoint Tn) (_ : @Cong Tn P A Q A) (_ : @Projp Tn A T P Q), @Bet Tn P T Q *) intros. (* Goal: @Bet Tn P T Q *) induction(eq_dec_points P T). (* Goal: @Bet Tn P T Q *) (* Goal: @Bet Tn P T Q *) { (* Goal: @Bet Tn P T Q *) subst T; Between. (* BG Goal: @Bet Tn P T Q *) } (* Goal: @Bet Tn P T Q *) { (* Goal: @Bet Tn P T Q *) unfold Projp in H0. (* Goal: @Bet Tn P T Q *) spliter. (* Goal: @Bet Tn P T Q *) induction H2. (* Goal: @Bet Tn P T Q *) (* Goal: @Bet Tn P T Q *) { (* Goal: @Bet Tn P T Q *) spliter. (* Goal: @Bet Tn P T Q *) assert(Per A T P). (* Goal: @Bet Tn P T Q *) (* Goal: @Per Tn A T P *) { (* Goal: @Per Tn A T P *) apply (perp_col _ _ _ _ T) in H3; auto. (* Goal: @Per Tn A T P *) apply perp_left_comm in H3. (* Goal: @Per Tn A T P *) apply perp_perp_in in H3. (* Goal: @Per Tn A T P *) apply perp_in_comm in H3. (* Goal: @Per Tn A T P *) apply perp_in_per in H3. (* Goal: @Per Tn A T P *) apply l8_2. (* Goal: @Per Tn P T A *) assumption. (* BG Goal: @Bet Tn P T Q *) (* BG Goal: @Bet Tn P T Q *) } (* Goal: @Bet Tn P T Q *) assert(HM:=midpoint_existence P Q). (* Goal: @Bet Tn P T Q *) ex_and HM T'. (* Goal: @Bet Tn P T Q *) assert(Per A T' P). (* Goal: @Bet Tn P T Q *) (* Goal: @Per Tn A T' P *) { (* Goal: @Per Tn A T' P *) unfold Per. (* Goal: @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => and (@Midpoint Tn T' P C') (@Cong Tn A P A C')) *) exists Q. (* Goal: and (@Midpoint Tn T' P Q) (@Cong Tn A P A Q) *) split; Cong. (* BG Goal: @Bet Tn P T Q *) (* BG Goal: @Bet Tn P T Q *) } (* Goal: @Bet Tn P T Q *) assert(T' = T \/ ~ Col T P Q). (* Goal: @Bet Tn P T Q *) (* Goal: or (@eq (@Tpoint Tn) T' T) (not (@Col Tn T P Q)) *) { (* Goal: or (@eq (@Tpoint Tn) T' T) (not (@Col Tn T P Q)) *) apply(col_per2_cases A T' P Q T); Col. (* Goal: not (@eq (@Tpoint Tn) T' P) *) intro. (* Goal: False *) treat_equalities. (* Goal: False *) apply perp_distinct in H3; tauto. (* BG Goal: @Bet Tn P T Q *) (* BG Goal: @Bet Tn P T Q *) } (* Goal: @Bet Tn P T Q *) induction H7. (* Goal: @Bet Tn P T Q *) (* Goal: @Bet Tn P T Q *) subst T'. (* Goal: @Bet Tn P T Q *) (* Goal: @Bet Tn P T Q *) Between. (* Goal: @Bet Tn P T Q *) assert(Col T A T'). (* Goal: @Bet Tn P T Q *) (* Goal: @Col Tn T A T' *) { (* Goal: @Col Tn T A T' *) apply(col_perp2_ncol__col A T A T' P Q); Col. (* Goal: not (@Col Tn A P Q) *) (* Goal: @Perp Tn A T' P Q *) (* Goal: @Perp Tn A T P Q *) Perp. (* Goal: not (@Col Tn A P Q) *) (* Goal: @Perp Tn A T' P Q *) apply per_perp_in in H6. (* Goal: not (@Col Tn A P Q) *) (* Goal: not (@eq (@Tpoint Tn) T' P) *) (* Goal: not (@eq (@Tpoint Tn) A T') *) (* Goal: @Perp Tn A T' P Q *) apply perp_in_comm in H6. (* Goal: not (@Col Tn A P Q) *) (* Goal: not (@eq (@Tpoint Tn) T' P) *) (* Goal: not (@eq (@Tpoint Tn) A T') *) (* Goal: @Perp Tn A T' P Q *) apply perp_in_perp in H6. (* Goal: not (@Col Tn A P Q) *) (* Goal: not (@eq (@Tpoint Tn) T' P) *) (* Goal: not (@eq (@Tpoint Tn) A T') *) (* Goal: @Perp Tn A T' P Q *) apply perp_sym in H6. (* Goal: not (@Col Tn A P Q) *) (* Goal: not (@eq (@Tpoint Tn) T' P) *) (* Goal: not (@eq (@Tpoint Tn) A T') *) (* Goal: @Perp Tn A T' P Q *) apply perp_sym. (* Goal: not (@Col Tn A P Q) *) (* Goal: not (@eq (@Tpoint Tn) T' P) *) (* Goal: not (@eq (@Tpoint Tn) A T') *) (* Goal: @Perp Tn P Q A T' *) apply (perp_col _ T'); Perp; Col. (* Goal: not (@Col Tn A P Q) *) (* Goal: not (@eq (@Tpoint Tn) T' P) *) (* Goal: not (@eq (@Tpoint Tn) A T') *) intro. (* Goal: not (@Col Tn A P Q) *) (* Goal: not (@eq (@Tpoint Tn) T' P) *) (* Goal: False *) treat_equalities. (* Goal: not (@Col Tn A P Q) *) (* Goal: not (@eq (@Tpoint Tn) T' P) *) (* Goal: False *) unfold Midpoint in H5; spliter. (* Goal: not (@Col Tn A P Q) *) (* Goal: not (@eq (@Tpoint Tn) T' P) *) (* Goal: False *) apply H7; ColR. (* Goal: not (@Col Tn A P Q) *) (* Goal: not (@eq (@Tpoint Tn) T' P) *) intro. (* Goal: not (@Col Tn A P Q) *) (* Goal: False *) subst T'. (* Goal: not (@Col Tn A P Q) *) (* Goal: False *) apply is_midpoint_id in H5. (* Goal: not (@Col Tn A P Q) *) (* Goal: False *) contradiction. (* Goal: not (@Col Tn A P Q) *) intro. (* Goal: False *) apply H7. (* Goal: @Col Tn T P Q *) ColR. (* BG Goal: @Bet Tn P T Q *) (* BG Goal: @Bet Tn P T Q *) } (* Goal: @Bet Tn P T Q *) assert(T=T'). (* Goal: @Bet Tn P T Q *) (* Goal: @eq (@Tpoint Tn) T T' *) { (* Goal: @eq (@Tpoint Tn) T T' *) apply(per2_col_eq A T T' P); Perp. (* Goal: not (@eq (@Tpoint Tn) A T') *) (* Goal: not (@eq (@Tpoint Tn) A T) *) intro. (* Goal: not (@eq (@Tpoint Tn) A T') *) (* Goal: False *) treat_equalities. (* Goal: not (@eq (@Tpoint Tn) A T') *) (* Goal: False *) apply perp_distinct in H3; tauto. (* Goal: not (@eq (@Tpoint Tn) A T') *) intro. (* Goal: False *) treat_equalities. (* Goal: False *) unfold Midpoint in H5; spliter. (* Goal: False *) apply H7; ColR. (* BG Goal: @Bet Tn P T Q *) (* BG Goal: @Bet Tn P T Q *) } (* Goal: @Bet Tn P T Q *) subst T'. (* Goal: @Bet Tn P T Q *) Between. (* BG Goal: @Bet Tn P T Q *) } (* Goal: @Bet Tn P T Q *) spliter. (* Goal: @Bet Tn P T Q *) subst T. (* Goal: @Bet Tn P A Q *) assert(P = Q \/ Midpoint A P Q). (* Goal: @Bet Tn P A Q *) (* Goal: or (@eq (@Tpoint Tn) P Q) (@Midpoint Tn A P Q) *) { (* Goal: or (@eq (@Tpoint Tn) P Q) (@Midpoint Tn A P Q) *) apply(l7_20 A P Q); Col. (* Goal: @Cong Tn A P A Q *) Cong. (* BG Goal: @Bet Tn P A Q *) } (* Goal: @Bet Tn P A Q *) induction H3. (* Goal: @Bet Tn P A Q *) (* Goal: @Bet Tn P A Q *) { (* Goal: @Bet Tn P A Q *) contradiction. (* BG Goal: @Bet Tn P A Q *) } (* Goal: @Bet Tn P A Q *) Between. Qed. Lemma inter_circle : forall P Q A T M, Cong P A Q A -> Le P M P A -> Le Q M Q A -> Projp A T P Q -> Le T M T A. Proof. (* Goal: forall (P Q A T M : @Tpoint Tn) (_ : @Cong Tn P A Q A) (_ : @Le Tn P M P A) (_ : @Le Tn Q M Q A) (_ : @Projp Tn A T P Q), @Le Tn T M T A *) intros. (* Goal: @Le Tn T M T A *) assert(HH:= circle_projp_between P Q A T H H2). (* Goal: @Le Tn T M T A *) induction(eq_dec_points T M). (* Goal: @Le Tn T M T A *) (* Goal: @Le Tn T M T A *) { (* Goal: @Le Tn T M T A *) subst M. (* Goal: @Le Tn T T T A *) apply le_trivial. (* BG Goal: @Le Tn T M T A *) } (* Goal: @Le Tn T M T A *) { (* Goal: @Le Tn T M T A *) induction(eq_dec_points P T). (* Goal: @Le Tn T M T A *) (* Goal: @Le Tn T M T A *) { (* Goal: @Le Tn T M T A *) treat_equalities; auto. (* BG Goal: @Le Tn T M T A *) } (* Goal: @Le Tn T M T A *) assert(HA:= angle_partition P T M H4 H3). (* Goal: @Le Tn T M T A *) induction(eq_dec_points Q T). (* Goal: @Le Tn T M T A *) (* Goal: @Le Tn T M T A *) { (* Goal: @Le Tn T M T A *) treat_equalities; auto. (* BG Goal: @Le Tn T M T A *) } (* Goal: @Le Tn T M T A *) { (* Goal: @Le Tn T M T A *) induction HA. (* Goal: @Le Tn T M T A *) (* Goal: @Le Tn T M T A *) { (* Goal: @Le Tn T M T A *) assert(HB:= acute_bet__obtuse P T M Q HH H5 H6). (* Goal: @Le Tn T M T A *) apply(inter_circle_obtuse Q P); Cong. (* Goal: @Projp Tn A T Q P *) unfold Projp in *. (* Goal: and (not (@eq (@Tpoint Tn) Q P)) (or (and (@Col Tn Q P T) (@Perp Tn Q P A T)) (and (@Col Tn Q P A) (@eq (@Tpoint Tn) A T))) *) spliter. (* Goal: and (not (@eq (@Tpoint Tn) Q P)) (or (and (@Col Tn Q P T) (@Perp Tn Q P A T)) (and (@Col Tn Q P A) (@eq (@Tpoint Tn) A T))) *) split; auto. (* Goal: or (and (@Col Tn Q P T) (@Perp Tn Q P A T)) (and (@Col Tn Q P A) (@eq (@Tpoint Tn) A T)) *) induction H7. (* Goal: or (and (@Col Tn Q P T) (@Perp Tn Q P A T)) (and (@Col Tn Q P A) (@eq (@Tpoint Tn) A T)) *) (* Goal: or (and (@Col Tn Q P T) (@Perp Tn Q P A T)) (and (@Col Tn Q P A) (@eq (@Tpoint Tn) A T)) *) { (* Goal: or (and (@Col Tn Q P T) (@Perp Tn Q P A T)) (and (@Col Tn Q P A) (@eq (@Tpoint Tn) A T)) *) left. (* Goal: and (@Col Tn Q P T) (@Perp Tn Q P A T) *) spliter. (* Goal: and (@Col Tn Q P T) (@Perp Tn Q P A T) *) split; Col; Perp. (* BG Goal: @Le Tn T M T A *) (* BG Goal: or (and (@Col Tn Q P T) (@Perp Tn Q P A T)) (and (@Col Tn Q P A) (@eq (@Tpoint Tn) A T)) *) } (* Goal: or (and (@Col Tn Q P T) (@Perp Tn Q P A T)) (and (@Col Tn Q P A) (@eq (@Tpoint Tn) A T)) *) { (* Goal: or (and (@Col Tn Q P T) (@Perp Tn Q P A T)) (and (@Col Tn Q P A) (@eq (@Tpoint Tn) A T)) *) right. (* Goal: and (@Col Tn Q P A) (@eq (@Tpoint Tn) A T) *) spliter. (* Goal: and (@Col Tn Q P A) (@eq (@Tpoint Tn) A T) *) split; Col. (* BG Goal: @Le Tn T M T A *) } (* BG Goal: @Le Tn T M T A *) } (* Goal: @Le Tn T M T A *) { (* Goal: @Le Tn T M T A *) apply(inter_circle_obtuse P Q); Cong. (* Goal: or (@Obtuse Tn P T M) (@Per Tn P T M) *) induction H6. (* Goal: or (@Obtuse Tn P T M) (@Per Tn P T M) *) (* Goal: or (@Obtuse Tn P T M) (@Per Tn P T M) *) { (* Goal: or (@Obtuse Tn P T M) (@Per Tn P T M) *) right; auto. (* BG Goal: or (@Obtuse Tn P T M) (@Per Tn P T M) *) } (* Goal: or (@Obtuse Tn P T M) (@Per Tn P T M) *) { (* Goal: or (@Obtuse Tn P T M) (@Per Tn P T M) *) left; auto. Qed. Lemma projp_lt : forall P Q A T, Cong P A Q A -> Projp A T P Q -> Lt T A P A. Proof. (* Goal: forall (P Q A T : @Tpoint Tn) (_ : @Cong Tn P A Q A) (_ : @Projp Tn A T P Q), @Lt Tn T A P A *) intros. (* Goal: @Lt Tn T A P A *) unfold Projp in H0. (* Goal: @Lt Tn T A P A *) spliter. (* Goal: @Lt Tn T A P A *) induction H1. (* Goal: @Lt Tn T A P A *) (* Goal: @Lt Tn T A P A *) { (* Goal: @Lt Tn T A P A *) spliter. (* Goal: @Lt Tn T A P A *) induction(eq_dec_points P T). (* Goal: @Lt Tn T A P A *) (* Goal: @Lt Tn T A P A *) { (* Goal: @Lt Tn T A P A *) subst T. (* Goal: @Lt Tn P A P A *) assert(Lt Q P Q A /\ Lt A P Q A). (* Goal: @Lt Tn P A P A *) (* Goal: and (@Lt Tn Q P Q A) (@Lt Tn A P Q A) *) { (* Goal: and (@Lt Tn Q P Q A) (@Lt Tn A P Q A) *) apply(per_lt Q P A). (* Goal: @Per Tn Q P A *) (* Goal: not (@eq (@Tpoint Tn) A P) *) (* Goal: not (@eq (@Tpoint Tn) Q P) *) auto. (* Goal: @Per Tn Q P A *) (* Goal: not (@eq (@Tpoint Tn) A P) *) apply perp_distinct in H2. (* Goal: @Per Tn Q P A *) (* Goal: not (@eq (@Tpoint Tn) A P) *) tauto. (* Goal: @Per Tn Q P A *) Perp. (* BG Goal: @Lt Tn T A P A *) (* BG Goal: @Lt Tn T A P A *) (* BG Goal: @Lt Tn P A P A *) } (* Goal: @Lt Tn P A P A *) spliter. (* Goal: @Lt Tn P A P A *) unfold Lt in H4. (* Goal: @Lt Tn P A P A *) spliter. (* Goal: @Lt Tn P A P A *) apply False_ind. (* Goal: False *) apply H5. (* Goal: @Cong Tn A P Q A *) Cong. (* BG Goal: @Lt Tn T A P A *) (* BG Goal: @Lt Tn T A P A *) } (* Goal: @Lt Tn T A P A *) { (* Goal: @Lt Tn T A P A *) assert(Lt P T P A /\ Lt A T P A). (* Goal: @Lt Tn T A P A *) (* Goal: and (@Lt Tn P T P A) (@Lt Tn A T P A) *) { (* Goal: and (@Lt Tn P T P A) (@Lt Tn A T P A) *) apply(per_lt P T A); auto. (* Goal: @Per Tn P T A *) (* Goal: not (@eq (@Tpoint Tn) A T) *) apply perp_distinct in H2. (* Goal: @Per Tn P T A *) (* Goal: not (@eq (@Tpoint Tn) A T) *) tauto. (* Goal: @Per Tn P T A *) apply (perp_col _ _ _ _ T) in H2; Perp. (* BG Goal: @Lt Tn T A P A *) (* BG Goal: @Lt Tn T A P A *) } (* Goal: @Lt Tn T A P A *) spliter. (* Goal: @Lt Tn T A P A *) apply lt_left_comm. (* Goal: @Lt Tn A T P A *) auto. (* BG Goal: @Lt Tn T A P A *) } (* BG Goal: @Lt Tn T A P A *) } (* Goal: @Lt Tn T A P A *) { (* Goal: @Lt Tn T A P A *) spliter. (* Goal: @Lt Tn T A P A *) subst T. (* Goal: @Lt Tn A A P A *) induction(eq_dec_points P A). (* Goal: @Lt Tn A A P A *) (* Goal: @Lt Tn A A P A *) subst P. (* Goal: @Lt Tn A A P A *) (* Goal: @Lt Tn A A A A *) apply cong_symmetry in H. (* Goal: @Lt Tn A A P A *) (* Goal: @Lt Tn A A A A *) apply cong_identity in H. (* Goal: @Lt Tn A A P A *) (* Goal: @Lt Tn A A A A *) subst Q. (* Goal: @Lt Tn A A P A *) (* Goal: @Lt Tn A A A A *) tauto. (* Goal: @Lt Tn A A P A *) apply lt1123; auto. Qed. End T15.
Set Implicit Arguments. Unset Strict Implicit. Require Export Group_kernel. Section Def. Variable G G' : GROUP. Variable f : Hom G G'. Definition surj_group_quo_ker : Hom G (group_quo G (Ker f) (kernel_normal (G:=G) (G':=G') (f:=f))) := group_quo_surj (kernel_normal (f:=f)). Lemma surj_group_quo_ker_surjective : surjective surj_group_quo_ker. Proof. (* Goal: @surjective (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))) surj_group_quo_ker)) *) red in |- *. (* Goal: forall y : Carrier (sgroup_set (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))))), @ex (Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (fun x : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => @Equal (sgroup_set (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))))) y (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))) surj_group_quo_ker)) x)) *) simpl in |- *. (* Goal: forall y : Carrier (sgroup_set (monoid_sgroup (group_monoid G))), @ex (Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (fun x : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => @group_quo_eq G (@Ker G G' f) y x) *) unfold group_quo_eq, subtype_image_equal in |- *. (* Goal: forall y : Carrier (sgroup_set (monoid_sgroup (group_monoid G))), @ex (Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (fun x : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => @in_part (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) y (group_inverse G x)) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) (@subgroup_submonoid G (@Ker G G' f))))) *) intros y; exists y; try assumption. (* Goal: @in_part (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) y (group_inverse G y)) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) (@subgroup_submonoid G (@Ker G G' f)))) *) simpl in |- *. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (sgroup_law (monoid_sgroup (group_monoid G)) y (group_inverse G y))) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G'))) *) apply Trans with (Ap (sgroup_map (monoid_sgroup_hom f)) (monoid_unit G)); auto with algebra. Qed. Definition inj_coKer_group : Hom (coKer f:GROUP) G'. Proof. (* Goal: Carrier (@Hom GROUP (@group_of_subgroup G' (@coKer G G' f) : Ob GROUP) G') *) apply (BUILD_HOM_GROUP (G:=coKer f) (G':=G') (ff:=inj_part (coKer f))). (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid G'))) (@part (sgroup_set (monoid_sgroup (group_monoid G'))) (@subsgroup_part (monoid_sgroup (group_monoid G')) (@submonoid_subsgroup (group_monoid G') (@subgroup_submonoid G' (@coKer G G' f)))))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@inj_part (sgroup_set (monoid_sgroup (group_monoid G'))) (@subsgroup_part (monoid_sgroup (group_monoid G')) (@submonoid_subsgroup (group_monoid G') (@subgroup_submonoid G' (@coKer G G' f))))) (@monoid_unit (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f)))) (monoid_on_def (group_monoid (@group_of_subgroup G' (@coKer G G' f)))))) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G'))) *) (* Goal: forall x y : Carrier (sgroup_set (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f))))), @Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid G'))) (@part (sgroup_set (monoid_sgroup (group_monoid G'))) (@subsgroup_part (monoid_sgroup (group_monoid G')) (@submonoid_subsgroup (group_monoid G') (@subgroup_submonoid G' (@coKer G G' f)))))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@inj_part (sgroup_set (monoid_sgroup (group_monoid G'))) (@subsgroup_part (monoid_sgroup (group_monoid G')) (@submonoid_subsgroup (group_monoid G') (@subgroup_submonoid G' (@coKer G G' f))))) (sgroup_law (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f)))) x y)) (sgroup_law (monoid_sgroup (group_monoid G')) (@Ap (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid G'))) (@part (sgroup_set (monoid_sgroup (group_monoid G'))) (@subsgroup_part (monoid_sgroup (group_monoid G')) (@submonoid_subsgroup (group_monoid G') (@subgroup_submonoid G' (@coKer G G' f)))))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@inj_part (sgroup_set (monoid_sgroup (group_monoid G'))) (@subsgroup_part (monoid_sgroup (group_monoid G')) (@submonoid_subsgroup (group_monoid G') (@subgroup_submonoid G' (@coKer G G' f))))) x) (@Ap (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid G'))) (@part (sgroup_set (monoid_sgroup (group_monoid G'))) (@subsgroup_part (monoid_sgroup (group_monoid G')) (@submonoid_subsgroup (group_monoid G') (@subgroup_submonoid G' (@coKer G G' f)))))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@inj_part (sgroup_set (monoid_sgroup (group_monoid G'))) (@subsgroup_part (monoid_sgroup (group_monoid G')) (@submonoid_subsgroup (group_monoid G') (@subgroup_submonoid G' (@coKer G G' f))))) y)) *) (* Goal: forall (x y : Carrier (sgroup_set (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f))))) x y), @Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid G'))) (@part (sgroup_set (monoid_sgroup (group_monoid G'))) (@subsgroup_part (monoid_sgroup (group_monoid G')) (@submonoid_subsgroup (group_monoid G') (@subgroup_submonoid G' (@coKer G G' f)))))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@inj_part (sgroup_set (monoid_sgroup (group_monoid G'))) (@subsgroup_part (monoid_sgroup (group_monoid G')) (@submonoid_subsgroup (group_monoid G') (@subgroup_submonoid G' (@coKer G G' f))))) x) (@Ap (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid G'))) (@part (sgroup_set (monoid_sgroup (group_monoid G'))) (@subsgroup_part (monoid_sgroup (group_monoid G')) (@submonoid_subsgroup (group_monoid G') (@subgroup_submonoid G' (@coKer G G' f)))))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@inj_part (sgroup_set (monoid_sgroup (group_monoid G'))) (@subsgroup_part (monoid_sgroup (group_monoid G')) (@submonoid_subsgroup (group_monoid G') (@subgroup_submonoid G' (@coKer G G' f))))) y) *) simpl in |- *. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid G'))) (@part (sgroup_set (monoid_sgroup (group_monoid G'))) (@subsgroup_part (monoid_sgroup (group_monoid G')) (@submonoid_subsgroup (group_monoid G') (@subgroup_submonoid G' (@coKer G G' f)))))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@inj_part (sgroup_set (monoid_sgroup (group_monoid G'))) (@subsgroup_part (monoid_sgroup (group_monoid G')) (@submonoid_subsgroup (group_monoid G') (@subgroup_submonoid G' (@coKer G G' f))))) (@monoid_unit (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f)))) (monoid_on_def (group_monoid (@group_of_subgroup G' (@coKer G G' f)))))) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G'))) *) (* Goal: forall x y : Carrier (sgroup_set (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f))))), @Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid G'))) (@part (sgroup_set (monoid_sgroup (group_monoid G'))) (@subsgroup_part (monoid_sgroup (group_monoid G')) (@submonoid_subsgroup (group_monoid G') (@subgroup_submonoid G' (@coKer G G' f)))))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@inj_part (sgroup_set (monoid_sgroup (group_monoid G'))) (@subsgroup_part (monoid_sgroup (group_monoid G')) (@submonoid_subsgroup (group_monoid G') (@subgroup_submonoid G' (@coKer G G' f))))) (sgroup_law (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f)))) x y)) (sgroup_law (monoid_sgroup (group_monoid G')) (@Ap (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid G'))) (@part (sgroup_set (monoid_sgroup (group_monoid G'))) (@subsgroup_part (monoid_sgroup (group_monoid G')) (@submonoid_subsgroup (group_monoid G') (@subgroup_submonoid G' (@coKer G G' f)))))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@inj_part (sgroup_set (monoid_sgroup (group_monoid G'))) (@subsgroup_part (monoid_sgroup (group_monoid G')) (@submonoid_subsgroup (group_monoid G') (@subgroup_submonoid G' (@coKer G G' f))))) x) (@Ap (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid G'))) (@part (sgroup_set (monoid_sgroup (group_monoid G'))) (@subsgroup_part (monoid_sgroup (group_monoid G')) (@submonoid_subsgroup (group_monoid G') (@subgroup_submonoid G' (@coKer G G' f)))))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@inj_part (sgroup_set (monoid_sgroup (group_monoid G'))) (@subsgroup_part (monoid_sgroup (group_monoid G')) (@submonoid_subsgroup (group_monoid G') (@subgroup_submonoid G' (@coKer G G' f))))) y)) *) (* Goal: forall (x y : @subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G)))))) (_ : @subtype_image_equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G)))))) (@subtype_elt (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G)))))) x y), @Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@subtype_elt (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) x) (@subtype_elt (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) y) *) auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid G'))) (@part (sgroup_set (monoid_sgroup (group_monoid G'))) (@subsgroup_part (monoid_sgroup (group_monoid G')) (@submonoid_subsgroup (group_monoid G') (@subgroup_submonoid G' (@coKer G G' f)))))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@inj_part (sgroup_set (monoid_sgroup (group_monoid G'))) (@subsgroup_part (monoid_sgroup (group_monoid G')) (@submonoid_subsgroup (group_monoid G') (@subgroup_submonoid G' (@coKer G G' f))))) (@monoid_unit (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f)))) (monoid_on_def (group_monoid (@group_of_subgroup G' (@coKer G G' f)))))) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G'))) *) (* Goal: forall x y : Carrier (sgroup_set (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f))))), @Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid G'))) (@part (sgroup_set (monoid_sgroup (group_monoid G'))) (@subsgroup_part (monoid_sgroup (group_monoid G')) (@submonoid_subsgroup (group_monoid G') (@subgroup_submonoid G' (@coKer G G' f)))))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@inj_part (sgroup_set (monoid_sgroup (group_monoid G'))) (@subsgroup_part (monoid_sgroup (group_monoid G')) (@submonoid_subsgroup (group_monoid G') (@subgroup_submonoid G' (@coKer G G' f))))) (sgroup_law (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f)))) x y)) (sgroup_law (monoid_sgroup (group_monoid G')) (@Ap (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid G'))) (@part (sgroup_set (monoid_sgroup (group_monoid G'))) (@subsgroup_part (monoid_sgroup (group_monoid G')) (@submonoid_subsgroup (group_monoid G') (@subgroup_submonoid G' (@coKer G G' f)))))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@inj_part (sgroup_set (monoid_sgroup (group_monoid G'))) (@subsgroup_part (monoid_sgroup (group_monoid G')) (@submonoid_subsgroup (group_monoid G') (@subgroup_submonoid G' (@coKer G G' f))))) x) (@Ap (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid G'))) (@part (sgroup_set (monoid_sgroup (group_monoid G'))) (@subsgroup_part (monoid_sgroup (group_monoid G')) (@submonoid_subsgroup (group_monoid G') (@subgroup_submonoid G' (@coKer G G' f)))))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@inj_part (sgroup_set (monoid_sgroup (group_monoid G'))) (@subsgroup_part (monoid_sgroup (group_monoid G')) (@submonoid_subsgroup (group_monoid G') (@subgroup_submonoid G' (@coKer G G' f))))) y)) *) simpl in |- *. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid G'))) (@part (sgroup_set (monoid_sgroup (group_monoid G'))) (@subsgroup_part (monoid_sgroup (group_monoid G')) (@submonoid_subsgroup (group_monoid G') (@subgroup_submonoid G' (@coKer G G' f)))))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@inj_part (sgroup_set (monoid_sgroup (group_monoid G'))) (@subsgroup_part (monoid_sgroup (group_monoid G')) (@submonoid_subsgroup (group_monoid G') (@subgroup_submonoid G' (@coKer G G' f))))) (@monoid_unit (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f)))) (monoid_on_def (group_monoid (@group_of_subgroup G' (@coKer G G' f)))))) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G'))) *) (* Goal: forall x y : @subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))), @Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (sgroup_law (monoid_sgroup (group_monoid G')) (@subtype_elt (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) x) (@subtype_elt (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) y)) (sgroup_law (monoid_sgroup (group_monoid G')) (@subtype_elt (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) x) (@subtype_elt (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) y)) *) auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid G'))) (@part (sgroup_set (monoid_sgroup (group_monoid G'))) (@subsgroup_part (monoid_sgroup (group_monoid G')) (@submonoid_subsgroup (group_monoid G') (@subgroup_submonoid G' (@coKer G G' f)))))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@inj_part (sgroup_set (monoid_sgroup (group_monoid G'))) (@subsgroup_part (monoid_sgroup (group_monoid G')) (@submonoid_subsgroup (group_monoid G') (@subgroup_submonoid G' (@coKer G G' f))))) (@monoid_unit (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f)))) (monoid_on_def (group_monoid (@group_of_subgroup G' (@coKer G G' f)))))) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G'))) *) simpl in |- *. (* 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 algebra. Qed. Lemma inj_coKer_group_injective : injective inj_coKer_group. Proof. (* Goal: @injective (sgroup_set (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f))))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f)))) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid (@group_of_subgroup G' (@coKer G G' f))) (group_monoid G') inj_coKer_group)) *) exact (inj_part_injective (E:=G') (A:=coKer f)). Qed. Definition bij_group_quo_ker_coKer : Hom (group_quo G (Ker f) (kernel_normal (G:=G) (G':=G') (f:=f)):GROUP) (coKer f). Proof. (* Goal: Carrier (@Hom GROUP (group_quo G (@Ker G G' f) (@kernel_normal G G' f) : Ob GROUP) (@group_of_subgroup G' (@coKer G G' f))) *) apply (BUILD_HOM_GROUP (G:=group_quo G (Ker f) (kernel_normal (G:=G) (G':=G') (f:=f))) (G':=coKer f) (ff:=fun x : G => Build_subtype (P:=image (sgroup_map (monoid_sgroup_hom f)) (full G)) (subtype_elt:=f x) (coKer_prop f x))). (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f))))) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (@monoid_unit (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))) (monoid_on_def (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))))) (@coKer_prop G G' f (@monoid_unit (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))) (monoid_on_def (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))))))) (@monoid_unit (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f)))) (monoid_on_def (group_monoid (@group_of_subgroup G' (@coKer G G' f))))) *) (* Goal: forall x y : Carrier (sgroup_set (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))))), @Equal (sgroup_set (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f))))) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (sgroup_law (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))) x y)) (@coKer_prop G G' f (sgroup_law (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))) x y))) (sgroup_law (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f)))) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x) (@coKer_prop G G' f x)) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y) (@coKer_prop G G' f y))) *) (* Goal: forall (x y : Carrier (sgroup_set (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))))) x y), @Equal (sgroup_set (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f))))) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x) (@coKer_prop G G' f x)) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y) (@coKer_prop G G' f y)) *) simpl in |- *. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f))))) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (@monoid_unit (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))) (monoid_on_def (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))))) (@coKer_prop G G' f (@monoid_unit (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))) (monoid_on_def (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))))))) (@monoid_unit (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f)))) (monoid_on_def (group_monoid (@group_of_subgroup G' (@coKer G G' f))))) *) (* Goal: forall x y : Carrier (sgroup_set (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))))), @Equal (sgroup_set (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f))))) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (sgroup_law (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))) x y)) (@coKer_prop G G' f (sgroup_law (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))) x y))) (sgroup_law (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f)))) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x) (@coKer_prop G G' f x)) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y) (@coKer_prop G G' f y))) *) (* Goal: forall (x y : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (_ : @group_quo_eq G (@Ker G G' f) x y), @subtype_image_equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G)))))) (@subtype_elt (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G)))))) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x) (@coKer_prop G G' f x)) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y) (@coKer_prop G G' f y)) *) unfold group_quo_eq, subtype_image_equal in |- *. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f))))) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (@monoid_unit (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))) (monoid_on_def (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))))) (@coKer_prop G G' f (@monoid_unit (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))) (monoid_on_def (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))))))) (@monoid_unit (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f)))) (monoid_on_def (group_monoid (@group_of_subgroup G' (@coKer G G' f))))) *) (* Goal: forall x y : Carrier (sgroup_set (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))))), @Equal (sgroup_set (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f))))) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (sgroup_law (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))) x y)) (@coKer_prop G G' f (sgroup_law (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))) x y))) (sgroup_law (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f)))) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x) (@coKer_prop G G' f x)) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y) (@coKer_prop G G' f y))) *) (* Goal: forall (x y : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (_ : @in_part (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) x (group_inverse G y)) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) (@subgroup_submonoid G (@Ker G G' f))))), @Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@subtype_elt (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x) (@coKer_prop G G' f x))) (@subtype_elt (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y) (@coKer_prop G G' f y))) *) simpl in |- *. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f))))) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (@monoid_unit (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))) (monoid_on_def (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))))) (@coKer_prop G G' f (@monoid_unit (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))) (monoid_on_def (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))))))) (@monoid_unit (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f)))) (monoid_on_def (group_monoid (@group_of_subgroup G' (@coKer G G' f))))) *) (* Goal: forall x y : Carrier (sgroup_set (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))))), @Equal (sgroup_set (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f))))) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (sgroup_law (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))) x y)) (@coKer_prop G G' f (sgroup_law (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))) x y))) (sgroup_law (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f)))) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x) (@coKer_prop G G' f x)) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y) (@coKer_prop G G' f y))) *) (* Goal: forall (x y : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (sgroup_law (monoid_sgroup (group_monoid G)) x (group_inverse G y))) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G')))), @Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y) *) intros x y H'; try assumption. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f))))) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (@monoid_unit (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))) (monoid_on_def (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))))) (@coKer_prop G G' f (@monoid_unit (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))) (monoid_on_def (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))))))) (@monoid_unit (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f)))) (monoid_on_def (group_monoid (@group_of_subgroup G' (@coKer G G' f))))) *) (* Goal: forall x y : Carrier (sgroup_set (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))))), @Equal (sgroup_set (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f))))) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (sgroup_law (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))) x y)) (@coKer_prop G G' f (sgroup_law (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))) x y))) (sgroup_law (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f)))) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x) (@coKer_prop G G' f x)) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y) (@coKer_prop G G' f y))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y) *) apply GROUP_reg_right with (group_inverse _ (Ap (sgroup_map (monoid_sgroup_hom f)) y)); auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f))))) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (@monoid_unit (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))) (monoid_on_def (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))))) (@coKer_prop G G' f (@monoid_unit (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))) (monoid_on_def (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))))))) (@monoid_unit (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f)))) (monoid_on_def (group_monoid (@group_of_subgroup G' (@coKer G G' f))))) *) (* Goal: forall x y : Carrier (sgroup_set (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))))), @Equal (sgroup_set (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f))))) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (sgroup_law (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))) x y)) (@coKer_prop G G' f (sgroup_law (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))) x y))) (sgroup_law (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f)))) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x) (@coKer_prop G G' f x)) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y) (@coKer_prop G G' f y))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (sgroup_law (monoid_sgroup (group_monoid G')) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x) (group_inverse G' (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y))) (sgroup_law (monoid_sgroup (group_monoid G')) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y) (group_inverse G' (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y))) *) apply Trans with (sgroup_law G' (Ap (sgroup_map (monoid_sgroup_hom f)) x) (Ap (sgroup_map (monoid_sgroup_hom f)) (group_inverse G y))); auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f))))) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (@monoid_unit (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))) (monoid_on_def (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))))) (@coKer_prop G G' f (@monoid_unit (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))) (monoid_on_def (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))))))) (@monoid_unit (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f)))) (monoid_on_def (group_monoid (@group_of_subgroup G' (@coKer G G' f))))) *) (* Goal: forall x y : Carrier (sgroup_set (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))))), @Equal (sgroup_set (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f))))) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (sgroup_law (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))) x y)) (@coKer_prop G G' f (sgroup_law (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))) x y))) (sgroup_law (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f)))) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x) (@coKer_prop G G' f x)) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y) (@coKer_prop G G' f y))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (sgroup_law (monoid_sgroup (group_monoid G')) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (group_inverse G y))) (sgroup_law (monoid_sgroup (group_monoid G')) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y) (group_inverse G' (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y))) *) apply Trans with (Ap (sgroup_map (monoid_sgroup_hom f)) (sgroup_law G x (group_inverse G y))); auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f))))) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (@monoid_unit (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))) (monoid_on_def (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))))) (@coKer_prop G G' f (@monoid_unit (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))) (monoid_on_def (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))))))) (@monoid_unit (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f)))) (monoid_on_def (group_monoid (@group_of_subgroup G' (@coKer G G' f))))) *) (* Goal: forall x y : Carrier (sgroup_set (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))))), @Equal (sgroup_set (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f))))) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (sgroup_law (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))) x y)) (@coKer_prop G G' f (sgroup_law (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))) x y))) (sgroup_law (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f)))) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x) (@coKer_prop G G' f x)) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y) (@coKer_prop G G' f y))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (sgroup_law (monoid_sgroup (group_monoid G)) x (group_inverse G y))) (sgroup_law (monoid_sgroup (group_monoid G')) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y) (group_inverse G' (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y))) *) apply Trans with (monoid_unit G'); auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f))))) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (@monoid_unit (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))) (monoid_on_def (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))))) (@coKer_prop G G' f (@monoid_unit (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))) (monoid_on_def (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))))))) (@monoid_unit (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f)))) (monoid_on_def (group_monoid (@group_of_subgroup G' (@coKer G G' f))))) *) (* Goal: forall x y : Carrier (sgroup_set (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))))), @Equal (sgroup_set (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f))))) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (sgroup_law (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))) x y)) (@coKer_prop G G' f (sgroup_law (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))) x y))) (sgroup_law (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f)))) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x) (@coKer_prop G G' f x)) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y) (@coKer_prop G G' f y))) *) simpl in |- *. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f))))) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (@monoid_unit (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))) (monoid_on_def (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))))) (@coKer_prop G G' f (@monoid_unit (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))) (monoid_on_def (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))))))) (@monoid_unit (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f)))) (monoid_on_def (group_monoid (@group_of_subgroup G' (@coKer G G' f))))) *) (* Goal: forall x y : Carrier (sgroup_set (monoid_sgroup (group_monoid G))), @subtype_image_equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G)))))) (@subtype_elt (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G)))))) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (sgroup_law (@sg (@group_quo_set G (@Ker G G' f) (@kernel_normal G G' f)) (fun x0 y0 : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) (fun (x0 x' y0 y' : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (H' : @Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (group_inverse G x'))) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G')))) (H'0 : @Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (group_inverse G y'))) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G')))) => @in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x' y')))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x' y'))) (@normal_com_in G (@Ker G G' f) (@kernel_normal G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x' y'))) x0 (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y') (group_inverse G x'))) x0) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x' y'))) x0) (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (group_inverse G y')) (group_inverse G x')) x0) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y') (group_inverse G x'))) x0) (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (group_inverse G y')) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G x') x0)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (group_inverse G y')) (group_inverse G x')) x0) (@subsgroup_in_prop (monoid_sgroup (group_monoid G)) (@Build_subsgroup (monoid_sgroup (group_monoid G)) (@kernel_part G G' f) (fun (x1 y1 : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (H'1 : @Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x1) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G')))) (H'2 : @Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y1) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G')))) => @Trans (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (sgroup_law (monoid_sgroup (group_monoid G)) x1 y1)) (sgroup_law (monoid_sgroup (group_monoid G')) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x1) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y1)) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G'))) (@SGROUP_hom_prop (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f) x1 y1) (@Trans (sgroup_set (monoid_sgroup (group_monoid G'))) (sgroup_law (monoid_sgroup (group_monoid G')) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x1) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y1)) (sgroup_law (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')))) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G'))) (@SGROUP_comp (monoid_sgroup (group_monoid G')) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x1) (@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 G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y1) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G'))) H'1 H'2) (@MONOID_unit_l (group_monoid G') (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G'))))))) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (group_inverse G y')) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G x') x0) H'0 (@normal_com_in G (@Ker G G' f) (@kernel_normal G G' f) x0 (group_inverse G x') H')) (@SGROUP_assoc (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (group_inverse G y')) (group_inverse G x') x0)) (@SGROUP_comp (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y') (group_inverse G x'))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (group_inverse G y')) (group_inverse G x')) x0 x0 (@Sym (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (group_inverse G y')) (group_inverse G x')) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y') (group_inverse G x'))) (@SGROUP_assoc (monoid_sgroup (group_monoid G)) y0 (group_inverse G y') (group_inverse G x'))) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) x0))) (@SGROUP_comp (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x' y'))) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y') (group_inverse G x'))) x0 x0 (@SGROUP_comp (monoid_sgroup (group_monoid G)) y0 y0 (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x' y')) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y') (group_inverse G x')) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) y0) (@GROUP_inverse_law G x' y')) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) x0)))) (@SGROUP_assoc (monoid_sgroup (group_monoid G)) x0 y0 (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x' y')))) (fun x0 y0 z : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => @in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) y0 z)) (group_inverse G x0))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) z) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 z)))) (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) z) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (group_inverse G y0)) (group_inverse G x0))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) y0 z)) (group_inverse G x0))) (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 z)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) z) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (group_inverse G y0)) (group_inverse G x0))) (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y0 z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 z)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))) (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) z (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))))) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y0 z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))))) (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) z (group_inverse G z)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))))) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) z (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))))) (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))))) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) z (group_inverse G z)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))))) (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))))) (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))) (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))) (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0))) (@submonoid_in_prop (group_monoid G) (@Build_submonoid (group_monoid G) (@Build_subsgroup (monoid_sgroup (group_monoid G)) (@kernel_part G G' f) (fun (x1 y1 : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (H' : @Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x1) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G')))) (H'0 : @Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y1) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G')))) => @Trans (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (sgroup_law (monoid_sgroup (group_monoid G)) x1 y1)) (sgroup_law (monoid_sgroup (group_monoid G')) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x1) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y1)) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G'))) (@SGROUP_hom_prop (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f) x1 y1) (@Trans (sgroup_set (monoid_sgroup (group_monoid G'))) (sgroup_law (monoid_sgroup (group_monoid G')) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x1) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y1)) (sgroup_law (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')))) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G'))) (@SGROUP_comp (monoid_sgroup (group_monoid G')) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x1) (@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 G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y1) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G'))) H' H'0) (@MONOID_unit_l (group_monoid G') (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G'))))))) (@MONOID_hom_prop (group_monoid G) (group_monoid G') f))) (@GROUP_inverse_r G (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0))) (@SGROUP_comp (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0)) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0)) (@Sym (sgroup_set (monoid_sgroup (group_monoid G))) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)) (@GROUP_inverse_law G x0 y0)))) (@Sym (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))) (@SGROUP_assoc (monoid_sgroup (group_monoid G)) x0 y0 (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))))) (@SGROUP_comp (monoid_sgroup (group_monoid G)) x0 x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) x0) (@SGROUP_comp (monoid_sgroup (group_monoid G)) y0 y0 (sgroup_law (monoid_sgroup (group_monoid G)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) y0) (@MONOID_unit_l (group_monoid G) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))))) (@SGROUP_comp (monoid_sgroup (group_monoid G)) x0 x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) z (group_inverse G z)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) x0) (@SGROUP_comp (monoid_sgroup (group_monoid G)) y0 y0 (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) z (group_inverse G z)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))) (sgroup_law (monoid_sgroup (group_monoid G)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) y0) (@SGROUP_comp (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) z (group_inverse G z)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)) (@GROUP_inverse_r G z) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))))))) (@SGROUP_comp (monoid_sgroup (group_monoid G)) x0 x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) z (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))))) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) z (group_inverse G z)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) x0) (@SGROUP_comp (monoid_sgroup (group_monoid G)) y0 y0 (sgroup_law (monoid_sgroup (group_monoid G)) z (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) z (group_inverse G z)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) y0) (@Sym (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) z (group_inverse G z)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))) (sgroup_law (monoid_sgroup (group_monoid G)) z (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))) (@SGROUP_assoc (monoid_sgroup (group_monoid G)) z (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))))))) (@SGROUP_comp (monoid_sgroup (group_monoid G)) x0 x0 (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y0 z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) z (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))))) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) x0) (@SGROUP_assoc (monoid_sgroup (group_monoid G)) y0 z (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))))) (@SGROUP_assoc (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))))) (@SGROUP_comp (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) z) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 z)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (group_inverse G y0)) (group_inverse G x0)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))) (@SGROUP_assoc (monoid_sgroup (group_monoid G)) x0 y0 z) (@SGROUP_assoc (monoid_sgroup (group_monoid G)) (group_inverse G z) (group_inverse G y0) (group_inverse G x0)))) (@SGROUP_comp (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) z) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) y0 z)) (group_inverse G x0)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (group_inverse G y0)) (group_inverse G x0)) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) z)) (@SGROUP_comp (monoid_sgroup (group_monoid G)) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) y0 z)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (group_inverse G y0)) (group_inverse G x0) (group_inverse G x0) (@GROUP_inverse_law G y0 z) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) (group_inverse G x0))))) (@SGROUP_comp (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) z) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) z) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 z))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) y0 z)) (group_inverse G x0)) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) z)) (@GROUP_inverse_law G x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 z))))) x y)) (@coKer_prop G G' f (sgroup_law (@sg (@group_quo_set G (@Ker G G' f) (@kernel_normal G G' f)) (fun x0 y0 : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) (fun (x0 x' y0 y' : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (H' : @Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (group_inverse G x'))) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G')))) (H'0 : @Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (group_inverse G y'))) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G')))) => @in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x' y')))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x' y'))) (@normal_com_in G (@Ker G G' f) (@kernel_normal G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x' y'))) x0 (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y') (group_inverse G x'))) x0) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x' y'))) x0) (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (group_inverse G y')) (group_inverse G x')) x0) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y') (group_inverse G x'))) x0) (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (group_inverse G y')) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G x') x0)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (group_inverse G y')) (group_inverse G x')) x0) (@subsgroup_in_prop (monoid_sgroup (group_monoid G)) (@Build_subsgroup (monoid_sgroup (group_monoid G)) (@kernel_part G G' f) (fun (x1 y1 : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (H'1 : @Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x1) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G')))) (H'2 : @Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y1) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G')))) => @Trans (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (sgroup_law (monoid_sgroup (group_monoid G)) x1 y1)) (sgroup_law (monoid_sgroup (group_monoid G')) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x1) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y1)) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G'))) (@SGROUP_hom_prop (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f) x1 y1) (@Trans (sgroup_set (monoid_sgroup (group_monoid G'))) (sgroup_law (monoid_sgroup (group_monoid G')) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x1) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y1)) (sgroup_law (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')))) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G'))) (@SGROUP_comp (monoid_sgroup (group_monoid G')) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x1) (@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 G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y1) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G'))) H'1 H'2) (@MONOID_unit_l (group_monoid G') (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G'))))))) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (group_inverse G y')) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G x') x0) H'0 (@normal_com_in G (@Ker G G' f) (@kernel_normal G G' f) x0 (group_inverse G x') H')) (@SGROUP_assoc (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (group_inverse G y')) (group_inverse G x') x0)) (@SGROUP_comp (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y') (group_inverse G x'))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (group_inverse G y')) (group_inverse G x')) x0 x0 (@Sym (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (group_inverse G y')) (group_inverse G x')) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y') (group_inverse G x'))) (@SGROUP_assoc (monoid_sgroup (group_monoid G)) y0 (group_inverse G y') (group_inverse G x'))) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) x0))) (@SGROUP_comp (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x' y'))) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y') (group_inverse G x'))) x0 x0 (@SGROUP_comp (monoid_sgroup (group_monoid G)) y0 y0 (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x' y')) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y') (group_inverse G x')) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) y0) (@GROUP_inverse_law G x' y')) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) x0)))) (@SGROUP_assoc (monoid_sgroup (group_monoid G)) x0 y0 (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x' y')))) (fun x0 y0 z : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => @in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) y0 z)) (group_inverse G x0))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) z) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 z)))) (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) z) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (group_inverse G y0)) (group_inverse G x0))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) y0 z)) (group_inverse G x0))) (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 z)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) z) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (group_inverse G y0)) (group_inverse G x0))) (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y0 z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 z)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))) (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) z (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))))) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y0 z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))))) (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) z (group_inverse G z)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))))) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) z (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))))) (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))))) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) z (group_inverse G z)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))))) (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))))) (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))) (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))) (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0))) (@submonoid_in_prop (group_monoid G) (@Build_submonoid (group_monoid G) (@Build_subsgroup (monoid_sgroup (group_monoid G)) (@kernel_part G G' f) (fun (x1 y1 : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (H' : @Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x1) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G')))) (H'0 : @Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y1) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G')))) => @Trans (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (sgroup_law (monoid_sgroup (group_monoid G)) x1 y1)) (sgroup_law (monoid_sgroup (group_monoid G')) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x1) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y1)) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G'))) (@SGROUP_hom_prop (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f) x1 y1) (@Trans (sgroup_set (monoid_sgroup (group_monoid G'))) (sgroup_law (monoid_sgroup (group_monoid G')) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x1) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y1)) (sgroup_law (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')))) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G'))) (@SGROUP_comp (monoid_sgroup (group_monoid G')) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x1) (@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 G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y1) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G'))) H' H'0) (@MONOID_unit_l (group_monoid G') (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G'))))))) (@MONOID_hom_prop (group_monoid G) (group_monoid G') f))) (@GROUP_inverse_r G (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0))) (@SGROUP_comp (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0)) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0)) (@Sym (sgroup_set (monoid_sgroup (group_monoid G))) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)) (@GROUP_inverse_law G x0 y0)))) (@Sym (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))) (@SGROUP_assoc (monoid_sgroup (group_monoid G)) x0 y0 (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))))) (@SGROUP_comp (monoid_sgroup (group_monoid G)) x0 x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) x0) (@SGROUP_comp (monoid_sgroup (group_monoid G)) y0 y0 (sgroup_law (monoid_sgroup (group_monoid G)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) y0) (@MONOID_unit_l (group_monoid G) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))))) (@SGROUP_comp (monoid_sgroup (group_monoid G)) x0 x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) z (group_inverse G z)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) x0) (@SGROUP_comp (monoid_sgroup (group_monoid G)) y0 y0 (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) z (group_inverse G z)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))) (sgroup_law (monoid_sgroup (group_monoid G)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) y0) (@SGROUP_comp (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) z (group_inverse G z)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)) (@GROUP_inverse_r G z) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))))))) (@SGROUP_comp (monoid_sgroup (group_monoid G)) x0 x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) z (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))))) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) z (group_inverse G z)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) x0) (@SGROUP_comp (monoid_sgroup (group_monoid G)) y0 y0 (sgroup_law (monoid_sgroup (group_monoid G)) z (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) z (group_inverse G z)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) y0) (@Sym (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) z (group_inverse G z)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))) (sgroup_law (monoid_sgroup (group_monoid G)) z (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))) (@SGROUP_assoc (monoid_sgroup (group_monoid G)) z (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))))))) (@SGROUP_comp (monoid_sgroup (group_monoid G)) x0 x0 (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y0 z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) z (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))))) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) x0) (@SGROUP_assoc (monoid_sgroup (group_monoid G)) y0 z (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))))) (@SGROUP_assoc (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))))) (@SGROUP_comp (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) z) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 z)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (group_inverse G y0)) (group_inverse G x0)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))) (@SGROUP_assoc (monoid_sgroup (group_monoid G)) x0 y0 z) (@SGROUP_assoc (monoid_sgroup (group_monoid G)) (group_inverse G z) (group_inverse G y0) (group_inverse G x0)))) (@SGROUP_comp (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) z) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) y0 z)) (group_inverse G x0)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (group_inverse G y0)) (group_inverse G x0)) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) z)) (@SGROUP_comp (monoid_sgroup (group_monoid G)) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) y0 z)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (group_inverse G y0)) (group_inverse G x0) (group_inverse G x0) (@GROUP_inverse_law G y0 z) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) (group_inverse G x0))))) (@SGROUP_comp (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) z) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) z) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 z))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) y0 z)) (group_inverse G x0)) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) z)) (@GROUP_inverse_law G x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 z))))) x y))) (sgroup_law (@sgroup_of_subsgroup (monoid_sgroup (group_monoid G')) (@Build_subsgroup (monoid_sgroup (group_monoid G')) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) (fun (x0 y0 : Carrier (sgroup_set (monoid_sgroup (group_monoid G')))) (H' : @ex (Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (fun x1 : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => and True (@Equal (sgroup_set (monoid_sgroup (group_monoid G'))) x0 (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x1)))) (H'0 : @ex (Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (fun x1 : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => and True (@Equal (sgroup_set (monoid_sgroup (group_monoid G'))) y0 (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x1)))) => @ex_ind (Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (fun x1 : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => and True (@Equal (sgroup_set (monoid_sgroup (group_monoid G'))) y0 (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x1))) (@ex (Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (fun x1 : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => and True (@Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (sgroup_law (monoid_sgroup (group_monoid G')) x0 y0) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x1)))) (fun (x1 : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (E : and True (@Equal (sgroup_set (monoid_sgroup (group_monoid G'))) y0 (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x1))) => @and_ind True (@Equal (sgroup_set (monoid_sgroup (group_monoid G'))) y0 (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x1)) (@ex (Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (fun x2 : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => and True (@Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (sgroup_law (monoid_sgroup (group_monoid G')) x0 y0) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x2)))) (fun (_ : True) (H'2 : @Equal (sgroup_set (monoid_sgroup (group_monoid G'))) y0 (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x1)) => @ex_ind (Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (fun x2 : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => and True (@Equal (sgroup_set (monoid_sgroup (group_monoid G'))) x0 (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x2))) (@ex (Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (fun x2 : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => and True (@Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (sgroup_law (monoid_sgroup (group_monoid G')) x0 y0) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x2)))) (fun (x2 : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (E0 : and True (@Equal (sgroup_set (monoid_sgroup (group_monoid G'))) x0 (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x2))) => @and_ind True (@Equal (sgroup_set (monoid_sgroup (group_monoid G'))) x0 (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x2)) (@ex (Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (fun x3 : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => and True (@Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (sgroup_law (monoid_sgroup (group_monoid G')) x0 y0) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x3)))) (fun (H'3 : True) (H'4 : @Equal (sgroup_set (monoid_sgroup (group_monoid G'))) x0 (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x2)) => @ex_intro (Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (fun x3 : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => and True (@Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (sgroup_law (monoid_sgroup (group_monoid G')) x0 y0) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x3))) (sgroup_law (monoid_sgroup (group_monoid G)) x2 x1) (@conj True (@Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (sgroup_law (monoid_sgroup (group_monoid G')) x0 y0) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (sgroup_law (monoid_sgroup (group_monoid G)) x2 x1))) H'3 (@Trans (sgroup_set (monoid_sgroup (group_monoid G'))) (sgroup_law (monoid_sgroup (group_monoid G')) x0 y0) (sgroup_law (monoid_sgroup (group_monoid G')) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x2) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x1)) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (sgroup_law (monoid_sgroup (group_monoid G)) x2 x1)) (@SGROUP_comp (monoid_sgroup (group_monoid G')) x0 (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x2) y0 (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x1) H'4 H'2) (@Sym (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (sgroup_law (monoid_sgroup (group_monoid G)) x2 x1)) (sgroup_law (monoid_sgroup (group_monoid G')) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x2) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x1)) (@SGROUP_hom_prop (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f) x2 x1))))) E0) H') E) H'0))) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x) (@coKer_prop G G' f x)) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y) (@coKer_prop G G' f y))) *) unfold group_quo_eq, subtype_image_equal in |- *. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f))))) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (@monoid_unit (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))) (monoid_on_def (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))))) (@coKer_prop G G' f (@monoid_unit (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))) (monoid_on_def (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))))))) (@monoid_unit (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f)))) (monoid_on_def (group_monoid (@group_of_subgroup G' (@coKer G G' f))))) *) (* Goal: forall x y : Carrier (sgroup_set (monoid_sgroup (group_monoid G))), @Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@subtype_elt (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (sgroup_law (@sg (@group_quo_set G (@Ker G G' f) (@kernel_normal G G' f)) (fun x0 y0 : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) (fun (x0 x' y0 y' : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (H' : @Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (group_inverse G x'))) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G')))) (H'0 : @Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (group_inverse G y'))) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G')))) => @in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x' y')))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x' y'))) (@normal_com_in G (@Ker G G' f) (@kernel_normal G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x' y'))) x0 (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y') (group_inverse G x'))) x0) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x' y'))) x0) (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (group_inverse G y')) (group_inverse G x')) x0) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y') (group_inverse G x'))) x0) (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (group_inverse G y')) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G x') x0)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (group_inverse G y')) (group_inverse G x')) x0) (@subsgroup_in_prop (monoid_sgroup (group_monoid G)) (@Build_subsgroup (monoid_sgroup (group_monoid G)) (@kernel_part G G' f) (fun (x1 y1 : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (H'1 : @Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x1) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G')))) (H'2 : @Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y1) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G')))) => @Trans (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (sgroup_law (monoid_sgroup (group_monoid G)) x1 y1)) (sgroup_law (monoid_sgroup (group_monoid G')) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x1) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y1)) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G'))) (@SGROUP_hom_prop (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f) x1 y1) (@Trans (sgroup_set (monoid_sgroup (group_monoid G'))) (sgroup_law (monoid_sgroup (group_monoid G')) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x1) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y1)) (sgroup_law (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')))) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G'))) (@SGROUP_comp (monoid_sgroup (group_monoid G')) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x1) (@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 G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y1) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G'))) H'1 H'2) (@MONOID_unit_l (group_monoid G') (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G'))))))) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (group_inverse G y')) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G x') x0) H'0 (@normal_com_in G (@Ker G G' f) (@kernel_normal G G' f) x0 (group_inverse G x') H')) (@SGROUP_assoc (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (group_inverse G y')) (group_inverse G x') x0)) (@SGROUP_comp (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y') (group_inverse G x'))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (group_inverse G y')) (group_inverse G x')) x0 x0 (@Sym (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (group_inverse G y')) (group_inverse G x')) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y') (group_inverse G x'))) (@SGROUP_assoc (monoid_sgroup (group_monoid G)) y0 (group_inverse G y') (group_inverse G x'))) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) x0))) (@SGROUP_comp (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x' y'))) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y') (group_inverse G x'))) x0 x0 (@SGROUP_comp (monoid_sgroup (group_monoid G)) y0 y0 (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x' y')) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y') (group_inverse G x')) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) y0) (@GROUP_inverse_law G x' y')) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) x0)))) (@SGROUP_assoc (monoid_sgroup (group_monoid G)) x0 y0 (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x' y')))) (fun x0 y0 z : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => @in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) y0 z)) (group_inverse G x0))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) z) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 z)))) (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) z) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (group_inverse G y0)) (group_inverse G x0))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) y0 z)) (group_inverse G x0))) (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 z)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) z) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (group_inverse G y0)) (group_inverse G x0))) (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y0 z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 z)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))) (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) z (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))))) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y0 z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))))) (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) z (group_inverse G z)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))))) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) z (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))))) (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))))) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) z (group_inverse G z)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))))) (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))))) (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))) (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))) (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0))) (@submonoid_in_prop (group_monoid G) (@Build_submonoid (group_monoid G) (@Build_subsgroup (monoid_sgroup (group_monoid G)) (@kernel_part G G' f) (fun (x1 y1 : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (H' : @Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x1) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G')))) (H'0 : @Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y1) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G')))) => @Trans (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (sgroup_law (monoid_sgroup (group_monoid G)) x1 y1)) (sgroup_law (monoid_sgroup (group_monoid G')) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x1) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y1)) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G'))) (@SGROUP_hom_prop (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f) x1 y1) (@Trans (sgroup_set (monoid_sgroup (group_monoid G'))) (sgroup_law (monoid_sgroup (group_monoid G')) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x1) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y1)) (sgroup_law (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')))) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G'))) (@SGROUP_comp (monoid_sgroup (group_monoid G')) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x1) (@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 G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y1) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G'))) H' H'0) (@MONOID_unit_l (group_monoid G') (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G'))))))) (@MONOID_hom_prop (group_monoid G) (group_monoid G') f))) (@GROUP_inverse_r G (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0))) (@SGROUP_comp (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0)) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0)) (@Sym (sgroup_set (monoid_sgroup (group_monoid G))) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)) (@GROUP_inverse_law G x0 y0)))) (@Sym (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))) (@SGROUP_assoc (monoid_sgroup (group_monoid G)) x0 y0 (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))))) (@SGROUP_comp (monoid_sgroup (group_monoid G)) x0 x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) x0) (@SGROUP_comp (monoid_sgroup (group_monoid G)) y0 y0 (sgroup_law (monoid_sgroup (group_monoid G)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) y0) (@MONOID_unit_l (group_monoid G) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))))) (@SGROUP_comp (monoid_sgroup (group_monoid G)) x0 x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) z (group_inverse G z)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) x0) (@SGROUP_comp (monoid_sgroup (group_monoid G)) y0 y0 (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) z (group_inverse G z)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))) (sgroup_law (monoid_sgroup (group_monoid G)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) y0) (@SGROUP_comp (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) z (group_inverse G z)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)) (@GROUP_inverse_r G z) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))))))) (@SGROUP_comp (monoid_sgroup (group_monoid G)) x0 x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) z (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))))) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) z (group_inverse G z)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) x0) (@SGROUP_comp (monoid_sgroup (group_monoid G)) y0 y0 (sgroup_law (monoid_sgroup (group_monoid G)) z (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) z (group_inverse G z)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) y0) (@Sym (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) z (group_inverse G z)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))) (sgroup_law (monoid_sgroup (group_monoid G)) z (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))) (@SGROUP_assoc (monoid_sgroup (group_monoid G)) z (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))))))) (@SGROUP_comp (monoid_sgroup (group_monoid G)) x0 x0 (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y0 z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) z (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))))) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) x0) (@SGROUP_assoc (monoid_sgroup (group_monoid G)) y0 z (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))))) (@SGROUP_assoc (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))))) (@SGROUP_comp (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) z) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 z)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (group_inverse G y0)) (group_inverse G x0)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))) (@SGROUP_assoc (monoid_sgroup (group_monoid G)) x0 y0 z) (@SGROUP_assoc (monoid_sgroup (group_monoid G)) (group_inverse G z) (group_inverse G y0) (group_inverse G x0)))) (@SGROUP_comp (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) z) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) y0 z)) (group_inverse G x0)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (group_inverse G y0)) (group_inverse G x0)) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) z)) (@SGROUP_comp (monoid_sgroup (group_monoid G)) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) y0 z)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (group_inverse G y0)) (group_inverse G x0) (group_inverse G x0) (@GROUP_inverse_law G y0 z) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) (group_inverse G x0))))) (@SGROUP_comp (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) z) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) z) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 z))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) y0 z)) (group_inverse G x0)) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) z)) (@GROUP_inverse_law G x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 z))))) x y)) (@coKer_prop G G' f (sgroup_law (@sg (@group_quo_set G (@Ker G G' f) (@kernel_normal G G' f)) (fun x0 y0 : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) (fun (x0 x' y0 y' : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (H' : @Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (group_inverse G x'))) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G')))) (H'0 : @Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (group_inverse G y'))) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G')))) => @in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x' y')))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x' y'))) (@normal_com_in G (@Ker G G' f) (@kernel_normal G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x' y'))) x0 (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y') (group_inverse G x'))) x0) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x' y'))) x0) (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (group_inverse G y')) (group_inverse G x')) x0) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y') (group_inverse G x'))) x0) (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (group_inverse G y')) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G x') x0)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (group_inverse G y')) (group_inverse G x')) x0) (@subsgroup_in_prop (monoid_sgroup (group_monoid G)) (@Build_subsgroup (monoid_sgroup (group_monoid G)) (@kernel_part G G' f) (fun (x1 y1 : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (H'1 : @Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x1) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G')))) (H'2 : @Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y1) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G')))) => @Trans (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (sgroup_law (monoid_sgroup (group_monoid G)) x1 y1)) (sgroup_law (monoid_sgroup (group_monoid G')) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x1) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y1)) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G'))) (@SGROUP_hom_prop (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f) x1 y1) (@Trans (sgroup_set (monoid_sgroup (group_monoid G'))) (sgroup_law (monoid_sgroup (group_monoid G')) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x1) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y1)) (sgroup_law (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')))) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G'))) (@SGROUP_comp (monoid_sgroup (group_monoid G')) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x1) (@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 G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y1) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G'))) H'1 H'2) (@MONOID_unit_l (group_monoid G') (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G'))))))) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (group_inverse G y')) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G x') x0) H'0 (@normal_com_in G (@Ker G G' f) (@kernel_normal G G' f) x0 (group_inverse G x') H')) (@SGROUP_assoc (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (group_inverse G y')) (group_inverse G x') x0)) (@SGROUP_comp (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y') (group_inverse G x'))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (group_inverse G y')) (group_inverse G x')) x0 x0 (@Sym (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (group_inverse G y')) (group_inverse G x')) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y') (group_inverse G x'))) (@SGROUP_assoc (monoid_sgroup (group_monoid G)) y0 (group_inverse G y') (group_inverse G x'))) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) x0))) (@SGROUP_comp (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x' y'))) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y') (group_inverse G x'))) x0 x0 (@SGROUP_comp (monoid_sgroup (group_monoid G)) y0 y0 (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x' y')) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y') (group_inverse G x')) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) y0) (@GROUP_inverse_law G x' y')) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) x0)))) (@SGROUP_assoc (monoid_sgroup (group_monoid G)) x0 y0 (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x' y')))) (fun x0 y0 z : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => @in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) y0 z)) (group_inverse G x0))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) z) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 z)))) (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) z) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (group_inverse G y0)) (group_inverse G x0))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) y0 z)) (group_inverse G x0))) (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 z)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) z) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (group_inverse G y0)) (group_inverse G x0))) (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y0 z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 z)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))) (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) z (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))))) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y0 z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))))) (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) z (group_inverse G z)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))))) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) z (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))))) (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))))) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) z (group_inverse G z)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))))) (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))))) (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))) (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))) (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0))) (@submonoid_in_prop (group_monoid G) (@Build_submonoid (group_monoid G) (@Build_subsgroup (monoid_sgroup (group_monoid G)) (@kernel_part G G' f) (fun (x1 y1 : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (H' : @Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x1) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G')))) (H'0 : @Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y1) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G')))) => @Trans (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (sgroup_law (monoid_sgroup (group_monoid G)) x1 y1)) (sgroup_law (monoid_sgroup (group_monoid G')) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x1) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y1)) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G'))) (@SGROUP_hom_prop (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f) x1 y1) (@Trans (sgroup_set (monoid_sgroup (group_monoid G'))) (sgroup_law (monoid_sgroup (group_monoid G')) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x1) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y1)) (sgroup_law (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')))) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G'))) (@SGROUP_comp (monoid_sgroup (group_monoid G')) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x1) (@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 G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y1) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G'))) H' H'0) (@MONOID_unit_l (group_monoid G') (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G'))))))) (@MONOID_hom_prop (group_monoid G) (group_monoid G') f))) (@GROUP_inverse_r G (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0))) (@SGROUP_comp (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0)) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0)) (@Sym (sgroup_set (monoid_sgroup (group_monoid G))) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)) (@GROUP_inverse_law G x0 y0)))) (@Sym (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))) (@SGROUP_assoc (monoid_sgroup (group_monoid G)) x0 y0 (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))))) (@SGROUP_comp (monoid_sgroup (group_monoid G)) x0 x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) x0) (@SGROUP_comp (monoid_sgroup (group_monoid G)) y0 y0 (sgroup_law (monoid_sgroup (group_monoid G)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) y0) (@MONOID_unit_l (group_monoid G) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))))) (@SGROUP_comp (monoid_sgroup (group_monoid G)) x0 x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) z (group_inverse G z)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) x0) (@SGROUP_comp (monoid_sgroup (group_monoid G)) y0 y0 (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) z (group_inverse G z)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))) (sgroup_law (monoid_sgroup (group_monoid G)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) y0) (@SGROUP_comp (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) z (group_inverse G z)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)) (@GROUP_inverse_r G z) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))))))) (@SGROUP_comp (monoid_sgroup (group_monoid G)) x0 x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) z (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))))) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) z (group_inverse G z)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) x0) (@SGROUP_comp (monoid_sgroup (group_monoid G)) y0 y0 (sgroup_law (monoid_sgroup (group_monoid G)) z (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) z (group_inverse G z)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) y0) (@Sym (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) z (group_inverse G z)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))) (sgroup_law (monoid_sgroup (group_monoid G)) z (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))) (@SGROUP_assoc (monoid_sgroup (group_monoid G)) z (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))))))) (@SGROUP_comp (monoid_sgroup (group_monoid G)) x0 x0 (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y0 z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) z (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))))) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) x0) (@SGROUP_assoc (monoid_sgroup (group_monoid G)) y0 z (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))))) (@SGROUP_assoc (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))))) (@SGROUP_comp (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) z) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 z)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (group_inverse G y0)) (group_inverse G x0)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))) (@SGROUP_assoc (monoid_sgroup (group_monoid G)) x0 y0 z) (@SGROUP_assoc (monoid_sgroup (group_monoid G)) (group_inverse G z) (group_inverse G y0) (group_inverse G x0)))) (@SGROUP_comp (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) z) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) y0 z)) (group_inverse G x0)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (group_inverse G y0)) (group_inverse G x0)) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) z)) (@SGROUP_comp (monoid_sgroup (group_monoid G)) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) y0 z)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (group_inverse G y0)) (group_inverse G x0) (group_inverse G x0) (@GROUP_inverse_law G y0 z) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) (group_inverse G x0))))) (@SGROUP_comp (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) z) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) z) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 z))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) y0 z)) (group_inverse G x0)) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) z)) (@GROUP_inverse_law G x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 z))))) x y)))) (@subtype_elt (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) (sgroup_law (@sgroup_of_subsgroup (monoid_sgroup (group_monoid G')) (@Build_subsgroup (monoid_sgroup (group_monoid G')) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) (fun (x0 y0 : Carrier (sgroup_set (monoid_sgroup (group_monoid G')))) (H' : @ex (Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (fun x1 : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => and True (@Equal (sgroup_set (monoid_sgroup (group_monoid G'))) x0 (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x1)))) (H'0 : @ex (Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (fun x1 : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => and True (@Equal (sgroup_set (monoid_sgroup (group_monoid G'))) y0 (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x1)))) => @ex_ind (Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (fun x1 : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => and True (@Equal (sgroup_set (monoid_sgroup (group_monoid G'))) y0 (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x1))) (@ex (Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (fun x1 : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => and True (@Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (sgroup_law (monoid_sgroup (group_monoid G')) x0 y0) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x1)))) (fun (x1 : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (E : and True (@Equal (sgroup_set (monoid_sgroup (group_monoid G'))) y0 (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x1))) => @and_ind True (@Equal (sgroup_set (monoid_sgroup (group_monoid G'))) y0 (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x1)) (@ex (Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (fun x2 : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => and True (@Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (sgroup_law (monoid_sgroup (group_monoid G')) x0 y0) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x2)))) (fun (_ : True) (H'2 : @Equal (sgroup_set (monoid_sgroup (group_monoid G'))) y0 (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x1)) => @ex_ind (Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (fun x2 : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => and True (@Equal (sgroup_set (monoid_sgroup (group_monoid G'))) x0 (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x2))) (@ex (Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (fun x2 : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => and True (@Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (sgroup_law (monoid_sgroup (group_monoid G')) x0 y0) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x2)))) (fun (x2 : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (E0 : and True (@Equal (sgroup_set (monoid_sgroup (group_monoid G'))) x0 (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x2))) => @and_ind True (@Equal (sgroup_set (monoid_sgroup (group_monoid G'))) x0 (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x2)) (@ex (Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (fun x3 : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => and True (@Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (sgroup_law (monoid_sgroup (group_monoid G')) x0 y0) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x3)))) (fun (H'3 : True) (H'4 : @Equal (sgroup_set (monoid_sgroup (group_monoid G'))) x0 (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x2)) => @ex_intro (Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (fun x3 : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => and True (@Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (sgroup_law (monoid_sgroup (group_monoid G')) x0 y0) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x3))) (sgroup_law (monoid_sgroup (group_monoid G)) x2 x1) (@conj True (@Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (sgroup_law (monoid_sgroup (group_monoid G')) x0 y0) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (sgroup_law (monoid_sgroup (group_monoid G)) x2 x1))) H'3 (@Trans (sgroup_set (monoid_sgroup (group_monoid G'))) (sgroup_law (monoid_sgroup (group_monoid G')) x0 y0) (sgroup_law (monoid_sgroup (group_monoid G')) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x2) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x1)) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (sgroup_law (monoid_sgroup (group_monoid G)) x2 x1)) (@SGROUP_comp (monoid_sgroup (group_monoid G')) x0 (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x2) y0 (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x1) H'4 H'2) (@Sym (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (sgroup_law (monoid_sgroup (group_monoid G)) x2 x1)) (sgroup_law (monoid_sgroup (group_monoid G')) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x2) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x1)) (@SGROUP_hom_prop (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f) x2 x1))))) E0) H') E) H'0))) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x) (@coKer_prop G G' f x)) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y) (@coKer_prop G G' f y)))) *) simpl in |- *. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f))))) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (@monoid_unit (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))) (monoid_on_def (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))))) (@coKer_prop G G' f (@monoid_unit (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))) (monoid_on_def (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))))))) (@monoid_unit (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f)))) (monoid_on_def (group_monoid (@group_of_subgroup G' (@coKer G G' f))))) *) (* Goal: forall x y : Carrier (sgroup_set (monoid_sgroup (group_monoid G))), @Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (sgroup_law (@sg (@group_quo_set G (@Ker G G' f) (@kernel_normal G G' f)) (fun x0 y0 : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) (fun (x0 x' y0 y' : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (H' : @Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (group_inverse G x'))) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G')))) (H'0 : @Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (group_inverse G y'))) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G')))) => @in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x' y')))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x' y'))) (@normal_com_in G (@Ker G G' f) (@kernel_normal G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x' y'))) x0 (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y') (group_inverse G x'))) x0) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x' y'))) x0) (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (group_inverse G y')) (group_inverse G x')) x0) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y') (group_inverse G x'))) x0) (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (group_inverse G y')) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G x') x0)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (group_inverse G y')) (group_inverse G x')) x0) (@subsgroup_in_prop (monoid_sgroup (group_monoid G)) (@Build_subsgroup (monoid_sgroup (group_monoid G)) (@kernel_part G G' f) (fun (x1 y1 : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (H'1 : @Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x1) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G')))) (H'2 : @Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y1) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G')))) => @Trans (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (sgroup_law (monoid_sgroup (group_monoid G)) x1 y1)) (sgroup_law (monoid_sgroup (group_monoid G')) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x1) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y1)) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G'))) (@SGROUP_hom_prop (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f) x1 y1) (@Trans (sgroup_set (monoid_sgroup (group_monoid G'))) (sgroup_law (monoid_sgroup (group_monoid G')) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x1) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y1)) (sgroup_law (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')))) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G'))) (@SGROUP_comp (monoid_sgroup (group_monoid G')) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x1) (@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 G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y1) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G'))) H'1 H'2) (@MONOID_unit_l (group_monoid G') (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G'))))))) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (group_inverse G y')) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G x') x0) H'0 (@normal_com_in G (@Ker G G' f) (@kernel_normal G G' f) x0 (group_inverse G x') H')) (@SGROUP_assoc (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (group_inverse G y')) (group_inverse G x') x0)) (@SGROUP_comp (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y') (group_inverse G x'))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (group_inverse G y')) (group_inverse G x')) x0 x0 (@Sym (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (group_inverse G y')) (group_inverse G x')) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y') (group_inverse G x'))) (@SGROUP_assoc (monoid_sgroup (group_monoid G)) y0 (group_inverse G y') (group_inverse G x'))) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) x0))) (@SGROUP_comp (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x' y'))) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y') (group_inverse G x'))) x0 x0 (@SGROUP_comp (monoid_sgroup (group_monoid G)) y0 y0 (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x' y')) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y') (group_inverse G x')) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) y0) (@GROUP_inverse_law G x' y')) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) x0)))) (@SGROUP_assoc (monoid_sgroup (group_monoid G)) x0 y0 (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x' y')))) (fun x0 y0 z : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => @in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) y0 z)) (group_inverse G x0))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) z) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 z)))) (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) z) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (group_inverse G y0)) (group_inverse G x0))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) y0 z)) (group_inverse G x0))) (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 z)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) z) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (group_inverse G y0)) (group_inverse G x0))) (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y0 z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 z)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))) (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) z (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))))) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y0 z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))))) (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) z (group_inverse G z)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))))) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) z (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))))) (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))))) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) z (group_inverse G z)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))))) (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))))) (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))) (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))) (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0))) (@submonoid_in_prop (group_monoid G) (@Build_submonoid (group_monoid G) (@Build_subsgroup (monoid_sgroup (group_monoid G)) (@kernel_part G G' f) (fun (x1 y1 : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (H' : @Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x1) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G')))) (H'0 : @Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y1) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G')))) => @Trans (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (sgroup_law (monoid_sgroup (group_monoid G)) x1 y1)) (sgroup_law (monoid_sgroup (group_monoid G')) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x1) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y1)) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G'))) (@SGROUP_hom_prop (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f) x1 y1) (@Trans (sgroup_set (monoid_sgroup (group_monoid G'))) (sgroup_law (monoid_sgroup (group_monoid G')) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x1) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y1)) (sgroup_law (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')))) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G'))) (@SGROUP_comp (monoid_sgroup (group_monoid G')) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x1) (@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 G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y1) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G'))) H' H'0) (@MONOID_unit_l (group_monoid G') (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G'))))))) (@MONOID_hom_prop (group_monoid G) (group_monoid G') f))) (@GROUP_inverse_r G (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0))) (@SGROUP_comp (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0)) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0)) (@Sym (sgroup_set (monoid_sgroup (group_monoid G))) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)) (@GROUP_inverse_law G x0 y0)))) (@Sym (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))) (@SGROUP_assoc (monoid_sgroup (group_monoid G)) x0 y0 (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))))) (@SGROUP_comp (monoid_sgroup (group_monoid G)) x0 x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) x0) (@SGROUP_comp (monoid_sgroup (group_monoid G)) y0 y0 (sgroup_law (monoid_sgroup (group_monoid G)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) y0) (@MONOID_unit_l (group_monoid G) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))))) (@SGROUP_comp (monoid_sgroup (group_monoid G)) x0 x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) z (group_inverse G z)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) x0) (@SGROUP_comp (monoid_sgroup (group_monoid G)) y0 y0 (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) z (group_inverse G z)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))) (sgroup_law (monoid_sgroup (group_monoid G)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) y0) (@SGROUP_comp (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) z (group_inverse G z)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)) (@GROUP_inverse_r G z) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))))))) (@SGROUP_comp (monoid_sgroup (group_monoid G)) x0 x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) z (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))))) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) z (group_inverse G z)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) x0) (@SGROUP_comp (monoid_sgroup (group_monoid G)) y0 y0 (sgroup_law (monoid_sgroup (group_monoid G)) z (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) z (group_inverse G z)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) y0) (@Sym (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) z (group_inverse G z)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))) (sgroup_law (monoid_sgroup (group_monoid G)) z (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))) (@SGROUP_assoc (monoid_sgroup (group_monoid G)) z (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))))))) (@SGROUP_comp (monoid_sgroup (group_monoid G)) x0 x0 (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y0 z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))) (sgroup_law (monoid_sgroup (group_monoid G)) y0 (sgroup_law (monoid_sgroup (group_monoid G)) z (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))))) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) x0) (@SGROUP_assoc (monoid_sgroup (group_monoid G)) y0 z (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0)))))) (@SGROUP_assoc (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))))) (@SGROUP_comp (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) z) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 z)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (group_inverse G y0)) (group_inverse G x0)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y0) (group_inverse G x0))) (@SGROUP_assoc (monoid_sgroup (group_monoid G)) x0 y0 z) (@SGROUP_assoc (monoid_sgroup (group_monoid G)) (group_inverse G z) (group_inverse G y0) (group_inverse G x0)))) (@SGROUP_comp (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) z) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) y0 z)) (group_inverse G x0)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (group_inverse G y0)) (group_inverse G x0)) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) z)) (@SGROUP_comp (monoid_sgroup (group_monoid G)) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) y0 z)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (group_inverse G y0)) (group_inverse G x0) (group_inverse G x0) (@GROUP_inverse_law G y0 z) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) (group_inverse G x0))))) (@SGROUP_comp (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) z) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) z) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 z))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) y0 z)) (group_inverse G x0)) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0) z)) (@GROUP_inverse_law G x0 (sgroup_law (monoid_sgroup (group_monoid G)) y0 z))))) x y)) (sgroup_law (monoid_sgroup (group_monoid G')) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y)) *) intros x y; try assumption. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f))))) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (@monoid_unit (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))) (monoid_on_def (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))))) (@coKer_prop G G' f (@monoid_unit (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))) (monoid_on_def (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))))))) (@monoid_unit (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f)))) (monoid_on_def (group_monoid (@group_of_subgroup G' (@coKer G G' f))))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (sgroup_law (@sg (@group_quo_set G (@Ker G G' f) (@kernel_normal G G' f)) (fun x y : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => sgroup_law (monoid_sgroup (group_monoid G)) x y) (fun (x x' y y' : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (H' : @Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (sgroup_law (monoid_sgroup (group_monoid G)) x (group_inverse G x'))) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G')))) (H'0 : @Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (sgroup_law (monoid_sgroup (group_monoid G)) y (group_inverse G y'))) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G')))) => @in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) x (sgroup_law (monoid_sgroup (group_monoid G)) y (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x' y')))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x y) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x' y'))) (@normal_com_in G (@Ker G G' f) (@kernel_normal G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) y (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x' y'))) x (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y') (group_inverse G x'))) x) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x' y'))) x) (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y (group_inverse G y')) (group_inverse G x')) x) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y') (group_inverse G x'))) x) (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y (group_inverse G y')) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G x') x)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y (group_inverse G y')) (group_inverse G x')) x) (@subsgroup_in_prop (monoid_sgroup (group_monoid G)) (@Build_subsgroup (monoid_sgroup (group_monoid G)) (@kernel_part G G' f) (fun (x0 y0 : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (H'1 : @Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x0) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G')))) (H'2 : @Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y0) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G')))) => @Trans (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0)) (sgroup_law (monoid_sgroup (group_monoid G')) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x0) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y0)) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G'))) (@SGROUP_hom_prop (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f) x0 y0) (@Trans (sgroup_set (monoid_sgroup (group_monoid G'))) (sgroup_law (monoid_sgroup (group_monoid G')) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x0) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y0)) (sgroup_law (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')))) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G'))) (@SGROUP_comp (monoid_sgroup (group_monoid G')) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x0) (@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 G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y0) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G'))) H'1 H'2) (@MONOID_unit_l (group_monoid G') (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G'))))))) (sgroup_law (monoid_sgroup (group_monoid G)) y (group_inverse G y')) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G x') x) H'0 (@normal_com_in G (@Ker G G' f) (@kernel_normal G G' f) x (group_inverse G x') H')) (@SGROUP_assoc (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y (group_inverse G y')) (group_inverse G x') x)) (@SGROUP_comp (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y') (group_inverse G x'))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y (group_inverse G y')) (group_inverse G x')) x x (@Sym (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y (group_inverse G y')) (group_inverse G x')) (sgroup_law (monoid_sgroup (group_monoid G)) y (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y') (group_inverse G x'))) (@SGROUP_assoc (monoid_sgroup (group_monoid G)) y (group_inverse G y') (group_inverse G x'))) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) x))) (@SGROUP_comp (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x' y'))) (sgroup_law (monoid_sgroup (group_monoid G)) y (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y') (group_inverse G x'))) x x (@SGROUP_comp (monoid_sgroup (group_monoid G)) y y (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x' y')) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y') (group_inverse G x')) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) y) (@GROUP_inverse_law G x' y')) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) x)))) (@SGROUP_assoc (monoid_sgroup (group_monoid G)) x y (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x' y')))) (fun x y z : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => @in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x y) z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) y z)) (group_inverse G x))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x y) z) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x (sgroup_law (monoid_sgroup (group_monoid G)) y z)))) (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x y) z) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (group_inverse G y)) (group_inverse G x))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x y) z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) y z)) (group_inverse G x))) (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x (sgroup_law (monoid_sgroup (group_monoid G)) y z)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y) (group_inverse G x)))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x y) z) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (group_inverse G y)) (group_inverse G x))) (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) x (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y) (group_inverse G x))))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x (sgroup_law (monoid_sgroup (group_monoid G)) y z)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y) (group_inverse G x)))) (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) x (sgroup_law (monoid_sgroup (group_monoid G)) y (sgroup_law (monoid_sgroup (group_monoid G)) z (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y) (group_inverse G x)))))) (sgroup_law (monoid_sgroup (group_monoid G)) x (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y) (group_inverse G x))))) (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) x (sgroup_law (monoid_sgroup (group_monoid G)) y (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) z (group_inverse G z)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y) (group_inverse G x))))) (sgroup_law (monoid_sgroup (group_monoid G)) x (sgroup_law (monoid_sgroup (group_monoid G)) y (sgroup_law (monoid_sgroup (group_monoid G)) z (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y) (group_inverse G x)))))) (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) x (sgroup_law (monoid_sgroup (group_monoid G)) y (sgroup_law (monoid_sgroup (group_monoid G)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y) (group_inverse G x))))) (sgroup_law (monoid_sgroup (group_monoid G)) x (sgroup_law (monoid_sgroup (group_monoid G)) y (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) z (group_inverse G z)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y) (group_inverse G x))))) (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) x (sgroup_law (monoid_sgroup (group_monoid G)) y (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y) (group_inverse G x)))) (sgroup_law (monoid_sgroup (group_monoid G)) x (sgroup_law (monoid_sgroup (group_monoid G)) y (sgroup_law (monoid_sgroup (group_monoid G)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y) (group_inverse G x))))) (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x y) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y) (group_inverse G x))) (sgroup_law (monoid_sgroup (group_monoid G)) x (sgroup_law (monoid_sgroup (group_monoid G)) y (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y) (group_inverse G x)))) (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x y) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x y))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x y) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y) (group_inverse G x))) (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x y) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x y))) (@submonoid_in_prop (group_monoid G) (@Build_submonoid (group_monoid G) (@Build_subsgroup (monoid_sgroup (group_monoid G)) (@kernel_part G G' f) (fun (x0 y0 : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (H' : @Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x0) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G')))) (H'0 : @Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y0) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G')))) => @Trans (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0)) (sgroup_law (monoid_sgroup (group_monoid G')) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x0) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y0)) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G'))) (@SGROUP_hom_prop (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f) x0 y0) (@Trans (sgroup_set (monoid_sgroup (group_monoid G'))) (sgroup_law (monoid_sgroup (group_monoid G')) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x0) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y0)) (sgroup_law (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')))) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G'))) (@SGROUP_comp (monoid_sgroup (group_monoid G')) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x0) (@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 G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y0) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G'))) H' H'0) (@MONOID_unit_l (group_monoid G') (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G'))))))) (@MONOID_hom_prop (group_monoid G) (group_monoid G') f))) (@GROUP_inverse_r G (sgroup_law (monoid_sgroup (group_monoid G)) x y))) (@SGROUP_comp (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x y) (sgroup_law (monoid_sgroup (group_monoid G)) x y) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y) (group_inverse G x)) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x y)) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) x y)) (@Sym (sgroup_set (monoid_sgroup (group_monoid G))) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x y)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y) (group_inverse G x)) (@GROUP_inverse_law G x y)))) (@Sym (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x y) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y) (group_inverse G x))) (sgroup_law (monoid_sgroup (group_monoid G)) x (sgroup_law (monoid_sgroup (group_monoid G)) y (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y) (group_inverse G x)))) (@SGROUP_assoc (monoid_sgroup (group_monoid G)) x y (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y) (group_inverse G x))))) (@SGROUP_comp (monoid_sgroup (group_monoid G)) x x (sgroup_law (monoid_sgroup (group_monoid G)) y (sgroup_law (monoid_sgroup (group_monoid G)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y) (group_inverse G x)))) (sgroup_law (monoid_sgroup (group_monoid G)) y (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y) (group_inverse G x))) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) x) (@SGROUP_comp (monoid_sgroup (group_monoid G)) y y (sgroup_law (monoid_sgroup (group_monoid G)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y) (group_inverse G x))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y) (group_inverse G x)) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) y) (@MONOID_unit_l (group_monoid G) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y) (group_inverse G x)))))) (@SGROUP_comp (monoid_sgroup (group_monoid G)) x x (sgroup_law (monoid_sgroup (group_monoid G)) y (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) z (group_inverse G z)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y) (group_inverse G x)))) (sgroup_law (monoid_sgroup (group_monoid G)) y (sgroup_law (monoid_sgroup (group_monoid G)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y) (group_inverse G x)))) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) x) (@SGROUP_comp (monoid_sgroup (group_monoid G)) y y (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) z (group_inverse G z)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y) (group_inverse G x))) (sgroup_law (monoid_sgroup (group_monoid G)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y) (group_inverse G x))) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) y) (@SGROUP_comp (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) z (group_inverse G z)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y) (group_inverse G x)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y) (group_inverse G x)) (@GROUP_inverse_r G z) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y) (group_inverse G x))))))) (@SGROUP_comp (monoid_sgroup (group_monoid G)) x x (sgroup_law (monoid_sgroup (group_monoid G)) y (sgroup_law (monoid_sgroup (group_monoid G)) z (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y) (group_inverse G x))))) (sgroup_law (monoid_sgroup (group_monoid G)) y (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) z (group_inverse G z)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y) (group_inverse G x)))) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) x) (@SGROUP_comp (monoid_sgroup (group_monoid G)) y y (sgroup_law (monoid_sgroup (group_monoid G)) z (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y) (group_inverse G x)))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) z (group_inverse G z)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y) (group_inverse G x))) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) y) (@Sym (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) z (group_inverse G z)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y) (group_inverse G x))) (sgroup_law (monoid_sgroup (group_monoid G)) z (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y) (group_inverse G x)))) (@SGROUP_assoc (monoid_sgroup (group_monoid G)) z (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y) (group_inverse G x))))))) (@SGROUP_comp (monoid_sgroup (group_monoid G)) x x (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) y z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y) (group_inverse G x)))) (sgroup_law (monoid_sgroup (group_monoid G)) y (sgroup_law (monoid_sgroup (group_monoid G)) z (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y) (group_inverse G x))))) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) x) (@SGROUP_assoc (monoid_sgroup (group_monoid G)) y z (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y) (group_inverse G x)))))) (@SGROUP_assoc (monoid_sgroup (group_monoid G)) x (sgroup_law (monoid_sgroup (group_monoid G)) y z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y) (group_inverse G x))))) (@SGROUP_comp (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x y) z) (sgroup_law (monoid_sgroup (group_monoid G)) x (sgroup_law (monoid_sgroup (group_monoid G)) y z)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (group_inverse G y)) (group_inverse G x)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y) (group_inverse G x))) (@SGROUP_assoc (monoid_sgroup (group_monoid G)) x y z) (@SGROUP_assoc (monoid_sgroup (group_monoid G)) (group_inverse G z) (group_inverse G y) (group_inverse G x)))) (@SGROUP_comp (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x y) z) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x y) z) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) y z)) (group_inverse G x)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (group_inverse G y)) (group_inverse G x)) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x y) z)) (@SGROUP_comp (monoid_sgroup (group_monoid G)) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) y z)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G z) (group_inverse G y)) (group_inverse G x) (group_inverse G x) (@GROUP_inverse_law G y z) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) (group_inverse G x))))) (@SGROUP_comp (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x y) z) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x y) z) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x (sgroup_law (monoid_sgroup (group_monoid G)) y z))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) y z)) (group_inverse G x)) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) x y) z)) (@GROUP_inverse_law G x (sgroup_law (monoid_sgroup (group_monoid G)) y z))))) x y)) (sgroup_law (monoid_sgroup (group_monoid G')) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y)) *) exact (SGROUP_hom_prop f x y). (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f))))) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (@monoid_unit (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))) (monoid_on_def (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))))) (@coKer_prop G G' f (@monoid_unit (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))) (monoid_on_def (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))))))) (@monoid_unit (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f)))) (monoid_on_def (group_monoid (@group_of_subgroup G' (@coKer G G' f))))) *) simpl in |- *. (* Goal: @subtype_image_equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G)))))) (@subtype_elt (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G)))))) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G)))) (@coKer_prop G G' f (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))))) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G'))) (@ex_intro (Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (fun x : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => and True (@Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@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 G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) (@conj True (@Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@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 G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))))) I (@Sym (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (@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'))) (@MONOID_hom_prop (group_monoid G) (group_monoid G') f))))) *) unfold group_quo_eq, subtype_image_equal in |- *. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@subtype_elt (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G)))) (@coKer_prop G G' f (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G)))))) (@subtype_elt (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G'))) (@ex_intro (Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (fun x : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => and True (@Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@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 G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) (@conj True (@Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@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 G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))))) I (@Sym (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (@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'))) (@MONOID_hom_prop (group_monoid G) (group_monoid G') f)))))) *) simpl in |- *. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (@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 algebra. Qed. Lemma bij_group_quo_ker_coKer_bijective : bijective bij_group_quo_ker_coKer. Proof. (* Goal: @bijective (sgroup_set (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))))) (sgroup_set (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f))))) (@sgroup_map (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))) (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f)))) (@monoid_sgroup_hom (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))) (group_monoid (@group_of_subgroup G' (@coKer G G' f))) bij_group_quo_ker_coKer)) *) red in |- *. (* Goal: and (@injective (sgroup_set (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))))) (sgroup_set (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f))))) (@sgroup_map (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))) (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f)))) (@monoid_sgroup_hom (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))) (group_monoid (@group_of_subgroup G' (@coKer G G' f))) bij_group_quo_ker_coKer))) (@surjective (sgroup_set (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))))) (sgroup_set (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f))))) (@sgroup_map (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))) (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f)))) (@monoid_sgroup_hom (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))) (group_monoid (@group_of_subgroup G' (@coKer G G' f))) bij_group_quo_ker_coKer))) *) split; [ try assumption | idtac ]. (* Goal: @surjective (sgroup_set (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))))) (sgroup_set (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f))))) (@sgroup_map (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))) (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f)))) (@monoid_sgroup_hom (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))) (group_monoid (@group_of_subgroup G' (@coKer G G' f))) bij_group_quo_ker_coKer)) *) (* Goal: @injective (sgroup_set (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))))) (sgroup_set (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f))))) (@sgroup_map (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))) (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f)))) (@monoid_sgroup_hom (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))) (group_monoid (@group_of_subgroup G' (@coKer G G' f))) bij_group_quo_ker_coKer)) *) red in |- *. (* Goal: @surjective (sgroup_set (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))))) (sgroup_set (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f))))) (@sgroup_map (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))) (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f)))) (@monoid_sgroup_hom (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))) (group_monoid (@group_of_subgroup G' (@coKer G G' f))) bij_group_quo_ker_coKer)) *) (* Goal: forall (x y : Carrier (sgroup_set (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))))) (sgroup_set (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f))))) (@sgroup_map (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))) (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f)))) (@monoid_sgroup_hom (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))) (group_monoid (@group_of_subgroup G' (@coKer G G' f))) bij_group_quo_ker_coKer)) x) (@Ap (sgroup_set (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))))) (sgroup_set (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f))))) (@sgroup_map (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))) (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f)))) (@monoid_sgroup_hom (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))) (group_monoid (@group_of_subgroup G' (@coKer G G' f))) bij_group_quo_ker_coKer)) y)), @Equal (sgroup_set (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))))) x y *) simpl in |- *. (* Goal: @surjective (sgroup_set (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))))) (sgroup_set (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f))))) (@sgroup_map (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))) (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f)))) (@monoid_sgroup_hom (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))) (group_monoid (@group_of_subgroup G' (@coKer G G' f))) bij_group_quo_ker_coKer)) *) (* Goal: forall (x y : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (_ : @subtype_image_equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G)))))) (@subtype_elt (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G)))))) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x) (@coKer_prop G G' f x)) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y) (@coKer_prop G G' f y))), @group_quo_eq G (@Ker G G' f) x y *) unfold group_quo_eq, subtype_image_equal in |- *. (* Goal: @surjective (sgroup_set (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))))) (sgroup_set (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f))))) (@sgroup_map (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))) (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f)))) (@monoid_sgroup_hom (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))) (group_monoid (@group_of_subgroup G' (@coKer G G' f))) bij_group_quo_ker_coKer)) *) (* Goal: forall (x y : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@subtype_elt (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x) (@coKer_prop G G' f x))) (@subtype_elt (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y) (@coKer_prop G G' f y)))), @in_part (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) x (group_inverse G y)) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) (@subgroup_submonoid G (@Ker G G' f)))) *) simpl in |- *. (* Goal: @surjective (sgroup_set (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))))) (sgroup_set (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f))))) (@sgroup_map (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))) (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f)))) (@monoid_sgroup_hom (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))) (group_monoid (@group_of_subgroup G' (@coKer G G' f))) bij_group_quo_ker_coKer)) *) (* Goal: forall (x y : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y)), @Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (sgroup_law (monoid_sgroup (group_monoid G)) x (group_inverse G y))) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G'))) *) intros x y H'; try assumption. (* Goal: @surjective (sgroup_set (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))))) (sgroup_set (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f))))) (@sgroup_map (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))) (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f)))) (@monoid_sgroup_hom (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))) (group_monoid (@group_of_subgroup G' (@coKer G G' f))) bij_group_quo_ker_coKer)) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (sgroup_law (monoid_sgroup (group_monoid G)) x (group_inverse G y))) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G'))) *) apply Trans with (sgroup_law G' (Ap (sgroup_map (monoid_sgroup_hom f)) x) (Ap (sgroup_map (monoid_sgroup_hom f)) (group_inverse G y))); auto with algebra. (* Goal: @surjective (sgroup_set (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))))) (sgroup_set (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f))))) (@sgroup_map (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))) (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f)))) (@monoid_sgroup_hom (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))) (group_monoid (@group_of_subgroup G' (@coKer G G' f))) bij_group_quo_ker_coKer)) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (sgroup_law (monoid_sgroup (group_monoid G')) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (group_inverse G y))) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G'))) *) apply Trans with (sgroup_law G' (Ap (sgroup_map (monoid_sgroup_hom f)) x) (group_inverse _ (Ap (sgroup_map (monoid_sgroup_hom f)) y))); auto with algebra. (* Goal: @surjective (sgroup_set (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))))) (sgroup_set (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f))))) (@sgroup_map (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))) (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f)))) (@monoid_sgroup_hom (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))) (group_monoid (@group_of_subgroup G' (@coKer G G' f))) bij_group_quo_ker_coKer)) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (sgroup_law (monoid_sgroup (group_monoid G')) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x) (group_inverse G' (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y))) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G'))) *) apply Trans with (sgroup_law G' (Ap (sgroup_map (monoid_sgroup_hom f)) x) (group_inverse _ (Ap (sgroup_map (monoid_sgroup_hom f)) x))); auto with algebra. (* Goal: @surjective (sgroup_set (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))))) (sgroup_set (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f))))) (@sgroup_map (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))) (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f)))) (@monoid_sgroup_hom (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))) (group_monoid (@group_of_subgroup G' (@coKer G G' f))) bij_group_quo_ker_coKer)) *) red in |- *. (* Goal: forall y : Carrier (sgroup_set (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f))))), @ex (Carrier (sgroup_set (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))))) (fun x : Carrier (sgroup_set (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))))) => @Equal (sgroup_set (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f))))) y (@Ap (sgroup_set (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))))) (sgroup_set (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f))))) (@sgroup_map (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))) (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f)))) (@monoid_sgroup_hom (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))) (group_monoid (@group_of_subgroup G' (@coKer G G' f))) bij_group_quo_ker_coKer)) x)) *) intros y; try assumption. (* Goal: @ex (Carrier (sgroup_set (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))))) (fun x : Carrier (sgroup_set (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))))) => @Equal (sgroup_set (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f))))) y (@Ap (sgroup_set (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))))) (sgroup_set (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f))))) (@sgroup_map (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))) (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f)))) (@monoid_sgroup_hom (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))) (group_monoid (@group_of_subgroup G' (@coKer G G' f))) bij_group_quo_ker_coKer)) x)) *) elim y. (* Goal: forall (subtype_elt : Carrier (sgroup_set (monoid_sgroup (group_monoid G')))) (subtype_prf : @Pred_fun (sgroup_set (monoid_sgroup (group_monoid G'))) (@subsgroup_part (monoid_sgroup (group_monoid G')) (@submonoid_subsgroup (group_monoid G') (@subgroup_submonoid G' (@coKer G G' f)))) subtype_elt), @ex (Carrier (sgroup_set (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))))) (fun x : Carrier (sgroup_set (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))))) => @Equal (sgroup_set (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f))))) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@subsgroup_part (monoid_sgroup (group_monoid G')) (@submonoid_subsgroup (group_monoid G') (@subgroup_submonoid G' (@coKer G G' f)))) subtype_elt subtype_prf) (@Ap (sgroup_set (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))))) (sgroup_set (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f))))) (@sgroup_map (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))) (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f)))) (@monoid_sgroup_hom (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))) (group_monoid (@group_of_subgroup G' (@coKer G G' f))) bij_group_quo_ker_coKer)) x)) *) intros y' subtype_prf; try assumption. (* Goal: @ex (Carrier (sgroup_set (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))))) (fun x : Carrier (sgroup_set (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))))) => @Equal (sgroup_set (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f))))) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@subsgroup_part (monoid_sgroup (group_monoid G')) (@submonoid_subsgroup (group_monoid G') (@subgroup_submonoid G' (@coKer G G' f)))) y' subtype_prf) (@Ap (sgroup_set (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))))) (sgroup_set (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f))))) (@sgroup_map (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))) (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f)))) (@monoid_sgroup_hom (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))) (group_monoid (@group_of_subgroup G' (@coKer G G' f))) bij_group_quo_ker_coKer)) x)) *) elim subtype_prf. (* Goal: forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (_ : and (@in_part (sgroup_set (monoid_sgroup (group_monoid G))) x (full (sgroup_set (monoid_sgroup (group_monoid G))))) (@Equal (sgroup_set (monoid_sgroup (group_monoid G'))) y' (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x))), @ex (Carrier (sgroup_set (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))))) (fun x0 : Carrier (sgroup_set (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))))) => @Equal (sgroup_set (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f))))) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@subsgroup_part (monoid_sgroup (group_monoid G')) (@submonoid_subsgroup (group_monoid G') (@subgroup_submonoid G' (@coKer G G' f)))) y' subtype_prf) (@Ap (sgroup_set (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))))) (sgroup_set (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f))))) (@sgroup_map (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))) (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f)))) (@monoid_sgroup_hom (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))) (group_monoid (@group_of_subgroup G' (@coKer G G' f))) bij_group_quo_ker_coKer)) x0)) *) intros x H'; try assumption. (* Goal: @ex (Carrier (sgroup_set (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))))) (fun x : Carrier (sgroup_set (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))))) => @Equal (sgroup_set (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f))))) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@subsgroup_part (monoid_sgroup (group_monoid G')) (@submonoid_subsgroup (group_monoid G') (@subgroup_submonoid G' (@coKer G G' f)))) y' subtype_prf) (@Ap (sgroup_set (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))))) (sgroup_set (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f))))) (@sgroup_map (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))) (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f)))) (@monoid_sgroup_hom (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))) (group_monoid (@group_of_subgroup G' (@coKer G G' f))) bij_group_quo_ker_coKer)) x)) *) elim H'; intros H'0 H'1; try exact H'0; clear H'. (* Goal: @ex (Carrier (sgroup_set (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))))) (fun x : Carrier (sgroup_set (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))))) => @Equal (sgroup_set (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f))))) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@subsgroup_part (monoid_sgroup (group_monoid G')) (@submonoid_subsgroup (group_monoid G') (@subgroup_submonoid G' (@coKer G G' f)))) y' subtype_prf) (@Ap (sgroup_set (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))))) (sgroup_set (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f))))) (@sgroup_map (monoid_sgroup (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f)))) (monoid_sgroup (group_monoid (@group_of_subgroup G' (@coKer G G' f)))) (@monoid_sgroup_hom (group_monoid (group_quo G (@Ker G G' f) (@kernel_normal G G' f))) (group_monoid (@group_of_subgroup G' (@coKer G G' f))) bij_group_quo_ker_coKer)) x)) *) exists x; try assumption. Qed. Theorem factor_group_hom : Equal f (comp_hom inj_coKer_group (comp_hom bij_group_quo_ker_coKer surj_group_quo_ker)). Proof. (* Goal: @Equal (@Hom GROUP G G') f (@comp_hom GROUP G (@group_of_subgroup G' (@coKer G G' f)) G' inj_coKer_group (@comp_hom GROUP G (group_quo G (@Ker G G' f) (@kernel_normal G G' f)) (@group_of_subgroup G' (@coKer G G' f)) bij_group_quo_ker_coKer surj_group_quo_ker)) *) simpl in |- *. (* Goal: @Map_eq (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (@comp_map_map (sgroup_set (monoid_sgroup (group_monoid G))) (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid G'))) (@part (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@f2 (@group_of_subgroup G' (@coKer G G' f)) G' (fun x : @subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) => @subtype_elt (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) x) (fun (x y : @subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G)))))) (H : @subtype_image_equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G)))))) (@subtype_elt (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G)))))) x y) => H)) (@comp_map_map (sgroup_set (monoid_sgroup (group_monoid G))) (@group_quo_set G (@Ker G G' f) (@kernel_normal G G' f)) (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid G'))) (@part (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))))) (@f2 (group_quo G (@Ker G G' f) (@kernel_normal G G' f)) (@group_of_subgroup G' (@coKer G G' f)) (fun x : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => @Build_subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x) (@coKer_prop G G' f x)) (fun (x y : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (H' : @Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (sgroup_law (monoid_sgroup (group_monoid G)) x (group_inverse G y))) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G')))) => @GROUP_reg_right G' (group_inverse G' (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y)) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y) (@Trans (sgroup_set (monoid_sgroup (group_monoid G'))) (sgroup_law (monoid_sgroup (group_monoid G')) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x) (group_inverse G' (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y))) (sgroup_law (monoid_sgroup (group_monoid G')) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (group_inverse G y))) (sgroup_law (monoid_sgroup (group_monoid G')) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y) (group_inverse G' (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y))) (@SGROUP_comp (monoid_sgroup (group_monoid G')) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x) (group_inverse G' (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y)) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (group_inverse G y)) (@Refl (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x)) (@Sym (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (group_inverse G y)) (group_inverse G' (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y)) (@GROUP_hom_prop G G' f y))) (@Trans (sgroup_set (monoid_sgroup (group_monoid G'))) (sgroup_law (monoid_sgroup (group_monoid G')) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (group_inverse G y))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (sgroup_law (monoid_sgroup (group_monoid G)) x (group_inverse G y))) (sgroup_law (monoid_sgroup (group_monoid G')) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y) (group_inverse G' (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y))) (@Sym (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (sgroup_law (monoid_sgroup (group_monoid G)) x (group_inverse G y))) (sgroup_law (monoid_sgroup (group_monoid G')) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (group_inverse G y))) (@SGROUP_hom_prop (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f) x (group_inverse G y))) (@Trans (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (sgroup_law (monoid_sgroup (group_monoid G)) x (group_inverse G y))) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G'))) (sgroup_law (monoid_sgroup (group_monoid G')) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y) (group_inverse G' (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y))) H' (@Sym (sgroup_set (monoid_sgroup (group_monoid G'))) (sgroup_law (monoid_sgroup (group_monoid G')) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y) (group_inverse G' (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y))) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G'))) (@GROUP_inverse_r G' (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y)))))))) (@f2 G (group_quo G (@Ker G G' f) (@kernel_normal G G' f)) (fun x : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => x) (fun (x y : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (H' : @Equal (sgroup_set (monoid_sgroup (group_monoid G))) x y) => @in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) x (group_inverse G x)) (sgroup_law (monoid_sgroup (group_monoid G)) x (group_inverse G y)) (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) x (group_inverse G x)) (@submonoid_in_prop (group_monoid G) (@Build_submonoid (group_monoid G) (@Build_subsgroup (monoid_sgroup (group_monoid G)) (@kernel_part G G' f) (fun (x0 y0 : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (H'0 : @Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x0) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G')))) (H'1 : @Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y0) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G')))) => @Trans (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 y0)) (sgroup_law (monoid_sgroup (group_monoid G')) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x0) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y0)) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G'))) (@SGROUP_hom_prop (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f) x0 y0) (@Trans (sgroup_set (monoid_sgroup (group_monoid G'))) (sgroup_law (monoid_sgroup (group_monoid G')) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x0) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y0)) (sgroup_law (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')))) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G'))) (@SGROUP_comp (monoid_sgroup (group_monoid G')) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x0) (@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 G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y0) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G'))) H'0 H'1) (@MONOID_unit_l (group_monoid G') (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G'))))))) (@MONOID_hom_prop (group_monoid G) (group_monoid G') f))) (@GROUP_inverse_r G x)) (@SGROUP_comp (monoid_sgroup (group_monoid G)) x x (group_inverse G y) (group_inverse G x) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) x) (@GROUP_comp G y x (@Sym (sgroup_set (monoid_sgroup (group_monoid G))) x y H'))))))) *) unfold Map_eq in |- *. (* Goal: forall x : Carrier (sgroup_set (monoid_sgroup (group_monoid G))), @Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@comp_map_map (sgroup_set (monoid_sgroup (group_monoid G))) (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid G'))) (@part (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@f2 (@group_of_subgroup G' (@coKer G G' f)) G' (fun x0 : @subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) => @subtype_elt (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) x0) (fun (x0 y : @subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G)))))) (H : @subtype_image_equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G)))))) (@subtype_elt (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G)))))) x0 y) => H)) (@comp_map_map (sgroup_set (monoid_sgroup (group_monoid G))) (@group_quo_set G (@Ker G G' f) (@kernel_normal G G' f)) (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid G'))) (@part (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))))) (@f2 (group_quo G (@Ker G G' f) (@kernel_normal G G' f)) (@group_of_subgroup G' (@coKer G G' f)) (fun x0 : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => @Build_subtype (sgroup_set (monoid_sgroup (group_monoid G'))) (@image (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (full (sgroup_set (monoid_sgroup (group_monoid G))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x0) (@coKer_prop G G' f x0)) (fun (x0 y : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (H' : @Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (group_inverse G y))) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G')))) => @GROUP_reg_right G' (group_inverse G' (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y)) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x0) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y) (@Trans (sgroup_set (monoid_sgroup (group_monoid G'))) (sgroup_law (monoid_sgroup (group_monoid G')) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x0) (group_inverse G' (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y))) (sgroup_law (monoid_sgroup (group_monoid G')) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x0) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (group_inverse G y))) (sgroup_law (monoid_sgroup (group_monoid G')) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y) (group_inverse G' (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y))) (@SGROUP_comp (monoid_sgroup (group_monoid G')) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x0) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x0) (group_inverse G' (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y)) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (group_inverse G y)) (@Refl (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x0)) (@Sym (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (group_inverse G y)) (group_inverse G' (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y)) (@GROUP_hom_prop G G' f y))) (@Trans (sgroup_set (monoid_sgroup (group_monoid G'))) (sgroup_law (monoid_sgroup (group_monoid G')) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x0) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (group_inverse G y))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (group_inverse G y))) (sgroup_law (monoid_sgroup (group_monoid G')) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y) (group_inverse G' (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y))) (@Sym (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (group_inverse G y))) (sgroup_law (monoid_sgroup (group_monoid G')) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x0) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (group_inverse G y))) (@SGROUP_hom_prop (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f) x0 (group_inverse G y))) (@Trans (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (group_inverse G y))) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G'))) (sgroup_law (monoid_sgroup (group_monoid G')) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y) (group_inverse G' (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y))) H' (@Sym (sgroup_set (monoid_sgroup (group_monoid G'))) (sgroup_law (monoid_sgroup (group_monoid G')) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y) (group_inverse G' (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y))) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G'))) (@GROUP_inverse_r G' (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y)))))))) (@f2 G (group_quo G (@Ker G G' f) (@kernel_normal G G' f)) (fun x0 : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => x0) (fun (x0 y : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (H' : @Equal (sgroup_set (monoid_sgroup (group_monoid G))) x0 y) => @in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (group_inverse G x0)) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (group_inverse G y)) (@in_part_comp_l (sgroup_set (monoid_sgroup (group_monoid G))) (@kernel_part G G' f) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) x0 (group_inverse G x0)) (@submonoid_in_prop (group_monoid G) (@Build_submonoid (group_monoid G) (@Build_subsgroup (monoid_sgroup (group_monoid G)) (@kernel_part G G' f) (fun (x1 y0 : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (H'0 : @Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x1) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G')))) (H'1 : @Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y0) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G')))) => @Trans (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) (sgroup_law (monoid_sgroup (group_monoid G)) x1 y0)) (sgroup_law (monoid_sgroup (group_monoid G')) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x1) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y0)) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G'))) (@SGROUP_hom_prop (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f) x1 y0) (@Trans (sgroup_set (monoid_sgroup (group_monoid G'))) (sgroup_law (monoid_sgroup (group_monoid G')) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x1) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y0)) (sgroup_law (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')))) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G'))) (@SGROUP_comp (monoid_sgroup (group_monoid G')) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x1) (@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 G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) y0) (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G'))) H'0 H'1) (@MONOID_unit_l (group_monoid G') (@monoid_unit (monoid_sgroup (group_monoid G')) (monoid_on_def (group_monoid G'))))))) (@MONOID_hom_prop (group_monoid G) (group_monoid G') f))) (@GROUP_inverse_r G x0)) (@SGROUP_comp (monoid_sgroup (group_monoid G)) x0 x0 (group_inverse G y) (group_inverse G x0) (@Refl (sgroup_set (monoid_sgroup (group_monoid G))) x0) (@GROUP_comp G y x0 (@Sym (sgroup_set (monoid_sgroup (group_monoid G))) x0 y H'))))))) x) *) simpl in |- *. (* Goal: forall x : Carrier (sgroup_set (monoid_sgroup (group_monoid G))), @Equal (sgroup_set (monoid_sgroup (group_monoid G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid G'))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid G')) (@monoid_sgroup_hom (group_monoid G) (group_monoid G') f)) x) *) auto with algebra. Qed. End Def. Hint Resolve factor_group_hom bij_group_quo_ker_coKer_bijective inj_coKer_group_injective surj_group_quo_ker_surjective: algebra.
Require Import mathcomp.ssreflect.ssreflect. From mathcomp Require Import ssrfun ssrbool eqtype ssrnat seq path fintype. From mathcomp Require Import div bigop. Set Implicit Arguments. Unset Strict Implicit. Unset Printing Implicit Defensive. Fixpoint edivn2 q r := if r is r'.+2 then edivn2 q.+1 r' else (q, r). Lemma edivn2P n : edivn_spec n 2 (edivn2 0 n). Proof. (* Goal: edivn_spec n (S (S O)) (edivn2 O n) *) rewrite -[n]odd_double_half addnC -{1}[n./2]addn0 -{1}mul2n mulnC. (* Goal: edivn_spec (addn (muln (addn (half n) O) (S (S O))) (nat_of_bool (odd n))) (S (S O)) (edivn2 O (addn (double (half n)) (nat_of_bool (odd n)))) *) elim: n./2 {1 4}0 => [|r IHr] q; first by case (odd n) => /=. (* Goal: edivn_spec (addn (muln (addn (S r) q) (S (S O))) (nat_of_bool (odd n))) (S (S O)) (edivn2 q (addn (double (S r)) (nat_of_bool (odd n)))) *) by rewrite addSnnS; apply: IHr. Qed. Fixpoint elogn2 e q r {struct q} := match q, r with | 0, _ | _, 0 => (e, q) | q'.+1, 1 => elogn2 e.+1 q' q' | q'.+1, r'.+2 => elogn2 e q' r' end. Variant elogn2_spec n : nat * nat -> Type := Elogn2Spec e m of n = 2 ^ e * m.*2.+1 : elogn2_spec n (e, m). Lemma elogn2P n : elogn2_spec n.+1 (elogn2 0 n n). Proof. (* Goal: elogn2_spec (S n) (elogn2 O n n) *) rewrite -{1}[n.+1]mul1n -[1]/(2 ^ 0) -{1}(addKn n n) addnn. (* Goal: elogn2_spec (muln (expn (S (S O)) O) (S (subn (double n) n))) (elogn2 O n n) *) elim: n {1 4 6}n {2 3}0 (leqnn n) => [|q IHq] [|[|r]] e //=; last first. (* Goal: forall _ : is_true (leq (S O) (S q)), elogn2_spec (muln (expn (S (S O)) e) (S (subn (double (S q)) (S O)))) (elogn2 (S e) q q) *) (* Goal: forall _ : is_true (leq (S (S r)) (S q)), elogn2_spec (muln (expn (S (S O)) e) (S (subn (double (S q)) (S (S r))))) (elogn2 e q r) *) by move/ltnW; apply: IHq. (* Goal: forall _ : is_true (leq (S O) (S q)), elogn2_spec (muln (expn (S (S O)) e) (S (subn (double (S q)) (S O)))) (elogn2 (S e) q q) *) clear 1; rewrite subn1 -[_.-1.+1]doubleS -mul2n mulnA -expnSr. (* Goal: elogn2_spec (muln (expn (S (S O)) (S e)) (S q)) (elogn2 (S e) q q) *) by rewrite -{1}(addKn q q) addnn; apply: IHq. Qed. Definition ifnz T n (x y : T) := if n is 0 then y else x. Variant ifnz_spec T n (x y : T) : T -> Type := | IfnzPos of n > 0 : ifnz_spec n x y x | IfnzZero of n = 0 : ifnz_spec n x y y. Lemma ifnzP T n (x y : T) : ifnz_spec n x y (ifnz n x y). Proof. (* Goal: @ifnz_spec T n x y (@ifnz T n x y) *) by case: n => [|n]; [right | left]. Qed. Definition NumFactor (f : nat * nat) := ([Num of f.1], f.2). Definition pfactor p e := p ^ e. Definition cons_pfactor (p e : nat) pd := ifnz e ((p, e) :: pd) pd. Local Notation "p ^? e :: pd" := (cons_pfactor p e pd) (at level 30, e at level 30, pd at level 60) : nat_scope. Section prime_decomp. Import NatTrec. Fixpoint prime_decomp_rec m k a b c e := let p := k.*2.+1 in if a is a'.+1 then if b - (ifnz e 1 k - c) is b'.+1 then [rec m, k, a', b', ifnz c c.-1 (ifnz e p.-2 1), e] else if (b == 0) && (c == 0) then let b' := k + a' in [rec b'.*2.+3, k, a', b', k.-1, e.+1] else let bc' := ifnz e (ifnz b (k, 0) (edivn2 0 c)) (b, c) in p ^? e :: ifnz a' [rec m, k.+1, a'.-1, bc'.1 + a', bc'.2, 0] [:: (m, 1)] else if (b == 0) && (c == 0) then [:: (p, e.+2)] else p ^? e :: [:: (m, 1)] where "[ 'rec' m , k , a , b , c , e ]" := (prime_decomp_rec m k a b c e). Definition prime_decomp n := let: (e2, m2) := elogn2 0 n.-1 n.-1 in if m2 < 2 then 2 ^? e2 :: 3 ^? m2 :: [::] else let: (a, bc) := edivn m2.-2 3 in let: (b, c) := edivn (2 - bc) 2 in 2 ^? e2 :: [rec m2.*2.+1, 1, a, b, c, 0]. Definition add_divisors f divs := let: (p, e) := f in let add1 divs' := merge leq (map (NatTrec.mul p) divs') divs in iter e add1 divs. Definition add_totient_factor f m := let: (p, e) := f in p.-1 * p ^ e.-1 * m. End prime_decomp. Definition primes n := unzip1 (prime_decomp n). Definition prime p := if prime_decomp p is [:: (_ , 1)] then true else false. Definition nat_pred := simpl_pred nat. Definition pi_unwrapped_arg := nat. Definition pi_wrapped_arg := wrapped nat. Coercion unwrap_pi_arg (wa : pi_wrapped_arg) : pi_unwrapped_arg := unwrap wa. Coercion pi_arg_of_nat (n : nat) := Wrap n : pi_wrapped_arg. Coercion pi_arg_of_fin_pred T pT (A : @fin_pred_sort T pT) : pi_wrapped_arg := Wrap #|A|. Definition pi_of (n : pi_unwrapped_arg) : nat_pred := [pred p in primes n]. Notation "\pi ( n )" := (pi_of n) (at level 2, format "\pi ( n )") : nat_scope. Notation "\p 'i' ( A )" := \pi(#|A|) (at level 2, format "\p 'i' ( A )") : nat_scope. Definition pdiv n := head 1 (primes n). Definition max_pdiv n := last 1 (primes n). Definition divisors n := foldr add_divisors [:: 1] (prime_decomp n). Definition totient n := foldr add_totient_factor (n > 0) (prime_decomp n). Lemma prime_decomp_correct : let pd_val pd := \prod_(f <- pd) pfactor f.1 f.2 in Lemma primePn n : reflect (n < 2 \/ exists2 d, 1 < d < n & d %| n) (~~ prime n). Proof. (* Goal: Bool.reflect (or (is_true (leq (S n) (S (S O)))) (@ex2 nat (fun d : nat => is_true (andb (leq (S (S O)) d) (leq (S d) n))) (fun d : nat => is_true (dvdn d n)))) (negb (prime n)) *) rewrite /prime; case: n => [|[|p2]]; try by do 2!left. (* Goal: Bool.reflect (or (is_true (leq (S (S (S p2))) (S (S O)))) (@ex2 nat (fun d : nat => is_true (andb (leq (S (S O)) d) (leq (S d) (S (S p2))))) (fun d : nat => is_true (dvdn d (S (S p2)))))) (negb match prime_decomp (S (S p2)) with | nil => false | cons (pair n (O as n0) as p) l => false | cons (pair n (S (O as n1) as n0) as p) (nil as l) => true | cons (pair n (S (O as n1) as n0) as p) (cons p0 l0 as l) => false | cons (pair n (S (S n2 as n1) as n0) as p) l => false end) *) case: (@prime_decomp_correct p2.+2) => //; rewrite unlock. (* Goal: forall (_ : @eq nat (S (S p2)) (@reducebig nat (prod nat nat) (S O) (prime_decomp (S (S p2))) (fun f : prod nat nat => @BigBody nat (prod nat nat) f muln true (pfactor (@fst nat nat f) (@snd nat nat f))))) (_ : is_true (@all (prod nat nat) (fun f : prod nat nat => andb (negb (@has nat (@pred_of_simpl nat (@SimplPred nat (fun d : nat => dvdn d (@fst nat nat f)))) (index_iota (S (S O)) (@fst nat nat f)))) (leq (S O) (@snd nat nat f))) (prime_decomp (S (S p2))))) (_ : is_true (@path nat (@rel_of_simpl_rel nat ltn) (S O) (@unzip1 nat nat (prime_decomp (S (S p2)))))), Bool.reflect (or (is_true (leq (S (S (S p2))) (S (S O)))) (@ex2 nat (fun d : nat => is_true (andb (leq (S (S O)) d) (leq (S d) (S (S p2))))) (fun d : nat => is_true (dvdn d (S (S p2)))))) (negb match prime_decomp (S (S p2)) with | nil => false | cons (pair n (O as n0) as p2) l => false | cons (pair n (S (O as n1) as n0) as p2) (nil as l) => true | cons (pair n (S (O as n1) as n0) as p2) (cons p3 l0 as l) => false | cons (pair n (S (S n2 as n1) as n0) as p2) l => false end) *) case: prime_decomp => [|[q [|[|e]]] pd] //=; last first; last by rewrite andbF. (* Goal: forall (_ : @eq nat (S (S p2)) (muln (pfactor q (S O)) (@reducebig nat (prod nat nat) (S O) pd (fun f : prod nat nat => @BigBody nat (prod nat nat) f muln true (pfactor (@fst nat nat f) (@snd nat nat f)))))) (_ : is_true (andb (andb (negb (@has nat (@pred_of_simpl nat (@SimplPred nat (fun d : nat => dvdn d q))) (index_iota (S (S O)) q))) (leq (S O) (S O))) (@all (prod nat nat) (fun f : prod nat nat => andb (negb (@has nat (@pred_of_simpl nat (@SimplPred nat (fun d : nat => dvdn d (@fst nat nat f)))) (index_iota (S (S O)) (@fst nat nat f)))) (leq (S O) (@snd nat nat f))) pd))) (_ : is_true (andb (leq (S (S O)) q) (@path nat (@rel_of_simpl_rel nat ltn) q (@unzip1 nat nat pd)))), Bool.reflect (or (is_true (leq (S (S (S p2))) (S (S O)))) (@ex2 nat (fun d : nat => is_true (andb (leq (S (S O)) d) (leq (S d) (S (S p2))))) (fun d : nat => is_true (dvdn d (S (S p2)))))) (negb match pd with | nil => true | cons p2 l => false end) *) (* Goal: forall (_ : @eq nat (S (S p2)) (muln (pfactor q (S (S e))) (@reducebig nat (prod nat nat) (S O) pd (fun f : prod nat nat => @BigBody nat (prod nat nat) f muln true (pfactor (@fst nat nat f) (@snd nat nat f)))))) (_ : is_true (andb (andb (negb (@has nat (@pred_of_simpl nat (@SimplPred nat (fun d : nat => dvdn d q))) (index_iota (S (S O)) q))) (leq (S O) (S (S e)))) (@all (prod nat nat) (fun f : prod nat nat => andb (negb (@has nat (@pred_of_simpl nat (@SimplPred nat (fun d : nat => dvdn d (@fst nat nat f)))) (index_iota (S (S O)) (@fst nat nat f)))) (leq (S O) (@snd nat nat f))) pd))) (_ : is_true (andb (leq (S (S O)) q) (@path nat (@rel_of_simpl_rel nat ltn) q (@unzip1 nat nat pd)))), Bool.reflect (or (is_true (leq (S (S (S p2))) (S (S O)))) (@ex2 nat (fun d : nat => is_true (andb (leq (S (S O)) d) (leq (S d) (S (S p2))))) (fun d : nat => is_true (dvdn d (S (S p2)))))) true *) rewrite {1}/pfactor 2!expnS -!mulnA /=. (* Goal: forall (_ : @eq nat (S (S p2)) (muln (pfactor q (S O)) (@reducebig nat (prod nat nat) (S O) pd (fun f : prod nat nat => @BigBody nat (prod nat nat) f muln true (pfactor (@fst nat nat f) (@snd nat nat f)))))) (_ : is_true (andb (andb (negb (@has nat (@pred_of_simpl nat (@SimplPred nat (fun d : nat => dvdn d q))) (index_iota (S (S O)) q))) (leq (S O) (S O))) (@all (prod nat nat) (fun f : prod nat nat => andb (negb (@has nat (@pred_of_simpl nat (@SimplPred nat (fun d : nat => dvdn d (@fst nat nat f)))) (index_iota (S (S O)) (@fst nat nat f)))) (leq (S O) (@snd nat nat f))) pd))) (_ : is_true (andb (leq (S (S O)) q) (@path nat (@rel_of_simpl_rel nat ltn) q (@unzip1 nat nat pd)))), Bool.reflect (or (is_true (leq (S (S (S p2))) (S (S O)))) (@ex2 nat (fun d : nat => is_true (andb (leq (S (S O)) d) (leq (S d) (S (S p2))))) (fun d : nat => is_true (dvdn d (S (S p2)))))) (negb match pd with | nil => true | cons p2 l => false end) *) (* Goal: forall (_ : @eq nat (S (S p2)) (muln q (muln q (muln (expn q e) (@reducebig nat (prod nat nat) (S O) pd (fun f : prod nat nat => @BigBody nat (prod nat nat) f muln true (pfactor (@fst nat nat f) (@snd nat nat f)))))))) (_ : is_true (andb (andb (negb (@has nat (@pred_of_simpl nat (@SimplPred nat (fun d : nat => dvdn d q))) (index_iota (S (S O)) q))) (leq (S O) (S (S e)))) (@all (prod nat nat) (fun f : prod nat nat => andb (negb (@has nat (@pred_of_simpl nat (@SimplPred nat (fun d : nat => dvdn d (@fst nat nat f)))) (index_iota (S (S O)) (@fst nat nat f)))) (leq (S O) (@snd nat nat f))) pd))) (_ : is_true (andb (leq (S (S O)) q) (@path nat (@rel_of_simpl_rel nat ltn) q (@unzip1 nat nat pd)))), Bool.reflect (or (is_true (leq (S (S (S p2))) (S (S O)))) (@ex2 nat (fun d : nat => is_true (andb (leq (S (S O)) d) (leq (S d) (S (S p2))))) (fun d : nat => is_true (dvdn d (S (S p2)))))) true *) case: (_ ^ _ * _) => [|u -> _ /andP[lt1q _]]; first by rewrite !muln0. (* Goal: forall (_ : @eq nat (S (S p2)) (muln (pfactor q (S O)) (@reducebig nat (prod nat nat) (S O) pd (fun f : prod nat nat => @BigBody nat (prod nat nat) f muln true (pfactor (@fst nat nat f) (@snd nat nat f)))))) (_ : is_true (andb (andb (negb (@has nat (@pred_of_simpl nat (@SimplPred nat (fun d : nat => dvdn d q))) (index_iota (S (S O)) q))) (leq (S O) (S O))) (@all (prod nat nat) (fun f : prod nat nat => andb (negb (@has nat (@pred_of_simpl nat (@SimplPred nat (fun d : nat => dvdn d (@fst nat nat f)))) (index_iota (S (S O)) (@fst nat nat f)))) (leq (S O) (@snd nat nat f))) pd))) (_ : is_true (andb (leq (S (S O)) q) (@path nat (@rel_of_simpl_rel nat ltn) q (@unzip1 nat nat pd)))), Bool.reflect (or (is_true (leq (S (S (S p2))) (S (S O)))) (@ex2 nat (fun d : nat => is_true (andb (leq (S (S O)) d) (leq (S d) (S (S p2))))) (fun d : nat => is_true (dvdn d (S (S p2)))))) (negb match pd with | nil => true | cons p2 l => false end) *) (* Goal: Bool.reflect (or (is_true (leq (S (muln q (muln q (S u)))) (S (S O)))) (@ex2 nat (fun d : nat => is_true (andb (leq (S (S O)) d) (leq (S d) (muln q (muln q (S u)))))) (fun d : nat => is_true (dvdn d (muln q (muln q (S u))))))) true *) left; right; exists q; last by rewrite dvdn_mulr. (* Goal: forall (_ : @eq nat (S (S p2)) (muln (pfactor q (S O)) (@reducebig nat (prod nat nat) (S O) pd (fun f : prod nat nat => @BigBody nat (prod nat nat) f muln true (pfactor (@fst nat nat f) (@snd nat nat f)))))) (_ : is_true (andb (andb (negb (@has nat (@pred_of_simpl nat (@SimplPred nat (fun d : nat => dvdn d q))) (index_iota (S (S O)) q))) (leq (S O) (S O))) (@all (prod nat nat) (fun f : prod nat nat => andb (negb (@has nat (@pred_of_simpl nat (@SimplPred nat (fun d : nat => dvdn d (@fst nat nat f)))) (index_iota (S (S O)) (@fst nat nat f)))) (leq (S O) (@snd nat nat f))) pd))) (_ : is_true (andb (leq (S (S O)) q) (@path nat (@rel_of_simpl_rel nat ltn) q (@unzip1 nat nat pd)))), Bool.reflect (or (is_true (leq (S (S (S p2))) (S (S O)))) (@ex2 nat (fun d : nat => is_true (andb (leq (S (S O)) d) (leq (S d) (S (S p2))))) (fun d : nat => is_true (dvdn d (S (S p2)))))) (negb match pd with | nil => true | cons p2 l => false end) *) (* Goal: is_true (andb (leq (S (S O)) q) (leq (S q) (muln q (muln q (S u))))) *) have lt0q := ltnW lt1q; rewrite lt1q -{1}[q]muln1 ltn_pmul2l //. (* Goal: forall (_ : @eq nat (S (S p2)) (muln (pfactor q (S O)) (@reducebig nat (prod nat nat) (S O) pd (fun f : prod nat nat => @BigBody nat (prod nat nat) f muln true (pfactor (@fst nat nat f) (@snd nat nat f)))))) (_ : is_true (andb (andb (negb (@has nat (@pred_of_simpl nat (@SimplPred nat (fun d : nat => dvdn d q))) (index_iota (S (S O)) q))) (leq (S O) (S O))) (@all (prod nat nat) (fun f : prod nat nat => andb (negb (@has nat (@pred_of_simpl nat (@SimplPred nat (fun d : nat => dvdn d (@fst nat nat f)))) (index_iota (S (S O)) (@fst nat nat f)))) (leq (S O) (@snd nat nat f))) pd))) (_ : is_true (andb (leq (S (S O)) q) (@path nat (@rel_of_simpl_rel nat ltn) q (@unzip1 nat nat pd)))), Bool.reflect (or (is_true (leq (S (S (S p2))) (S (S O)))) (@ex2 nat (fun d : nat => is_true (andb (leq (S (S O)) d) (leq (S d) (S (S p2))))) (fun d : nat => is_true (dvdn d (S (S p2)))))) (negb match pd with | nil => true | cons p2 l => false end) *) (* Goal: is_true (andb true (leq (S (S O)) (muln q (S u)))) *) by rewrite -[2]muln1 leq_mul. (* Goal: forall (_ : @eq nat (S (S p2)) (muln (pfactor q (S O)) (@reducebig nat (prod nat nat) (S O) pd (fun f : prod nat nat => @BigBody nat (prod nat nat) f muln true (pfactor (@fst nat nat f) (@snd nat nat f)))))) (_ : is_true (andb (andb (negb (@has nat (@pred_of_simpl nat (@SimplPred nat (fun d : nat => dvdn d q))) (index_iota (S (S O)) q))) (leq (S O) (S O))) (@all (prod nat nat) (fun f : prod nat nat => andb (negb (@has nat (@pred_of_simpl nat (@SimplPred nat (fun d : nat => dvdn d (@fst nat nat f)))) (index_iota (S (S O)) (@fst nat nat f)))) (leq (S O) (@snd nat nat f))) pd))) (_ : is_true (andb (leq (S (S O)) q) (@path nat (@rel_of_simpl_rel nat ltn) q (@unzip1 nat nat pd)))), Bool.reflect (or (is_true (leq (S (S (S p2))) (S (S O)))) (@ex2 nat (fun d : nat => is_true (andb (leq (S (S O)) d) (leq (S d) (S (S p2))))) (fun d : nat => is_true (dvdn d (S (S p2)))))) (negb match pd with | nil => true | cons p2 l => false end) *) rewrite {1}/pfactor expn1; case: pd => [|[r e] pd] /=; last first. (* Goal: forall (_ : @eq nat (S (S p2)) (muln q (S O))) (_ : is_true (andb (andb (negb (@has nat (@pred_of_simpl nat (@SimplPred nat (fun d : nat => dvdn d q))) (index_iota (S (S O)) q))) (leq (S O) (S O))) true)) (_ : is_true (andb (leq (S (S O)) q) true)), Bool.reflect (or (is_true (leq (S (S (S p2))) (S (S O)))) (@ex2 nat (fun d : nat => is_true (andb (leq (S (S O)) d) (leq (S d) (S (S p2))))) (fun d : nat => is_true (dvdn d (S (S p2)))))) false *) (* Goal: forall (_ : @eq nat (S (S p2)) (muln q (muln (pfactor r e) (@reducebig nat (prod nat nat) (S O) pd (fun f : prod nat nat => @BigBody nat (prod nat nat) f muln true (pfactor (@fst nat nat f) (@snd nat nat f))))))) (_ : is_true (andb (andb (negb (@has nat (@pred_of_simpl nat (@SimplPred nat (fun d : nat => dvdn d q))) (index_iota (S (S O)) q))) (leq (S O) (S O))) (andb (andb (negb (@has nat (@pred_of_simpl nat (@SimplPred nat (fun d : nat => dvdn d r))) (index_iota (S (S O)) r))) (leq (S O) e)) (@all (prod nat nat) (fun f : prod nat nat => andb (negb (@has nat (@pred_of_simpl nat (@SimplPred nat (fun d : nat => dvdn d (@fst nat nat f)))) (index_iota (S (S O)) (@fst nat nat f)))) (leq (S O) (@snd nat nat f))) pd)))) (_ : is_true (andb (leq (S (S O)) q) (andb (leq (S q) r) (@path nat (@rel_of_simpl_rel nat ltn) r (@unzip1 nat nat pd))))), Bool.reflect (or (is_true (leq (S (S (S p2))) (S (S O)))) (@ex2 nat (fun d : nat => is_true (andb (leq (S (S O)) d) (leq (S d) (S (S p2))))) (fun d : nat => is_true (dvdn d (S (S p2)))))) true *) case: e => [|e] /=; first by rewrite !andbF. (* Goal: forall (_ : @eq nat (S (S p2)) (muln q (S O))) (_ : is_true (andb (andb (negb (@has nat (@pred_of_simpl nat (@SimplPred nat (fun d : nat => dvdn d q))) (index_iota (S (S O)) q))) (leq (S O) (S O))) true)) (_ : is_true (andb (leq (S (S O)) q) true)), Bool.reflect (or (is_true (leq (S (S (S p2))) (S (S O)))) (@ex2 nat (fun d : nat => is_true (andb (leq (S (S O)) d) (leq (S d) (S (S p2))))) (fun d : nat => is_true (dvdn d (S (S p2)))))) false *) (* Goal: forall (_ : @eq nat (S (S p2)) (muln q (muln (pfactor r (S e)) (@reducebig nat (prod nat nat) (S O) pd (fun f : prod nat nat => @BigBody nat (prod nat nat) f muln true (pfactor (@fst nat nat f) (@snd nat nat f))))))) (_ : is_true (andb (andb (negb (@has nat (@pred_of_simpl nat (@SimplPred nat (fun d : nat => dvdn d q))) (index_iota (S (S O)) q))) (leq (S O) (S O))) (andb (andb (negb (@has nat (@pred_of_simpl nat (@SimplPred nat (fun d : nat => dvdn d r))) (index_iota (S (S O)) r))) (leq (S O) (S e))) (@all (prod nat nat) (fun f : prod nat nat => andb (negb (@has nat (@pred_of_simpl nat (@SimplPred nat (fun d : nat => dvdn d (@fst nat nat f)))) (index_iota (S (S O)) (@fst nat nat f)))) (leq (S O) (@snd nat nat f))) pd)))) (_ : is_true (andb (leq (S (S O)) q) (andb (leq (S q) r) (@path nat (@rel_of_simpl_rel nat ltn) r (@unzip1 nat nat pd))))), Bool.reflect (or (is_true (leq (S (S (S p2))) (S (S O)))) (@ex2 nat (fun d : nat => is_true (andb (leq (S (S O)) d) (leq (S d) (S (S p2))))) (fun d : nat => is_true (dvdn d (S (S p2)))))) true *) rewrite {1}/pfactor expnS -mulnA. (* Goal: forall (_ : @eq nat (S (S p2)) (muln q (S O))) (_ : is_true (andb (andb (negb (@has nat (@pred_of_simpl nat (@SimplPred nat (fun d : nat => dvdn d q))) (index_iota (S (S O)) q))) (leq (S O) (S O))) true)) (_ : is_true (andb (leq (S (S O)) q) true)), Bool.reflect (or (is_true (leq (S (S (S p2))) (S (S O)))) (@ex2 nat (fun d : nat => is_true (andb (leq (S (S O)) d) (leq (S d) (S (S p2))))) (fun d : nat => is_true (dvdn d (S (S p2)))))) false *) (* Goal: forall (_ : @eq nat (S (S p2)) (muln q (muln r (muln (expn r e) (@reducebig nat (prod nat nat) (S O) pd (fun f : prod nat nat => @BigBody nat (prod nat nat) f muln true (pfactor (@fst nat nat f) (@snd nat nat f)))))))) (_ : is_true (andb (andb (negb (@has nat (@pred_of_simpl nat (@SimplPred nat (fun d : nat => dvdn d q))) (index_iota (S (S O)) q))) (leq (S O) (S O))) (andb (andb (negb (@has nat (@pred_of_simpl nat (@SimplPred nat (fun d : nat => dvdn d r))) (index_iota (S (S O)) r))) (leq (S O) (S e))) (@all (prod nat nat) (fun f : prod nat nat => andb (negb (@has nat (@pred_of_simpl nat (@SimplPred nat (fun d : nat => dvdn d (@fst nat nat f)))) (index_iota (S (S O)) (@fst nat nat f)))) (leq (S O) (@snd nat nat f))) pd)))) (_ : is_true (andb (leq (S (S O)) q) (andb (leq (S q) r) (@path nat (@rel_of_simpl_rel nat ltn) r (@unzip1 nat nat pd))))), Bool.reflect (or (is_true (leq (S (S (S p2))) (S (S O)))) (@ex2 nat (fun d : nat => is_true (andb (leq (S (S O)) d) (leq (S d) (S (S p2))))) (fun d : nat => is_true (dvdn d (S (S p2)))))) true *) case: (_ ^ _ * _) => [|u -> _ /and3P[lt1q ltqr _]]; first by rewrite !muln0. (* Goal: forall (_ : @eq nat (S (S p2)) (muln q (S O))) (_ : is_true (andb (andb (negb (@has nat (@pred_of_simpl nat (@SimplPred nat (fun d : nat => dvdn d q))) (index_iota (S (S O)) q))) (leq (S O) (S O))) true)) (_ : is_true (andb (leq (S (S O)) q) true)), Bool.reflect (or (is_true (leq (S (S (S p2))) (S (S O)))) (@ex2 nat (fun d : nat => is_true (andb (leq (S (S O)) d) (leq (S d) (S (S p2))))) (fun d : nat => is_true (dvdn d (S (S p2)))))) false *) (* Goal: Bool.reflect (or (is_true (leq (S (muln q (muln r (S u)))) (S (S O)))) (@ex2 nat (fun d : nat => is_true (andb (leq (S (S O)) d) (leq (S d) (muln q (muln r (S u)))))) (fun d : nat => is_true (dvdn d (muln q (muln r (S u))))))) true *) left; right; exists q; last by rewrite dvdn_mulr. (* Goal: forall (_ : @eq nat (S (S p2)) (muln q (S O))) (_ : is_true (andb (andb (negb (@has nat (@pred_of_simpl nat (@SimplPred nat (fun d : nat => dvdn d q))) (index_iota (S (S O)) q))) (leq (S O) (S O))) true)) (_ : is_true (andb (leq (S (S O)) q) true)), Bool.reflect (or (is_true (leq (S (S (S p2))) (S (S O)))) (@ex2 nat (fun d : nat => is_true (andb (leq (S (S O)) d) (leq (S d) (S (S p2))))) (fun d : nat => is_true (dvdn d (S (S p2)))))) false *) (* Goal: is_true (andb (leq (S (S O)) q) (leq (S q) (muln q (muln r (S u))))) *) by rewrite lt1q -{1}[q]mul1n ltn_mul // -[q.+1]muln1 leq_mul. (* Goal: forall (_ : @eq nat (S (S p2)) (muln q (S O))) (_ : is_true (andb (andb (negb (@has nat (@pred_of_simpl nat (@SimplPred nat (fun d : nat => dvdn d q))) (index_iota (S (S O)) q))) (leq (S O) (S O))) true)) (_ : is_true (andb (leq (S (S O)) q) true)), Bool.reflect (or (is_true (leq (S (S (S p2))) (S (S O)))) (@ex2 nat (fun d : nat => is_true (andb (leq (S (S O)) d) (leq (S d) (S (S p2))))) (fun d : nat => is_true (dvdn d (S (S p2)))))) false *) rewrite muln1 !andbT => def_q pr_q lt1q; right=> [[]] // [d]. (* Goal: forall (_ : is_true (andb (leq (S (S O)) d) (leq (S d) (S (S p2))))) (_ : is_true (dvdn d (S (S p2)))), False *) by rewrite def_q -mem_index_iota => in_d_2q dv_d_q; case/hasP: pr_q; exists d. Qed. Lemma primeP p : reflect (p > 1 /\ forall d, d %| p -> xpred2 1 p d) (prime p). Proof. (* Goal: Bool.reflect (and (is_true (leq (S (S O)) p)) (forall (d : nat) (_ : is_true (dvdn d p)), is_true ((fun a1 a2 x : Equality.sort nat_eqType => orb (@eq_op nat_eqType x a1) (@eq_op nat_eqType x a2)) (S O) p d))) (prime p) *) rewrite -[prime p]negbK; have [npr_p | pr_p] := primePn p. (* Goal: Bool.reflect (and (is_true (leq (S (S O)) p)) (forall (d : nat) (_ : is_true (dvdn d p)), is_true (orb (@eq_op nat_eqType d (S O)) (@eq_op nat_eqType d p)))) (negb false) *) (* Goal: Bool.reflect (and (is_true (leq (S (S O)) p)) (forall (d : nat) (_ : is_true (dvdn d p)), is_true (orb (@eq_op nat_eqType d (S O)) (@eq_op nat_eqType d p)))) (negb true) *) right=> [[lt1p pr_p]]; case: npr_p => [|[d n1pd]]. (* Goal: Bool.reflect (and (is_true (leq (S (S O)) p)) (forall (d : nat) (_ : is_true (dvdn d p)), is_true (orb (@eq_op nat_eqType d (S O)) (@eq_op nat_eqType d p)))) (negb false) *) (* Goal: forall _ : is_true (dvdn d p), False *) (* Goal: forall _ : is_true (leq (S p) (S (S O))), False *) by rewrite ltnNge lt1p. (* Goal: Bool.reflect (and (is_true (leq (S (S O)) p)) (forall (d : nat) (_ : is_true (dvdn d p)), is_true (orb (@eq_op nat_eqType d (S O)) (@eq_op nat_eqType d p)))) (negb false) *) (* Goal: forall _ : is_true (dvdn d p), False *) by move/pr_p=> /orP[] /eqP def_d; rewrite def_d ltnn ?andbF in n1pd. (* Goal: Bool.reflect (and (is_true (leq (S (S O)) p)) (forall (d : nat) (_ : is_true (dvdn d p)), is_true (orb (@eq_op nat_eqType d (S O)) (@eq_op nat_eqType d p)))) (negb false) *) have [lep1 | lt1p] := leqP; first by case: pr_p; left. (* Goal: Bool.reflect (and (is_true true) (forall (d : nat) (_ : is_true (dvdn d p)), is_true (orb (@eq_op nat_eqType d (S O)) (@eq_op nat_eqType d p)))) (negb false) *) left; split=> // d dv_d_p; apply/norP=> [[nd1 ndp]]; case: pr_p; right. (* Goal: @ex2 nat (fun d : nat => is_true (andb (leq (S (S O)) d) (leq (S d) p))) (fun d : nat => is_true (dvdn d p)) *) exists d; rewrite // andbC 2!ltn_neqAle ndp eq_sym nd1. (* Goal: is_true (andb (andb true (leq d p)) (andb true (leq (S O) d))) *) by have lt0p := ltnW lt1p; rewrite dvdn_leq // (dvdn_gt0 lt0p). Qed. Lemma prime_nt_dvdP d p : prime p -> d != 1 -> reflect (d = p) (d %| p). Proof. (* Goal: forall (_ : is_true (prime p)) (_ : is_true (negb (@eq_op nat_eqType d (S O)))), Bool.reflect (@eq (Equality.sort nat_eqType) d p) (dvdn d p) *) case/primeP=> _ min_p d_neq1; apply: (iffP idP) => [/min_p|-> //]. (* Goal: forall _ : is_true (orb (@eq_op nat_eqType d (S O)) (@eq_op nat_eqType d p)), @eq (Equality.sort nat_eqType) d p *) by rewrite (negPf d_neq1) /= => /eqP. Qed. Arguments primeP {p}. Arguments primePn {n}. Lemma prime_gt1 p : prime p -> 1 < p. Proof. (* Goal: forall _ : is_true (prime p), is_true (leq (S (S O)) p) *) by case/primeP. Qed. Lemma prime_gt0 p : prime p -> 0 < p. Proof. (* Goal: forall _ : is_true (prime p), is_true (leq (S O) p) *) by move/prime_gt1; apply: ltnW. Qed. Hint Resolve prime_gt1 prime_gt0 : core. Lemma prod_prime_decomp n : n > 0 -> n = \prod_(f <- prime_decomp n) f.1 ^ f.2. Proof. (* Goal: forall _ : is_true (leq (S O) n), @eq nat n (@BigOp.bigop nat (prod nat nat) (S O) (prime_decomp n) (fun f : prod nat nat => @BigBody nat (prod nat nat) f muln true (expn (@fst nat nat f) (@snd nat nat f)))) *) by case/prime_decomp_correct. Qed. Lemma even_prime p : prime p -> p = 2 \/ odd p. Proof. (* Goal: forall _ : is_true (prime p), or (@eq nat p (S (S O))) (is_true (odd p)) *) move=> pr_p; case odd_p: (odd p); [by right | left]. (* Goal: @eq nat p (S (S O)) *) have: 2 %| p by rewrite dvdn2 odd_p. (* Goal: forall _ : is_true (dvdn (S (S O)) p), @eq nat p (S (S O)) *) by case/primeP: pr_p => _ dv_p /dv_p/(2 =P p). Qed. Lemma prime_oddPn p : prime p -> reflect (p = 2) (~~ odd p). Proof. (* Goal: forall _ : is_true (prime p), Bool.reflect (@eq nat p (S (S O))) (negb (odd p)) *) by move=> p_pr; apply: (iffP idP) => [|-> //]; case/even_prime: p_pr => ->. Qed. Lemma odd_prime_gt2 p : odd p -> prime p -> p > 2. Proof. (* Goal: forall (_ : is_true (odd p)) (_ : is_true (prime p)), is_true (leq (S (S (S O))) p) *) by move=> odd_p /prime_gt1; apply: odd_gt2. Qed. Lemma mem_prime_decomp n p e : (p, e) \in prime_decomp n -> [/\ prime p, e > 0 & p ^ e %| n]. Lemma prime_coprime p m : prime p -> coprime p m = ~~ (p %| m). Proof. (* Goal: forall _ : is_true (prime p), @eq bool (coprime p m) (negb (dvdn p m)) *) case/primeP=> p_gt1 p_pr; apply/eqP/negP=> [d1 | ndv_pm]. (* Goal: @eq (Equality.sort nat_eqType) (gcdn p m) (S O) *) (* Goal: not (is_true (dvdn p m)) *) case/dvdnP=> k def_m; rewrite -(addn0 m) def_m gcdnMDl gcdn0 in d1. (* Goal: @eq (Equality.sort nat_eqType) (gcdn p m) (S O) *) (* Goal: False *) by rewrite d1 in p_gt1. (* Goal: @eq (Equality.sort nat_eqType) (gcdn p m) (S O) *) by apply: gcdn_def => // d /p_pr /orP[] /eqP->. Qed. Lemma dvdn_prime2 p q : prime p -> prime q -> (p %| q) = (p == q). Lemma Euclid_dvdM m n p : prime p -> (p %| m * n) = (p %| m) || (p %| n). Proof. (* Goal: forall _ : is_true (prime p), @eq bool (dvdn p (muln m n)) (orb (dvdn p m) (dvdn p n)) *) move=> pr_p; case dv_pm: (p %| m); first exact: dvdn_mulr. (* Goal: @eq bool (dvdn p (muln m n)) (orb false (dvdn p n)) *) by rewrite Gauss_dvdr // prime_coprime // dv_pm. Qed. Lemma Euclid_dvd1 p : prime p -> (p %| 1) = false. Proof. (* Goal: forall _ : is_true (prime p), @eq bool (dvdn p (S O)) false *) by rewrite dvdn1; case: eqP => // ->. Qed. Lemma Euclid_dvdX m n p : prime p -> (p %| m ^ n) = (p %| m) && (n > 0). Proof. (* Goal: forall _ : is_true (prime p), @eq bool (dvdn p (expn m n)) (andb (dvdn p m) (leq (S O) n)) *) case: n => [|n] pr_p; first by rewrite andbF Euclid_dvd1. (* Goal: @eq bool (dvdn p (expn m (S n))) (andb (dvdn p m) (leq (S O) (S n))) *) by apply: (inv_inj negbK); rewrite !andbT -!prime_coprime // coprime_pexpr. Qed. Lemma mem_primes p n : (p \in primes n) = [&& prime p, n > 0 & p %| n]. Proof. (* Goal: @eq bool (@in_mem (Equality.sort nat_eqType) p (@mem (Equality.sort nat_eqType) (seq_predType nat_eqType) (primes n))) (andb (prime p) (andb (leq (S O) n) (dvdn p n))) *) rewrite andbCA; case: posnP => [-> // | /= n_gt0]. (* Goal: @eq bool (@in_mem nat p (@mem nat (seq_predType nat_eqType) (primes n))) (andb (prime p) (dvdn p n)) *) apply/mapP/andP=> [[[q e]]|[pr_p]] /=. (* Goal: forall _ : is_true (dvdn p n), @ex2 (prod nat nat) (fun x : prod nat nat => is_true (@in_mem (prod nat nat) x (@mem (prod nat nat) (seq_predType (prod_eqType nat_eqType nat_eqType)) (prime_decomp n)))) (fun x : prod nat nat => @eq nat p (@fst nat nat x)) *) (* Goal: forall (_ : is_true (@in_mem (prod nat nat) (@pair nat nat q e) (@mem (prod nat nat) (seq_predType (prod_eqType nat_eqType nat_eqType)) (prime_decomp n)))) (_ : @eq nat p q), and (is_true (prime p)) (is_true (dvdn p n)) *) case/mem_prime_decomp=> pr_q e_gt0; case/dvdnP=> u -> -> {p}. (* Goal: forall _ : is_true (dvdn p n), @ex2 (prod nat nat) (fun x : prod nat nat => is_true (@in_mem (prod nat nat) x (@mem (prod nat nat) (seq_predType (prod_eqType nat_eqType nat_eqType)) (prime_decomp n)))) (fun x : prod nat nat => @eq nat p (@fst nat nat x)) *) (* Goal: and (is_true (prime q)) (is_true (dvdn q (muln u (expn q e)))) *) by rewrite -(prednK e_gt0) expnS mulnCA dvdn_mulr. (* Goal: forall _ : is_true (dvdn p n), @ex2 (prod nat nat) (fun x : prod nat nat => is_true (@in_mem (prod nat nat) x (@mem (prod nat nat) (seq_predType (prod_eqType nat_eqType nat_eqType)) (prime_decomp n)))) (fun x : prod nat nat => @eq nat p (@fst nat nat x)) *) rewrite {1}(prod_prime_decomp n_gt0) big_seq. (* Goal: forall _ : is_true (dvdn p (@BigOp.bigop nat (Equality.sort (prod_eqType nat_eqType nat_eqType)) (S O) (prime_decomp n) (fun i : Equality.sort (prod_eqType nat_eqType nat_eqType) => @BigBody nat (Equality.sort (prod_eqType nat_eqType nat_eqType)) i muln (@in_mem (Equality.sort (prod_eqType nat_eqType nat_eqType)) i (@mem (Equality.sort (prod_eqType nat_eqType nat_eqType)) (seq_predType (prod_eqType nat_eqType nat_eqType)) (prime_decomp n))) (expn (@fst nat nat i) (@snd nat nat i))))), @ex2 (prod nat nat) (fun x : prod nat nat => is_true (@in_mem (prod nat nat) x (@mem (prod nat nat) (seq_predType (prod_eqType nat_eqType nat_eqType)) (prime_decomp n)))) (fun x : prod nat nat => @eq nat p (@fst nat nat x)) *) apply big_ind => [| u v IHu IHv | [q e] /= mem_qe dv_p_qe]. (* Goal: @ex2 (prod nat nat) (fun x : prod nat nat => is_true (@in_mem (prod nat nat) x (@mem (prod nat nat) (seq_predType (prod_eqType nat_eqType nat_eqType)) (prime_decomp n)))) (fun x : prod nat nat => @eq nat p (@fst nat nat x)) *) (* Goal: forall _ : is_true (dvdn p (muln u v)), @ex2 (prod nat nat) (fun x : prod nat nat => is_true (@in_mem (prod nat nat) x (@mem (prod nat nat) (seq_predType (prod_eqType nat_eqType nat_eqType)) (prime_decomp n)))) (fun x : prod nat nat => @eq nat p (@fst nat nat x)) *) (* Goal: forall _ : is_true (dvdn p (S O)), @ex2 (prod nat nat) (fun x : prod nat nat => is_true (@in_mem (prod nat nat) x (@mem (prod nat nat) (seq_predType (prod_eqType nat_eqType nat_eqType)) (prime_decomp n)))) (fun x : prod nat nat => @eq nat p (@fst nat nat x)) *) - (* Goal: @ex2 (prod nat nat) (fun x : prod nat nat => is_true (@in_mem (prod nat nat) x (@mem (prod nat nat) (seq_predType (prod_eqType nat_eqType nat_eqType)) (prime_decomp n)))) (fun x : prod nat nat => @eq nat p (@fst nat nat x)) *) (* Goal: forall _ : is_true (dvdn p (muln u v)), @ex2 (prod nat nat) (fun x : prod nat nat => is_true (@in_mem (prod nat nat) x (@mem (prod nat nat) (seq_predType (prod_eqType nat_eqType nat_eqType)) (prime_decomp n)))) (fun x : prod nat nat => @eq nat p (@fst nat nat x)) *) (* Goal: forall _ : is_true (dvdn p (S O)), @ex2 (prod nat nat) (fun x : prod nat nat => is_true (@in_mem (prod nat nat) x (@mem (prod nat nat) (seq_predType (prod_eqType nat_eqType nat_eqType)) (prime_decomp n)))) (fun x : prod nat nat => @eq nat p (@fst nat nat x)) *) by rewrite Euclid_dvd1. (* Goal: @ex2 (prod nat nat) (fun x : prod nat nat => is_true (@in_mem (prod nat nat) x (@mem (prod nat nat) (seq_predType (prod_eqType nat_eqType nat_eqType)) (prime_decomp n)))) (fun x : prod nat nat => @eq nat p (@fst nat nat x)) *) (* Goal: forall _ : is_true (dvdn p (muln u v)), @ex2 (prod nat nat) (fun x : prod nat nat => is_true (@in_mem (prod nat nat) x (@mem (prod nat nat) (seq_predType (prod_eqType nat_eqType nat_eqType)) (prime_decomp n)))) (fun x : prod nat nat => @eq nat p (@fst nat nat x)) *) - (* Goal: @ex2 (prod nat nat) (fun x : prod nat nat => is_true (@in_mem (prod nat nat) x (@mem (prod nat nat) (seq_predType (prod_eqType nat_eqType nat_eqType)) (prime_decomp n)))) (fun x : prod nat nat => @eq nat p (@fst nat nat x)) *) (* Goal: forall _ : is_true (dvdn p (muln u v)), @ex2 (prod nat nat) (fun x : prod nat nat => is_true (@in_mem (prod nat nat) x (@mem (prod nat nat) (seq_predType (prod_eqType nat_eqType nat_eqType)) (prime_decomp n)))) (fun x : prod nat nat => @eq nat p (@fst nat nat x)) *) by rewrite Euclid_dvdM // => /orP[]. (* Goal: @ex2 (prod nat nat) (fun x : prod nat nat => is_true (@in_mem (prod nat nat) x (@mem (prod nat nat) (seq_predType (prod_eqType nat_eqType nat_eqType)) (prime_decomp n)))) (fun x : prod nat nat => @eq nat p (@fst nat nat x)) *) exists (q, e) => //=; case/mem_prime_decomp: mem_qe => pr_q _ _. (* Goal: @eq nat p q *) by rewrite Euclid_dvdX // dvdn_prime2 // in dv_p_qe; case: eqP dv_p_qe. Qed. Lemma sorted_primes n : sorted ltn (primes n). Proof. (* Goal: is_true (@sorted nat_eqType (@rel_of_simpl_rel nat ltn) (primes n)) *) by case: (posnP n) => [-> // | /prime_decomp_correct[_ _]]; apply: path_sorted. Qed. Lemma eq_primes m n : (primes m =i primes n) <-> (primes m = primes n). Proof. (* Goal: iff (@eq_mem (Equality.sort nat_eqType) (@mem (Equality.sort nat_eqType) (seq_predType nat_eqType) (primes m)) (@mem (Equality.sort nat_eqType) (seq_predType nat_eqType) (primes n))) (@eq (list nat) (primes m) (primes n)) *) split=> [eqpr| -> //]. (* Goal: @eq (list nat) (primes m) (primes n) *) by apply: (eq_sorted_irr ltn_trans ltnn); rewrite ?sorted_primes. Qed. Lemma primes_uniq n : uniq (primes n). Proof. (* Goal: is_true (@uniq nat_eqType (primes n)) *) exact: (sorted_uniq ltn_trans ltnn (sorted_primes n)). Qed. Lemma pi_pdiv n : (pdiv n \in \pi(n)) = (n > 1). Proof. (* Goal: @eq bool (@in_mem nat (pdiv n) (@mem nat (simplPredType nat) (pi_of n))) (leq (S (S O)) n) *) case: n => [|[|n]] //; rewrite /pdiv !inE /primes. (* Goal: @eq bool (@in_mem (Equality.sort nat_eqType) (@head nat (S O) (@unzip1 nat nat (prime_decomp (S (S n))))) (@mem (Equality.sort nat_eqType) (seq_predType nat_eqType) (@unzip1 nat nat (prime_decomp (S (S n)))))) (leq (S (S O)) (S (S n))) *) have:= prod_prime_decomp (ltn0Sn n.+1); rewrite unlock. (* Goal: forall _ : @eq nat (S (S n)) (@reducebig nat (prod nat nat) (S O) (prime_decomp (S (S n))) (fun f : prod nat nat => @BigBody nat (prod nat nat) f muln true (expn (@fst nat nat f) (@snd nat nat f)))), @eq bool (@in_mem (Equality.sort nat_eqType) (@head nat (S O) (@unzip1 nat nat (prime_decomp (S (S n))))) (@mem (Equality.sort nat_eqType) (seq_predType nat_eqType) (@unzip1 nat nat (prime_decomp (S (S n)))))) (leq (S (S O)) (S (S n))) *) by case: prime_decomp => //= pf pd _; rewrite mem_head. Qed. Lemma pdiv_prime n : 1 < n -> prime (pdiv n). Proof. (* Goal: forall _ : is_true (leq (S (S O)) n), is_true (prime (pdiv n)) *) by rewrite -pi_pdiv mem_primes; case/and3P. Qed. Lemma pdiv_dvd n : pdiv n %| n. Proof. (* Goal: is_true (dvdn (pdiv n) n) *) by case: n (pi_pdiv n) => [|[|n]] //; rewrite mem_primes=> /and3P[]. Qed. Lemma pi_max_pdiv n : (max_pdiv n \in \pi(n)) = (n > 1). Proof. (* Goal: @eq bool (@in_mem nat (max_pdiv n) (@mem nat (simplPredType nat) (pi_of n))) (leq (S (S O)) n) *) rewrite !inE -pi_pdiv /max_pdiv /pdiv !inE. (* Goal: @eq bool (@in_mem (Equality.sort nat_eqType) (@last nat (S O) (primes n)) (@mem (Equality.sort nat_eqType) (seq_predType nat_eqType) (primes n))) (@in_mem (Equality.sort nat_eqType) (@head nat (S O) (primes n)) (@mem (Equality.sort nat_eqType) (seq_predType nat_eqType) (primes n))) *) by case: (primes n) => //= p ps; rewrite mem_head mem_last. Qed. Lemma max_pdiv_prime n : n > 1 -> prime (max_pdiv n). Proof. (* Goal: forall _ : is_true (leq (S (S O)) n), is_true (prime (max_pdiv n)) *) by rewrite -pi_max_pdiv mem_primes => /andP[]. Qed. Lemma max_pdiv_dvd n : max_pdiv n %| n. Proof. (* Goal: is_true (dvdn (max_pdiv n) n) *) by case: n (pi_max_pdiv n) => [|[|n]] //; rewrite mem_primes => /andP[]. Qed. Lemma pdiv_leq n : 0 < n -> pdiv n <= n. Proof. (* Goal: forall _ : is_true (leq (S O) n), is_true (leq (pdiv n) n) *) by move=> n_gt0; rewrite dvdn_leq // pdiv_dvd. Qed. Lemma max_pdiv_leq n : 0 < n -> max_pdiv n <= n. Proof. (* Goal: forall _ : is_true (leq (S O) n), is_true (leq (max_pdiv n) n) *) by move=> n_gt0; rewrite dvdn_leq // max_pdiv_dvd. Qed. Lemma pdiv_gt0 n : 0 < pdiv n. Proof. (* Goal: is_true (leq (S O) (pdiv n)) *) by case: n => [|[|n]] //; rewrite prime_gt0 ?pdiv_prime. Qed. Lemma max_pdiv_gt0 n : 0 < max_pdiv n. Proof. (* Goal: is_true (leq (S O) (max_pdiv n)) *) by case: n => [|[|n]] //; rewrite prime_gt0 ?max_pdiv_prime. Qed. Hint Resolve pdiv_gt0 max_pdiv_gt0 : core. Lemma pdiv_min_dvd m d : 1 < d -> d %| m -> pdiv m <= d. Lemma max_pdiv_max n p : p \in \pi(n) -> p <= max_pdiv n. Proof. (* Goal: forall _ : is_true (@in_mem nat p (@mem nat (simplPredType nat) (pi_of n))), is_true (leq p (max_pdiv n)) *) rewrite /max_pdiv !inE => n_p. (* Goal: is_true (leq p (@last nat (S O) (primes n))) *) case/splitPr: n_p (sorted_primes n) => p1 p2; rewrite last_cat -cat_rcons /=. (* Goal: forall _ : is_true (@sorted nat_eqType (@rel_of_simpl_rel nat ltn) (@cat nat (@rcons nat p1 p) p2)), is_true (leq p (@last nat p p2)) *) rewrite headI /= cat_path -(last_cons 0) -headI last_rcons; case/andP=> _. (* Goal: forall _ : is_true (@path nat (@rel_of_simpl_rel nat ltn) p p2), is_true (leq p (@last nat p p2)) *) move/(order_path_min ltn_trans); case/lastP: p2 => //= p2 q. (* Goal: forall _ : is_true (@all nat (fun n : nat => leq (S p) n) (@rcons nat p2 q)), is_true (leq p (@last nat p (@rcons nat p2 q))) *) by rewrite all_rcons last_rcons ltn_neqAle -andbA => /and3P[]. Qed. Lemma ltn_pdiv2_prime n : 0 < n -> n < pdiv n ^ 2 -> prime n. Proof. (* Goal: forall (_ : is_true (leq (S O) n)) (_ : is_true (leq (S n) (expn (pdiv n) (S (S O))))), is_true (prime n) *) case def_n: n => [|[|n']] // _; rewrite -def_n => lt_n_p2. (* Goal: is_true (prime n) *) suffices ->: n = pdiv n by rewrite pdiv_prime ?def_n. (* Goal: @eq nat n (pdiv n) *) apply/eqP; rewrite eqn_leq leqNgt andbC pdiv_leq; last by rewrite def_n. (* Goal: is_true (andb true (negb (leq (S (pdiv n)) n))) *) move: lt_n_p2; rewrite ltnNge; apply: contra => lt_pm_m. (* Goal: is_true (leq (expn (pdiv n) (S (S O))) n) *) case/dvdnP: (pdiv_dvd n) => q def_q. (* Goal: is_true (leq (expn (pdiv n) (S (S O))) n) *) rewrite {2}def_q -mulnn leq_pmul2r // pdiv_min_dvd //. (* Goal: is_true (dvdn q n) *) (* Goal: is_true (leq (S (S O)) q) *) by rewrite -[pdiv n]mul1n {2}def_q ltn_pmul2r in lt_pm_m. (* Goal: is_true (dvdn q n) *) by rewrite def_q dvdn_mulr. Qed. Lemma primePns n : reflect (n < 2 \/ exists p, [/\ prime p, p ^ 2 <= n & p %| n]) (~~ prime n). Arguments primePns {n}. Lemma pdivP n : n > 1 -> {p | prime p & p %| n}. Proof. (* Goal: forall _ : is_true (leq (S (S O)) n), @sig2 nat (fun p : nat => is_true (prime p)) (fun p : nat => is_true (dvdn p n)) *) by move=> lt1n; exists (pdiv n); rewrite ?pdiv_dvd ?pdiv_prime. Qed. Lemma primes_mul m n p : m > 0 -> n > 0 -> (p \in primes (m * n)) = (p \in primes m) || (p \in primes n). Proof. (* Goal: forall (_ : is_true (leq (S O) m)) (_ : is_true (leq (S O) n)), @eq bool (@in_mem (Equality.sort nat_eqType) p (@mem (Equality.sort nat_eqType) (seq_predType nat_eqType) (primes (muln m n)))) (orb (@in_mem (Equality.sort nat_eqType) p (@mem (Equality.sort nat_eqType) (seq_predType nat_eqType) (primes m))) (@in_mem (Equality.sort nat_eqType) p (@mem (Equality.sort nat_eqType) (seq_predType nat_eqType) (primes n)))) *) move=> m_gt0 n_gt0; rewrite !mem_primes muln_gt0 m_gt0 n_gt0. (* Goal: @eq bool (andb (prime p) (andb (andb true true) (dvdn p (muln m n)))) (orb (andb (prime p) (andb true (dvdn p m))) (andb (prime p) (andb true (dvdn p n)))) *) by case pr_p: (prime p); rewrite // Euclid_dvdM. Qed. Lemma primes_exp m n : n > 0 -> primes (m ^ n) = primes m. Proof. (* Goal: forall _ : is_true (leq (S O) n), @eq (list nat) (primes (expn m n)) (primes m) *) case: n => // n _; rewrite expnS; case: (posnP m) => [-> //| m_gt0]. (* Goal: @eq (list nat) (primes (muln m (expn m n))) (primes m) *) apply/eq_primes => /= p; elim: n => [|n IHn]; first by rewrite muln1. (* Goal: @eq bool (@in_mem nat p (@mem nat (seq_predType nat_eqType) (primes (muln m (expn m (S n)))))) (@in_mem nat p (@mem nat (seq_predType nat_eqType) (primes m))) *) by rewrite primes_mul ?(expn_gt0, expnS, IHn, orbb, m_gt0). Qed. Lemma primes_prime p : prime p -> primes p = [::p]. Lemma coprime_has_primes m n : m > 0 -> n > 0 -> coprime m n = ~~ has (mem (primes m)) (primes n). Proof. (* Goal: forall (_ : is_true (leq (S O) m)) (_ : is_true (leq (S O) n)), @eq bool (coprime m n) (negb (@has (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) (primes m)))) (primes n))) *) move=> m_gt0 n_gt0; apply/eqnP/hasPn=> [mn1 p | no_p_mn]. (* Goal: @eq nat (gcdn m n) (S O) *) (* Goal: forall _ : is_true (@in_mem (Equality.sort nat_eqType) p (@mem (Equality.sort nat_eqType) (seq_predType nat_eqType) (primes n))), is_true (negb (@pred_of_simpl (Equality.sort nat_eqType) (@pred_of_mem_pred (Equality.sort nat_eqType) (@mem (Equality.sort nat_eqType) (seq_predType nat_eqType) (primes m))) p)) *) rewrite /= !mem_primes m_gt0 n_gt0 /= => /andP[pr_p p_n]. (* Goal: @eq nat (gcdn m n) (S O) *) (* Goal: is_true (negb (andb (prime p) (dvdn p m))) *) have:= prime_gt1 pr_p; rewrite pr_p ltnNge -mn1 /=; apply: contra => p_m. (* Goal: @eq nat (gcdn m n) (S O) *) (* Goal: is_true (leq p (gcdn m n)) *) by rewrite dvdn_leq ?gcdn_gt0 ?m_gt0 // dvdn_gcd ?p_m. (* Goal: @eq nat (gcdn m n) (S O) *) case: (ltngtP (gcdn m n) 1) => //; first by rewrite ltnNge gcdn_gt0 ?m_gt0. (* Goal: forall _ : is_true (leq (S (S O)) (gcdn m n)), @eq nat (gcdn m n) (S O) *) move/pdiv_prime; set p := pdiv _ => pr_p. (* Goal: @eq nat (gcdn m n) (S O) *) move/implyP: (no_p_mn p); rewrite /= !mem_primes m_gt0 n_gt0 pr_p /=. (* Goal: forall _ : is_true (implb (dvdn p n) (negb (dvdn p m))), @eq nat (gcdn m n) (S O) *) by rewrite !(dvdn_trans (pdiv_dvd _)) // (dvdn_gcdl, dvdn_gcdr). Qed. Lemma pdiv_id p : prime p -> pdiv p = p. Proof. (* Goal: forall _ : is_true (prime p), @eq nat (pdiv p) p *) by move=> p_pr; rewrite /pdiv primes_prime. Qed. Lemma pdiv_pfactor p k : prime p -> pdiv (p ^ k.+1) = p. Proof. (* Goal: forall _ : is_true (prime p), @eq nat (pdiv (expn p (S k))) p *) by move=> p_pr; rewrite /pdiv primes_exp ?primes_prime. Qed. Lemma prime_above m : {p | m < p & prime p}. Proof. (* Goal: @sig2 nat (fun p : nat => is_true (leq (S m) p)) (fun p : nat => is_true (prime p)) *) have /pdivP[p pr_p p_dv_m1]: 1 < m`! + 1 by rewrite addn1 ltnS fact_gt0. (* Goal: @sig2 nat (fun p : nat => is_true (leq (S m) p)) (fun p : nat => is_true (prime p)) *) exists p => //; rewrite ltnNge; apply: contraL p_dv_m1 => p_le_m. (* Goal: is_true (negb (dvdn p (addn (factorial m) (S O)))) *) by rewrite dvdn_addr ?dvdn_fact ?prime_gt0 // gtnNdvd ?prime_gt1. Qed. Fixpoint logn_rec d m r := match r, edivn m d with | r'.+1, (_.+1 as m', 0) => (logn_rec d m' r').+1 | _, _ => 0 end. Definition logn p m := if prime p then logn_rec p m m else 0. Lemma lognE p m : logn p m = if [&& prime p, 0 < m & p %| m] then (logn p (m %/ p)).+1 else 0. Proof. (* Goal: @eq nat (logn p m) (if andb (prime p) (andb (leq (S O) m) (dvdn p m)) then S (logn p (divn m p)) else O) *) rewrite /logn /dvdn; case p_pr: (prime p) => //. (* Goal: @eq nat (logn_rec p m m) (if andb true (andb (leq (S O) m) (@eq_op nat_eqType (modn m p) O)) then S (logn_rec p (divn m p) (divn m p)) else O) *) rewrite /divn modn_def; case def_m: {2 3}m => [|m'] //=. (* Goal: @eq nat (let (m'0, n) := edivn m p in match m'0 with | O => O | S n0 => match n with | O => S (logn_rec p m'0 m') | S n1 => O end end) (if @eq_op nat_eqType (@snd nat nat (edivn m p)) O then S (logn_rec p (@fst nat nat (edivn m p)) (@fst nat nat (edivn m p))) else O) *) case: edivnP def_m => [[|q] [|r] -> _] // def_m; congr _.+1; rewrite [_.1]/=. (* Goal: @eq nat (logn_rec p (S q) m') (logn_rec p (S q) (S q)) *) have{m def_m}: q < m'. (* Goal: forall _ : is_true (leq (S q) m'), @eq nat (logn_rec p (S q) m') (logn_rec p (S q) (S q)) *) (* Goal: is_true (leq (S q) m') *) by rewrite -ltnS -def_m addn0 mulnC -{1}[q.+1]mul1n ltn_pmul2r // prime_gt1. (* Goal: forall _ : is_true (leq (S q) m'), @eq nat (logn_rec p (S q) m') (logn_rec p (S q) (S q)) *) elim: {m' q}_.+1 {-2}m' q.+1 (ltnSn m') (ltn0Sn q) => // s IHs. (* Goal: forall (m' n : nat) (_ : is_true (leq (S m') (S s))) (_ : is_true (leq (S O) n)) (_ : is_true (leq n m')), @eq nat (logn_rec p n m') (logn_rec p n n) *) case=> [[]|r] //= m; rewrite ltnS => lt_rs m_gt0 le_mr. (* Goal: @eq nat (let (m', n) := edivn m p in match m' with | O => O | S n0 => match n with | O => S (logn_rec p m' r) | S n1 => O end end) (logn_rec p m m) *) rewrite -{3}[m]prednK //=; case: edivnP => [[|q] [|_] def_q _] //. (* Goal: @eq nat (S (logn_rec p (S q) r)) (S (logn_rec p (S q) (Nat.pred m))) *) have{def_q} lt_qm': q < m.-1. (* Goal: @eq nat (S (logn_rec p (S q) r)) (S (logn_rec p (S q) (Nat.pred m))) *) (* Goal: is_true (leq (S q) (Nat.pred m)) *) by rewrite -[q.+1]muln1 -ltnS prednK // def_q addn0 ltn_pmul2l // prime_gt1. (* Goal: @eq nat (S (logn_rec p (S q) r)) (S (logn_rec p (S q) (Nat.pred m))) *) have{le_mr} le_m'r: m.-1 <= r by rewrite -ltnS prednK. (* Goal: @eq nat (S (logn_rec p (S q) r)) (S (logn_rec p (S q) (Nat.pred m))) *) by rewrite (IHs r) ?(IHs m.-1) // ?(leq_trans lt_qm', leq_trans _ lt_rs). Qed. Lemma logn_gt0 p n : (0 < logn p n) = (p \in primes n). Proof. (* Goal: @eq bool (leq (S O) (logn p n)) (@in_mem nat p (@mem (Equality.sort nat_eqType) (seq_predType nat_eqType) (primes n))) *) by rewrite lognE -mem_primes; case: {+}(p \in _). Qed. Lemma ltn_log0 p n : n < p -> logn p n = 0. Proof. (* Goal: forall _ : is_true (leq (S n) p), @eq nat (logn p n) O *) by case: n => [|n] ltnp; rewrite lognE ?andbF // gtnNdvd ?andbF. Qed. Lemma logn0 p : logn p 0 = 0. Proof. (* Goal: @eq nat (logn p O) O *) by rewrite /logn if_same. Qed. Lemma logn1 p : logn p 1 = 0. Proof. (* Goal: @eq nat (logn p (S O)) O *) by rewrite lognE dvdn1 /= andbC; case: eqP => // ->. Qed. Lemma pfactor_gt0 p n : 0 < p ^ logn p n. Proof. (* Goal: is_true (leq (S O) (expn p (logn p n))) *) by rewrite expn_gt0 lognE; case: (posnP p) => // ->. Qed. Hint Resolve pfactor_gt0 : core. Lemma pfactor_dvdn p n m : prime p -> m > 0 -> (p ^ n %| m) = (n <= logn p m). Proof. (* Goal: forall (_ : is_true (prime p)) (_ : is_true (leq (S O) m)), @eq bool (dvdn (expn p n) m) (leq n (logn p m)) *) move=> p_pr; elim: n m => [|n IHn] m m_gt0; first exact: dvd1n. (* Goal: @eq bool (dvdn (expn p (S n)) m) (leq (S n) (logn p m)) *) rewrite lognE p_pr m_gt0 /=; case dv_pm: (p %| m); last first. (* Goal: @eq bool (dvdn (expn p (S n)) m) (leq (S n) (S (logn p (divn m p)))) *) (* Goal: @eq bool (dvdn (expn p (S n)) m) (leq (S n) O) *) apply/dvdnP=> [] [/= q def_m]. (* Goal: @eq bool (dvdn (expn p (S n)) m) (leq (S n) (S (logn p (divn m p)))) *) (* Goal: False *) by rewrite def_m expnS mulnCA dvdn_mulr in dv_pm. (* Goal: @eq bool (dvdn (expn p (S n)) m) (leq (S n) (S (logn p (divn m p)))) *) case/dvdnP: dv_pm m_gt0 => q ->{m}; rewrite muln_gt0 => /andP[p_gt0 q_gt0]. (* Goal: @eq bool (dvdn (expn p (S n)) (muln q p)) (leq (S n) (S (logn p (divn (muln q p) p)))) *) by rewrite expnSr dvdn_pmul2r // mulnK // IHn. Qed. Lemma pfactor_dvdnn p n : p ^ logn p n %| n. Proof. (* Goal: is_true (dvdn (expn p (logn p n)) n) *) case: n => // n; case pr_p: (prime p); first by rewrite pfactor_dvdn. (* Goal: is_true (dvdn (expn p (logn p (S n))) (S n)) *) by rewrite lognE pr_p dvd1n. Qed. Lemma logn_prime p q : prime q -> logn p q = (p == q). Proof. (* Goal: forall _ : is_true (prime q), @eq nat (logn p q) (nat_of_bool (@eq_op nat_eqType p q)) *) move=> pr_q; have q_gt0 := prime_gt0 pr_q; rewrite lognE q_gt0 /=. (* Goal: @eq nat (if andb (prime p) (dvdn p q) then S (logn p (divn q p)) else O) (nat_of_bool (@eq_op nat_eqType p q)) *) case pr_p: (prime p); last by case: eqP pr_p pr_q => // -> ->. (* Goal: @eq nat (if andb true (dvdn p q) then S (logn p (divn q p)) else O) (nat_of_bool (@eq_op nat_eqType p q)) *) by rewrite dvdn_prime2 //; case: eqP => // ->; rewrite divnn q_gt0 logn1. Qed. Lemma pfactor_coprime p n : prime p -> n > 0 -> {m | coprime p m & n = m * p ^ logn p n}. Proof. (* Goal: forall (_ : is_true (prime p)) (_ : is_true (leq (S O) n)), @sig2 nat (fun m : nat => is_true (coprime p m)) (fun m : nat => @eq nat n (muln m (expn p (logn p n)))) *) move=> p_pr n_gt0; set k := logn p n. (* Goal: @sig2 nat (fun m : nat => is_true (coprime p m)) (fun m : nat => @eq nat n (muln m (expn p k))) *) have dv_pk_n: p ^ k %| n by rewrite pfactor_dvdn. (* Goal: @sig2 nat (fun m : nat => is_true (coprime p m)) (fun m : nat => @eq nat n (muln m (expn p k))) *) exists (n %/ p ^ k); last by rewrite divnK. (* Goal: is_true (coprime p (divn n (expn p k))) *) rewrite prime_coprime // -(@dvdn_pmul2r (p ^ k)) ?expn_gt0 ?prime_gt0 //. (* Goal: is_true (negb (dvdn (muln p (expn p k)) (muln (divn n (expn p k)) (expn p k)))) *) by rewrite -expnS divnK // pfactor_dvdn // ltnn. Qed. Lemma pfactorK p n : prime p -> logn p (p ^ n) = n. Proof. (* Goal: forall _ : is_true (prime p), @eq nat (logn p (expn p n)) n *) move=> p_pr; have pn_gt0: p ^ n > 0 by rewrite expn_gt0 prime_gt0. (* Goal: @eq nat (logn p (expn p n)) n *) apply/eqP; rewrite eqn_leq -pfactor_dvdn // dvdnn andbT. (* Goal: is_true (leq (logn p (expn p n)) n) *) by rewrite -(leq_exp2l _ _ (prime_gt1 p_pr)) dvdn_leq // pfactor_dvdn. Qed. Lemma pfactorKpdiv p n : prime p -> logn (pdiv (p ^ n)) (p ^ n) = n. Proof. (* Goal: forall _ : is_true (prime p), @eq nat (logn (pdiv (expn p n)) (expn p n)) n *) by case: n => // n p_pr; rewrite pdiv_pfactor ?pfactorK. Qed. Lemma dvdn_leq_log p m n : 0 < n -> m %| n -> logn p m <= logn p n. Proof. (* Goal: forall (_ : is_true (leq (S O) n)) (_ : is_true (dvdn m n)), is_true (leq (logn p m) (logn p n)) *) move=> n_gt0 dv_m_n; have m_gt0 := dvdn_gt0 n_gt0 dv_m_n. (* Goal: is_true (leq (logn p m) (logn p n)) *) case p_pr: (prime p); last by do 2!rewrite lognE p_pr /=. (* Goal: is_true (leq (logn p m) (logn p n)) *) by rewrite -pfactor_dvdn //; apply: dvdn_trans dv_m_n; rewrite pfactor_dvdn. Qed. Lemma ltn_logl p n : 0 < n -> logn p n < n. Proof. (* Goal: forall _ : is_true (leq (S O) n), is_true (leq (S (logn p n)) n) *) move=> n_gt0; have [p_gt1 | p_le1] := boolP (1 < p). (* Goal: is_true (leq (S (logn p n)) n) *) (* Goal: is_true (leq (S (logn p n)) n) *) by rewrite (leq_trans (ltn_expl _ p_gt1)) // dvdn_leq ?pfactor_dvdnn. (* Goal: is_true (leq (S (logn p n)) n) *) by rewrite lognE (contraNF (@prime_gt1 _)). Qed. Lemma logn_Gauss p m n : coprime p m -> logn p (m * n) = logn p n. Proof. (* Goal: forall _ : is_true (coprime p m), @eq nat (logn p (muln m n)) (logn p n) *) move=> co_pm; case p_pr: (prime p); last by rewrite /logn p_pr. (* Goal: @eq nat (logn p (muln m n)) (logn p n) *) have [-> | n_gt0] := posnP n; first by rewrite muln0. (* Goal: @eq nat (logn p (muln m n)) (logn p n) *) have [m0 | m_gt0] := posnP m; first by rewrite m0 prime_coprime ?dvdn0 in co_pm. (* Goal: @eq nat (logn p (muln m n)) (logn p n) *) have mn_gt0: m * n > 0 by rewrite muln_gt0 m_gt0. (* Goal: @eq nat (logn p (muln m n)) (logn p n) *) apply/eqP; rewrite eqn_leq andbC dvdn_leq_log ?dvdn_mull //. (* Goal: is_true (andb true (leq (logn p (muln m n)) (logn p n))) *) set k := logn p _; have: p ^ k %| m * n by rewrite pfactor_dvdn. (* Goal: forall _ : is_true (dvdn (expn p k) (muln m n)), is_true (andb true (leq k (logn p n))) *) by rewrite Gauss_dvdr ?coprime_expl // -pfactor_dvdn. Qed. Lemma lognM p m n : 0 < m -> 0 < n -> logn p (m * n) = logn p m + logn p n. Proof. (* Goal: forall (_ : is_true (leq (S O) m)) (_ : is_true (leq (S O) n)), @eq nat (logn p (muln m n)) (addn (logn p m) (logn p n)) *) case p_pr: (prime p); last by rewrite /logn p_pr. (* Goal: forall (_ : is_true (leq (S O) m)) (_ : is_true (leq (S O) n)), @eq nat (logn p (muln m n)) (addn (logn p m) (logn p n)) *) have xlp := pfactor_coprime p_pr. (* Goal: forall (_ : is_true (leq (S O) m)) (_ : is_true (leq (S O) n)), @eq nat (logn p (muln m n)) (addn (logn p m) (logn p n)) *) case/xlp=> m' co_m' def_m /xlp[n' co_n' def_n] {xlp}. (* Goal: @eq nat (logn p (muln m n)) (addn (logn p m) (logn p n)) *) by rewrite {1}def_m {1}def_n mulnCA -mulnA -expnD !logn_Gauss // pfactorK. Qed. Lemma lognX p m n : logn p (m ^ n) = n * logn p m. Proof. (* Goal: @eq nat (logn p (expn m n)) (muln n (logn p m)) *) case p_pr: (prime p); last by rewrite /logn p_pr muln0. (* Goal: @eq nat (logn p (expn m n)) (muln n (logn p m)) *) elim: n => [|n IHn]; first by rewrite logn1. (* Goal: @eq nat (logn p (expn m (S n))) (muln (S n) (logn p m)) *) have [->|m_gt0] := posnP m; first by rewrite exp0n // lognE andbF muln0. (* Goal: @eq nat (logn p (expn m (S n))) (muln (S n) (logn p m)) *) by rewrite expnS lognM ?IHn // expn_gt0 m_gt0. Qed. Lemma logn_div p m n : m %| n -> logn p (n %/ m) = logn p n - logn p m. Proof. (* Goal: forall _ : is_true (dvdn m n), @eq nat (logn p (divn n m)) (subn (logn p n) (logn p m)) *) rewrite dvdn_eq => /eqP def_n. (* Goal: @eq nat (logn p (divn n m)) (subn (logn p n) (logn p m)) *) case: (posnP n) => [-> |]; first by rewrite div0n logn0. (* Goal: forall _ : is_true (leq (S O) n), @eq nat (logn p (divn n m)) (subn (logn p n) (logn p m)) *) by rewrite -{1 3}def_n muln_gt0 => /andP[q_gt0 m_gt0]; rewrite lognM ?addnK. Qed. Lemma dvdn_pfactor p d n : prime p -> reflect (exists2 m, m <= n & d = p ^ m) (d %| p ^ n). Proof. (* Goal: forall _ : is_true (prime p), Bool.reflect (@ex2 nat (fun m : nat => is_true (leq m n)) (fun m : nat => @eq nat d (expn p m))) (dvdn d (expn p n)) *) move=> p_pr; have pn_gt0: p ^ n > 0 by rewrite expn_gt0 prime_gt0. (* Goal: Bool.reflect (@ex2 nat (fun m : nat => is_true (leq m n)) (fun m : nat => @eq nat d (expn p m))) (dvdn d (expn p n)) *) apply: (iffP idP) => [dv_d_pn|[m le_m_n ->]]; last first. (* Goal: @ex2 nat (fun m : nat => is_true (leq m n)) (fun m : nat => @eq nat d (expn p m)) *) (* Goal: is_true (dvdn (expn p m) (expn p n)) *) by rewrite -(subnK le_m_n) expnD dvdn_mull. (* Goal: @ex2 nat (fun m : nat => is_true (leq m n)) (fun m : nat => @eq nat d (expn p m)) *) exists (logn p d); first by rewrite -(pfactorK n p_pr) dvdn_leq_log. (* Goal: @eq nat d (expn p (logn p d)) *) have d_gt0: d > 0 by apply: dvdn_gt0 dv_d_pn. (* Goal: @eq nat d (expn p (logn p d)) *) case: (pfactor_coprime p_pr d_gt0) => q co_p_q def_d. (* Goal: @eq nat d (expn p (logn p d)) *) rewrite {1}def_d ((q =P 1) _) ?mul1n // -dvdn1. (* Goal: is_true (dvdn q (S O)) *) suff: q %| p ^ n * 1 by rewrite Gauss_dvdr // coprime_sym coprime_expl. (* Goal: is_true (dvdn q (muln (expn p n) (S O))) *) by rewrite muln1 (dvdn_trans _ dv_d_pn) // def_d dvdn_mulr. Qed. Lemma prime_decompE n : prime_decomp n = [seq (p, logn p n) | p <- primes n]. Proof. (* Goal: @eq (list (prod nat nat)) (prime_decomp n) (@map nat (prod nat nat) (fun p : nat => @pair nat nat p (logn p n)) (primes n)) *) case: n => // n; pose f0 := (0, 0); rewrite -map_comp. (* Goal: @eq (list (prod nat nat)) (prime_decomp (S n)) (@map (prod nat nat) (prod nat nat) (@funcomp (prod nat nat) nat (prod nat nat) tt (fun p : nat => @pair nat nat p (logn p (S n))) (@fst nat nat)) (prime_decomp (S n))) *) apply: (@eq_from_nth _ f0) => [|i lt_i_n]; first by rewrite size_map. (* Goal: @eq (prod nat nat) (@nth (prod nat nat) f0 (prime_decomp (S n)) i) (@nth (prod nat nat) f0 (@map (prod nat nat) (prod nat nat) (@funcomp (prod nat nat) nat (prod nat nat) tt (fun p : nat => @pair nat nat p (logn p (S n))) (@fst nat nat)) (prime_decomp (S n))) i) *) rewrite (nth_map f0) //; case def_f: (nth _ _ i) => [p e] /=. (* Goal: @eq (prod nat nat) (@pair nat nat p e) (@pair nat nat p (logn p (S n))) *) congr (_, _); rewrite [n.+1]prod_prime_decomp //. (* Goal: @eq nat e (logn p (@BigOp.bigop nat (prod nat nat) (S O) (prime_decomp (S n)) (fun f : prod nat nat => @BigBody nat (prod nat nat) f muln true (expn (@fst nat nat f) (@snd nat nat f))))) *) have: (p, e) \in prime_decomp n.+1 by rewrite -def_f mem_nth. (* Goal: forall _ : is_true (@in_mem (prod nat nat) (@pair nat nat p e) (@mem (Equality.sort (prod_eqType nat_eqType nat_eqType)) (seq_predType (prod_eqType nat_eqType nat_eqType)) (prime_decomp (S n)))), @eq nat e (logn p (@BigOp.bigop nat (prod nat nat) (S O) (prime_decomp (S n)) (fun f : prod nat nat => @BigBody nat (prod nat nat) f muln true (expn (@fst nat nat f) (@snd nat nat f))))) *) case/mem_prime_decomp=> pr_p _ _. (* Goal: @eq nat e (logn p (@BigOp.bigop nat (prod nat nat) (S O) (prime_decomp (S n)) (fun f : prod nat nat => @BigBody nat (prod nat nat) f muln true (expn (@fst nat nat f) (@snd nat nat f))))) *) rewrite (big_nth f0) big_mkord (bigD1 (Ordinal lt_i_n)) //=. (* Goal: @eq nat e (logn p (muln (expn (@fst nat nat (@nth (prod nat nat) f0 (prime_decomp (S n)) i)) (@snd nat nat (@nth (prod nat nat) f0 (prime_decomp (S n)) i))) (@BigOp.bigop nat (ordinal (@size (prod nat nat) (prime_decomp (S n)))) (S O) (index_enum (ordinal_finType (@size (prod nat nat) (prime_decomp (S n))))) (fun i0 : ordinal (@size (prod nat nat) (prime_decomp (S n))) => @BigBody nat (ordinal (@size (prod nat nat) (prime_decomp (S n)))) i0 muln (negb (@eq_op (Finite.eqType (ordinal_finType (@size (prod nat nat) (prime_decomp (S n))))) i0 (@Ordinal (@size (prod nat nat) (prime_decomp (S n))) i lt_i_n))) (expn (@fst nat nat (@nth (prod nat nat) f0 (prime_decomp (S n)) (@nat_of_ord (@size (prod nat nat) (prime_decomp (S n))) i0))) (@snd nat nat (@nth (prod nat nat) f0 (prime_decomp (S n)) (@nat_of_ord (@size (prod nat nat) (prime_decomp (S n))) i0)))))))) *) rewrite def_f mulnC logn_Gauss ?pfactorK //. (* Goal: is_true (coprime p (@BigOp.bigop nat (ordinal (@size (prod nat nat) (prime_decomp (S n)))) (S O) (index_enum (ordinal_finType (@size (prod nat nat) (prime_decomp (S n))))) (fun i0 : ordinal (@size (prod nat nat) (prime_decomp (S n))) => @BigBody nat (ordinal (@size (prod nat nat) (prime_decomp (S n)))) i0 muln (negb (@eq_op (Finite.eqType (ordinal_finType (@size (prod nat nat) (prime_decomp (S n))))) i0 (@Ordinal (@size (prod nat nat) (prime_decomp (S n))) i lt_i_n))) (expn (@fst nat nat (@nth (prod nat nat) f0 (prime_decomp (S n)) (@nat_of_ord (@size (prod nat nat) (prime_decomp (S n))) i0))) (@snd nat nat (@nth (prod nat nat) f0 (prime_decomp (S n)) (@nat_of_ord (@size (prod nat nat) (prime_decomp (S n))) i0))))))) *) apply big_ind => [|m1 m2 com1 com2| [j ltj] /=]; first exact: coprimen1. (* Goal: forall _ : is_true (negb (@eq_op (Finite.eqType (ordinal_finType (@size (prod nat nat) (prime_decomp (S n))))) (@Ordinal (@size (prod nat nat) (prime_decomp (S n))) j ltj) (@Ordinal (@size (prod nat nat) (prime_decomp (S n))) i lt_i_n))), is_true (coprime p (expn (@fst nat nat (@nth (prod nat nat) f0 (prime_decomp (S n)) j)) (@snd nat nat (@nth (prod nat nat) f0 (prime_decomp (S n)) j)))) *) (* Goal: is_true (coprime p (muln m1 m2)) *) by rewrite coprime_mulr com1. (* Goal: forall _ : is_true (negb (@eq_op (Finite.eqType (ordinal_finType (@size (prod nat nat) (prime_decomp (S n))))) (@Ordinal (@size (prod nat nat) (prime_decomp (S n))) j ltj) (@Ordinal (@size (prod nat nat) (prime_decomp (S n))) i lt_i_n))), is_true (coprime p (expn (@fst nat nat (@nth (prod nat nat) f0 (prime_decomp (S n)) j)) (@snd nat nat (@nth (prod nat nat) f0 (prime_decomp (S n)) j)))) *) rewrite -val_eqE /= => nji; case def_j: (nth _ _ j) => [q e1] /=. (* Goal: is_true (coprime p (expn q e1)) *) have: (q, e1) \in prime_decomp n.+1 by rewrite -def_j mem_nth. (* Goal: forall _ : is_true (@in_mem (prod nat nat) (@pair nat nat q e1) (@mem (Equality.sort (prod_eqType nat_eqType nat_eqType)) (seq_predType (prod_eqType nat_eqType nat_eqType)) (prime_decomp (S n)))), is_true (coprime p (expn q e1)) *) case/mem_prime_decomp=> pr_q e1_gt0 _; rewrite coprime_pexpr //. (* Goal: is_true (coprime p q) *) rewrite prime_coprime // dvdn_prime2 //; apply: contra nji => eq_pq. (* Goal: is_true (@eq_op nat_eqType j i) *) rewrite -(nth_uniq 0 _ _ (primes_uniq n.+1)) ?size_map //=. (* Goal: is_true (@eq_op nat_eqType (@nth nat O (primes (S n)) j) (@nth nat O (primes (S n)) i)) *) by rewrite !(nth_map f0) // def_f def_j /= eq_sym. Qed. Lemma divn_count_dvd d n : n %/ d = \sum_(1 <= i < n.+1) (d %| i). Proof. (* Goal: @eq nat (divn n d) (@BigOp.bigop nat nat O (index_iota (S O) (S n)) (fun i : nat => @BigBody nat nat i addn true (nat_of_bool (dvdn d i)))) *) have [-> | d_gt0] := posnP d; first by rewrite big_add1 divn0 big1. (* Goal: @eq nat (divn n d) (@BigOp.bigop nat nat O (index_iota (S O) (S n)) (fun i : nat => @BigBody nat nat i addn true (nat_of_bool (dvdn d i)))) *) apply: (@addnI (d %| 0)); rewrite -(@big_ltn _ 0 _ 0 _ (dvdn d)) // big_mkord. (* Goal: @eq nat (addn (nat_of_bool (dvdn d O)) (divn n d)) (@BigOp.bigop nat (Finite.sort (ordinal_finType (S n))) O (index_enum (ordinal_finType (S n))) (fun i : ordinal (S n) => @BigBody nat (ordinal (S n)) i addn true (nat_of_bool (dvdn d (@nat_of_ord (S n) i))))) *) rewrite (partition_big (fun i : 'I_n.+1 => inord (i %/ d)) 'I_(n %/ d).+1) //=. (* Goal: @eq nat (addn (nat_of_bool (dvdn d O)) (divn n d)) (@BigOp.bigop nat (ordinal (S (divn n d))) O (index_enum (ordinal_finType (S (divn n d)))) (fun j : ordinal (S (divn n d)) => @BigBody nat (ordinal (S (divn n d))) j addn true (@BigOp.bigop nat (ordinal (S n)) O (index_enum (ordinal_finType (S n))) (fun i : ordinal (S n) => @BigBody nat (ordinal (S n)) i addn (@eq_op (Finite.eqType (ordinal_finType (S (divn n d)))) (@inord (divn n d) (divn (@nat_of_ord (S n) i) d)) j) (nat_of_bool (dvdn d (@nat_of_ord (S n) i))))))) *) rewrite dvdn0 add1n -{1}[_.+1]card_ord -sum1_card; apply: eq_bigr => [[q ?] _]. (* Goal: @eq nat (S O) (@BigOp.bigop nat (ordinal (S n)) O (index_enum (ordinal_finType (S n))) (fun i : ordinal (S n) => @BigBody nat (ordinal (S n)) i addn (@eq_op (Finite.eqType (ordinal_finType (S (divn n d)))) (@inord (divn n d) (divn (@nat_of_ord (S n) i) d)) (@Ordinal (S (divn n d)) q _i_)) (nat_of_bool (dvdn d (@nat_of_ord (S n) i))))) *) rewrite (bigD1 (inord (q * d))) /eq_op /= !inordK ?ltnS -?leq_divRL ?mulnK //. (* Goal: @eq nat (S O) (addn (nat_of_bool (dvdn d (muln q d))) (@BigOp.bigop nat (ordinal (S n)) O (index_enum (ordinal_finType (S n))) (fun i : ordinal (S n) => @BigBody nat (ordinal (S n)) i addn (andb (@eq_op nat_eqType (@nat_of_ord (S (divn n d)) (@inord (divn n d) (divn (@nat_of_ord (S n) i) d))) q) (negb (@eq_op nat_eqType (@nat_of_ord (S n) i) (muln q d)))) (nat_of_bool (dvdn d (@nat_of_ord (S n) i)))))) *) rewrite dvdn_mull ?big1 // => [[i /= ?] /andP[/eqP <- /negPf]]. (* Goal: forall _ : @eq bool (@eq_op nat_eqType i (muln (@nat_of_ord (S (divn n d)) (@inord (divn n d) (divn i d))) d)) false, @eq nat (nat_of_bool (dvdn d i)) O *) by rewrite eq_sym dvdn_eq inordK ?ltnS ?leq_div2r // => ->. Qed. Lemma logn_count_dvd p n : prime p -> logn p n = \sum_(1 <= k < n) (p ^ k %| n). Proof. (* Goal: forall _ : is_true (prime p), @eq nat (logn p n) (@BigOp.bigop nat nat O (index_iota (S O) n) (fun k : nat => @BigBody nat nat k addn true (nat_of_bool (dvdn (expn p k) n)))) *) rewrite big_add1 => p_prime; case: n => [|n]; first by rewrite logn0 big_geq. (* Goal: @eq nat (logn p (S n)) (@BigOp.bigop nat nat O (index_iota O (Nat.pred (S n))) (fun i : nat => @BigBody nat nat i addn true (nat_of_bool (dvdn (expn p (S i)) (S n))))) *) rewrite big_mkord -big_mkcond (eq_bigl _ _ (fun _ => pfactor_dvdn _ _ _)) //=. (* Goal: @eq nat (logn p (S n)) (@BigOp.bigop nat (ordinal n) O (index_enum (ordinal_finType n)) (fun i : ordinal n => @BigBody nat (ordinal n) i addn (leq (S (@nat_of_ord n i)) (logn p (S n))) (S O))) *) by rewrite big_ord_narrow ?sum1_card ?card_ord // -ltnS ltn_logl. Qed. Definition trunc_log p n := let fix loop n k := if k is k'.+1 then if p <= n then (loop (n %/ p) k').+1 else 0 else 0 in loop n n. Lemma trunc_log_bounds p n : 1 < p -> 0 < n -> let k := trunc_log p n in p ^ k <= n < p ^ k.+1. Proof. (* Goal: forall (_ : is_true (leq (S (S O)) p)) (_ : is_true (leq (S O) n)), is_true (let k := trunc_log p n in andb (leq (expn p k) n) (leq (S n) (expn p (S k)))) *) rewrite {+}/trunc_log => p_gt1; have p_gt0 := ltnW p_gt1. (* Goal: forall _ : is_true (leq (S O) n), is_true (let k := (fix loop (n k : nat) {struct k} : nat := match k with | O => O | S k' => if leq p n then S (loop (divn n p) k') else O end) n n in andb (leq (expn p k) n) (leq (S n) (expn p (S k)))) *) elim: n {-2 5}n (leqnn n) => [|m IHm] [|n] //=; rewrite ltnS => le_n_m _. (* Goal: is_true (andb (leq (expn p (if leq p (S n) then S ((fix loop (n k : nat) {struct k} : nat := match k with | O => O | S k' => if leq p n then S (loop (divn n p) k') else O end) (divn (S n) p) m) else O)) (S n)) (leq (S (S n)) (expn p (S (if leq p (S n) then S ((fix loop (n k : nat) {struct k} : nat := match k with | O => O | S k' => if leq p n then S (loop (divn n p) k') else O end) (divn (S n) p) m) else O))))) *) have [le_p_n | // ] := leqP p _; rewrite 2!expnSr -leq_divRL -?ltn_divLR //. (* Goal: is_true (andb (leq (expn p ((fix loop (n k : nat) {struct k} : nat := match k with | O => O | S k' => if leq p n then S (loop (divn n p) k') else O end) (divn (S n) p) m)) (divn (S n) p)) (leq (S (divn (S n) p)) (expn p (S ((fix loop (n k : nat) {struct k} : nat := match k with | O => O | S k' => if leq p n then S (loop (divn n p) k') else O end) (divn (S n) p) m))))) *) by apply: IHm; rewrite ?divn_gt0 // -ltnS (leq_trans (ltn_Pdiv _ _)). Qed. Lemma trunc_log_ltn p n : 1 < p -> n < p ^ (trunc_log p n).+1. Proof. (* Goal: forall _ : is_true (leq (S (S O)) p), is_true (leq (S n) (expn p (S (trunc_log p n)))) *) have [-> | n_gt0] := posnP n; first by move=> /ltnW; rewrite expn_gt0. (* Goal: forall _ : is_true (leq (S (S O)) p), is_true (leq (S n) (expn p (S (trunc_log p n)))) *) by case/trunc_log_bounds/(_ n_gt0)/andP. Qed. Lemma trunc_logP p n : 1 < p -> 0 < n -> p ^ trunc_log p n <= n. Proof. (* Goal: forall (_ : is_true (leq (S (S O)) p)) (_ : is_true (leq (S O) n)), is_true (leq (expn p (trunc_log p n)) n) *) by move=> p_gt1 /(trunc_log_bounds p_gt1)/andP[]. Qed. Lemma trunc_log_max p k j : 1 < p -> p ^ j <= k -> j <= trunc_log p k. Proof. (* Goal: forall (_ : is_true (leq (S (S O)) p)) (_ : is_true (leq (expn p j) k)), is_true (leq j (trunc_log p k)) *) move=> p_gt1 le_pj_k; rewrite -ltnS -(@ltn_exp2l p) //. (* Goal: is_true (leq (S (expn p j)) (expn p (S (trunc_log p k)))) *) exact: leq_ltn_trans (trunc_log_ltn _ _). Qed. Canonical nat_pred_pred := Eval hnf in [predType of nat_pred]. Coercion nat_pred_of_nat (p : nat) : nat_pred := pred1 p. Section NatPreds. Variables (n : nat) (pi : nat_pred). Definition negn : nat_pred := [predC pi]. Definition pnat : pred nat := fun m => (m > 0) && all (mem pi) (primes m). Definition partn := \prod_(0 <= p < n.+1 | p \in pi) p ^ logn p n. End NatPreds. Notation "pi ^'" := (negn pi) (at level 2, format "pi ^'") : nat_scope. Notation "pi .-nat" := (pnat pi) (at level 2, format "pi .-nat") : nat_scope. Notation "n `_ pi" := (partn n pi) : nat_scope. Section PnatTheory. Implicit Types (n p : nat) (pi rho : nat_pred). Lemma negnK pi : pi^'^' =i pi. Proof. (* Goal: @eq_mem nat (@mem nat nat_pred_pred (negn (negn pi))) (@mem nat nat_pred_pred pi) *) by move=> p; apply: negbK. Qed. Lemma eq_negn pi1 pi2 : pi1 =i pi2 -> pi1^' =i pi2^'. Proof. (* Goal: forall _ : @eq_mem nat (@mem nat nat_pred_pred pi1) (@mem nat nat_pred_pred pi2), @eq_mem nat (@mem nat nat_pred_pred (negn pi1)) (@mem nat nat_pred_pred (negn pi2)) *) by move=> eq_pi n; rewrite 3!inE /= eq_pi. Qed. Lemma eq_piP m n : \pi(m) =i \pi(n) <-> \pi(m) = \pi(n). Proof. (* Goal: iff (@eq_mem nat (@mem nat nat_pred_pred (pi_of m)) (@mem nat nat_pred_pred (pi_of n))) (@eq nat_pred (pi_of m) (pi_of n)) *) rewrite /pi_of; have eqs := eq_sorted_irr ltn_trans ltnn. (* Goal: iff (@eq_mem nat (@mem nat nat_pred_pred (@SimplPred (Equality.sort nat_eqType) (fun p : Equality.sort nat_eqType => @in_mem (Equality.sort nat_eqType) p (@mem (Equality.sort nat_eqType) (seq_predType nat_eqType) (primes m))))) (@mem nat nat_pred_pred (@SimplPred (Equality.sort nat_eqType) (fun p : Equality.sort nat_eqType => @in_mem (Equality.sort nat_eqType) p (@mem (Equality.sort nat_eqType) (seq_predType nat_eqType) (primes n)))))) (@eq nat_pred (@SimplPred (Equality.sort nat_eqType) (fun p : Equality.sort nat_eqType => @in_mem (Equality.sort nat_eqType) p (@mem (Equality.sort nat_eqType) (seq_predType nat_eqType) (primes m)))) (@SimplPred (Equality.sort nat_eqType) (fun p : Equality.sort nat_eqType => @in_mem (Equality.sort nat_eqType) p (@mem (Equality.sort nat_eqType) (seq_predType nat_eqType) (primes n))))) *) by split=> [|-> //]; move/(eqs _ _ (sorted_primes m) (sorted_primes n)) ->. Qed. Lemma part_gt0 pi n : 0 < n`_pi. Proof. (* Goal: is_true (leq (S O) (partn n pi)) *) exact: prodn_gt0. Qed. Hint Resolve part_gt0 : core. Lemma sub_in_partn pi1 pi2 n : {in \pi(n), {subset pi1 <= pi2}} -> n`_pi1 %| n`_pi2. Proof. (* Goal: forall _ : @prop_in1 nat (@mem nat nat_pred_pred (pi_of n)) (fun x : nat => forall _ : is_true (@in_mem nat x (@mem nat nat_pred_pred pi1)), is_true (@in_mem nat x (@mem nat nat_pred_pred pi2))) (inPhantom (@sub_mem nat (@mem nat nat_pred_pred pi1) (@mem nat nat_pred_pred pi2))), is_true (dvdn (partn n pi1) (partn n pi2)) *) move=> pi12; rewrite ![n`__]big_mkcond /=. (* Goal: is_true (dvdn (@BigOp.bigop nat nat (S O) (index_iota O (S n)) (fun i : nat => @BigBody nat nat i muln true (if @in_mem nat i (@mem nat nat_pred_pred pi1) then expn i (logn i n) else S O))) (@BigOp.bigop nat nat (S O) (index_iota O (S n)) (fun i : nat => @BigBody nat nat i muln true (if @in_mem nat i (@mem nat nat_pred_pred pi2) then expn i (logn i n) else S O)))) *) apply (big_ind2 (fun m1 m2 => m1 %| m2)) => // [*|p _]; first exact: dvdn_mul. (* Goal: is_true (dvdn (if @in_mem nat p (@mem nat nat_pred_pred pi1) then expn p (logn p n) else S O) (if @in_mem nat p (@mem nat nat_pred_pred pi2) then expn p (logn p n) else S O)) *) rewrite lognE -mem_primes; case: ifP => pi1p; last exact: dvd1n. (* Goal: is_true (dvdn (expn p (if @in_mem (Equality.sort nat_eqType) p (@mem (Equality.sort nat_eqType) (seq_predType nat_eqType) (primes n)) then S (logn p (divn n p)) else O)) (if @in_mem nat p (@mem nat nat_pred_pred pi2) then expn p (if @in_mem (Equality.sort nat_eqType) p (@mem (Equality.sort nat_eqType) (seq_predType nat_eqType) (primes n)) then S (logn p (divn n p)) else O) else S O)) *) by case: ifP => pr_p; [rewrite pi12 | rewrite if_same]. Qed. Lemma eq_in_partn pi1 pi2 n : {in \pi(n), pi1 =i pi2} -> n`_pi1 = n`_pi2. Proof. (* Goal: forall _ : @prop_in1 nat (@mem nat nat_pred_pred (pi_of n)) (fun x : nat => @eq bool (@in_mem nat x (@mem nat nat_pred_pred pi1)) (@in_mem nat x (@mem nat nat_pred_pred pi2))) (inPhantom (@eq_mem nat (@mem nat nat_pred_pred pi1) (@mem nat nat_pred_pred pi2))), @eq nat (partn n pi1) (partn n pi2) *) by move=> pi12; apply/eqP; rewrite eqn_dvd ?sub_in_partn // => p /pi12->. Qed. Lemma eq_partn pi1 pi2 n : pi1 =i pi2 -> n`_pi1 = n`_pi2. Proof. (* Goal: forall _ : @eq_mem nat (@mem nat nat_pred_pred pi1) (@mem nat nat_pred_pred pi2), @eq nat (partn n pi1) (partn n pi2) *) by move=> pi12; apply: eq_in_partn => p _. Qed. Lemma partnNK pi n : n`_pi^'^' = n`_pi. Proof. (* Goal: @eq nat (partn n (negn (negn pi))) (partn n pi) *) by apply: eq_partn; apply: negnK. Qed. Lemma widen_partn m pi n : n <= m -> n`_pi = \prod_(0 <= p < m.+1 | p \in pi) p ^ logn p n. Proof. (* Goal: forall _ : is_true (leq n m), @eq nat (partn n pi) (@BigOp.bigop nat nat (S O) (index_iota O (S m)) (fun p : nat => @BigBody nat nat p muln (@in_mem nat p (@mem nat nat_pred_pred pi)) (expn p (logn p n)))) *) move=> le_n_m; rewrite big_mkcond /=. (* Goal: @eq nat (partn n pi) (@BigOp.bigop nat nat (S O) (index_iota O (S m)) (fun i : nat => @BigBody nat nat i muln true (if @in_mem nat i (@mem nat nat_pred_pred pi) then expn i (logn i n) else S O))) *) rewrite [n`_pi](big_nat_widen _ _ m.+1) // big_mkcond /=. (* Goal: @eq nat (@BigOp.bigop nat nat (S O) (index_iota O (S m)) (fun i : nat => @BigBody nat nat i muln true (if andb (@in_mem nat i (@mem nat nat_pred_pred pi)) (leq (S i) (S n)) then expn i (logn i n) else S O))) (@BigOp.bigop nat nat (S O) (index_iota O (S m)) (fun i : nat => @BigBody nat nat i muln true (if @in_mem nat i (@mem nat nat_pred_pred pi) then expn i (logn i n) else S O))) *) apply: eq_bigr => p _; rewrite ltnS lognE. (* Goal: @eq nat (if andb (@in_mem nat p (@mem nat nat_pred_pred pi)) (leq p n) then expn p (if andb (prime p) (andb (leq (S O) n) (dvdn p n)) then S (logn p (divn n p)) else O) else S O) (if @in_mem nat p (@mem nat nat_pred_pred pi) then expn p (if andb (prime p) (andb (leq (S O) n) (dvdn p n)) then S (logn p (divn n p)) else O) else S O) *) by case: and3P => [[_ n_gt0 p_dv_n]|]; rewrite ?if_same // andbC dvdn_leq. Qed. Lemma partn0 pi : 0`_pi = 1. Proof. (* Goal: @eq nat (partn O pi) (S O) *) by apply: big1_seq => [] [|n]; rewrite andbC. Qed. Lemma partn1 pi : 1`_pi = 1. Proof. (* Goal: @eq nat (partn (S O) pi) (S O) *) by apply: big1_seq => [] [|[|n]]; rewrite andbC. Qed. Lemma partnM pi m n : m > 0 -> n > 0 -> (m * n)`_pi = m`_pi * n`_pi. Proof. (* Goal: forall (_ : is_true (leq (S O) m)) (_ : is_true (leq (S O) n)), @eq nat (partn (muln m n) pi) (muln (partn m pi) (partn n pi)) *) have le_pmul m' n': m' > 0 -> n' <= m' * n' by move/prednK <-; apply: leq_addr. (* Goal: forall (_ : is_true (leq (S O) m)) (_ : is_true (leq (S O) n)), @eq nat (partn (muln m n) pi) (muln (partn m pi) (partn n pi)) *) move=> mpos npos; rewrite !(@widen_partn (n * m)) 3?(le_pmul, mulnC) //. (* Goal: @eq nat (@BigOp.bigop nat nat (S O) (index_iota O (S (muln m n))) (fun p : nat => @BigBody nat nat p muln (@in_mem nat p (@mem nat nat_pred_pred pi)) (expn p (logn p (muln m n))))) (muln (@BigOp.bigop nat nat (S O) (index_iota O (S (muln m n))) (fun p : nat => @BigBody nat nat p muln (@in_mem nat p (@mem nat nat_pred_pred pi)) (expn p (logn p m)))) (@BigOp.bigop nat nat (S O) (index_iota O (S (muln m n))) (fun p : nat => @BigBody nat nat p muln (@in_mem nat p (@mem nat nat_pred_pred pi)) (expn p (logn p n))))) *) rewrite !big_mkord -big_split; apply: eq_bigr => p _ /=. (* Goal: @eq nat (expn (@nat_of_ord (S (muln m n)) p) (logn (@nat_of_ord (S (muln m n)) p) (muln m n))) (muln (expn (@nat_of_ord (S (muln m n)) p) (logn (@nat_of_ord (S (muln m n)) p) m)) (expn (@nat_of_ord (S (muln m n)) p) (logn (@nat_of_ord (S (muln m n)) p) n))) *) by rewrite lognM // expnD. Qed. Lemma partnX pi m n : (m ^ n)`_pi = m`_pi ^ n. Proof. (* Goal: @eq nat (partn (expn m n) pi) (expn (partn m pi) n) *) elim: n => [|n IHn]; first exact: partn1. (* Goal: @eq nat (partn (expn m (S n)) pi) (expn (partn m pi) (S n)) *) rewrite expnS; case: (posnP m) => [->|m_gt0]; first by rewrite partn0 exp1n. (* Goal: @eq nat (partn (muln m (expn m n)) pi) (expn (partn m pi) (S n)) *) by rewrite expnS partnM ?IHn // expn_gt0 m_gt0. Qed. Lemma partn_dvd pi m n : n > 0 -> m %| n -> m`_pi %| n`_pi. Proof. (* Goal: forall (_ : is_true (leq (S O) n)) (_ : is_true (dvdn m n)), is_true (dvdn (partn m pi) (partn n pi)) *) move=> n_gt0 dvmn; case/dvdnP: dvmn n_gt0 => q ->{n}. (* Goal: forall _ : is_true (leq (S O) (muln q m)), is_true (dvdn (partn m pi) (partn (muln q m) pi)) *) by rewrite muln_gt0 => /andP[q_gt0 m_gt0]; rewrite partnM ?dvdn_mull. Qed. Lemma p_part p n : n`_p = p ^ logn p n. Proof. (* Goal: @eq nat (partn n (nat_pred_of_nat p)) (expn p (logn p n)) *) case (posnP (logn p n)) => [log0 |]. (* Goal: forall _ : is_true (leq (S O) (logn p n)), @eq nat (partn n (nat_pred_of_nat p)) (expn p (logn p n)) *) (* Goal: @eq nat (partn n (nat_pred_of_nat p)) (expn p (logn p n)) *) by rewrite log0 [n`_p]big1_seq // => q; case/andP; move/eqnP->; rewrite log0. (* Goal: forall _ : is_true (leq (S O) (logn p n)), @eq nat (partn n (nat_pred_of_nat p)) (expn p (logn p n)) *) rewrite logn_gt0 mem_primes; case/and3P=> _ n_gt0 dv_p_n. (* Goal: @eq nat (partn n (nat_pred_of_nat p)) (expn p (logn p n)) *) have le_p_n: p < n.+1 by rewrite ltnS dvdn_leq. (* Goal: @eq nat (partn n (nat_pred_of_nat p)) (expn p (logn p n)) *) by rewrite [n`_p]big_mkord (big_pred1 (Ordinal le_p_n)). Qed. Lemma p_part_eq1 p n : (n`_p == 1) = (p \notin \pi(n)). Proof. (* Goal: @eq bool (@eq_op nat_eqType (partn n (nat_pred_of_nat p)) (S O)) (negb (@in_mem nat p (@mem nat nat_pred_pred (pi_of n)))) *) rewrite mem_primes p_part lognE; case: and3P => // [[p_pr _ _]]. (* Goal: @eq bool (@eq_op nat_eqType (expn p (S (logn p (divn n p)))) (S O)) (negb true) *) by rewrite -dvdn1 pfactor_dvdn // logn1. Qed. Lemma p_part_gt1 p n : (n`_p > 1) = (p \in \pi(n)). Proof. (* Goal: @eq bool (leq (S (S O)) (partn n (nat_pred_of_nat p))) (@in_mem nat p (@mem nat nat_pred_pred (pi_of n))) *) by rewrite ltn_neqAle part_gt0 andbT eq_sym p_part_eq1 negbK. Qed. Lemma primes_part pi n : primes n`_pi = filter (mem pi) (primes n). Lemma filter_pi_of n m : n < m -> filter \pi(n) (index_iota 0 m) = primes n. Lemma partn_pi n : n > 0 -> n`_\pi(n) = n. Proof. (* Goal: forall _ : is_true (leq (S O) n), @eq nat (partn n (pi_of n)) n *) move=> n_gt0; rewrite {3}(prod_prime_decomp n_gt0) prime_decompE big_map. (* Goal: @eq nat (partn n (pi_of n)) (@BigOp.bigop nat nat (S O) (primes n) (fun j : nat => @BigBody nat nat j muln true (expn (@fst nat nat (@pair nat nat j (logn j n))) (@snd nat nat (@pair nat nat j (logn j n)))))) *) by rewrite -[n`__]big_filter filter_pi_of. Qed. Lemma partnT n : n > 0 -> n`_predT = n. Proof. (* Goal: forall _ : is_true (leq (S O) n), @eq nat (partn n (@predT nat)) n *) move=> n_gt0; rewrite -{2}(partn_pi n_gt0) {2}/partn big_mkcond /=. (* Goal: @eq nat (partn n (@predT nat)) (@BigOp.bigop nat nat (S O) (index_iota O (S n)) (fun i : nat => @BigBody nat nat i muln true (if @in_mem nat i (@mem nat nat_pred_pred (pi_of n)) then expn i (logn i n) else S O))) *) by apply: eq_bigr => p _; rewrite -logn_gt0; case: (logn p _). Qed. Lemma partnC pi n : n > 0 -> n`_pi * n`_pi^' = n. Proof. (* Goal: forall _ : is_true (leq (S O) n), @eq nat (muln (partn n pi) (partn n (negn pi))) n *) move=> n_gt0; rewrite -{3}(partnT n_gt0) /partn. (* Goal: @eq nat (muln (@BigOp.bigop nat nat (S O) (index_iota O (S n)) (fun p : nat => @BigBody nat nat p muln (@in_mem nat p (@mem nat nat_pred_pred pi)) (expn p (logn p n)))) (@BigOp.bigop nat nat (S O) (index_iota O (S n)) (fun p : nat => @BigBody nat nat p muln (@in_mem nat p (@mem nat nat_pred_pred (negn pi))) (expn p (logn p n))))) (@BigOp.bigop nat nat (S O) (index_iota O (S n)) (fun p : nat => @BigBody nat nat p muln (@in_mem nat p (@mem nat nat_pred_pred (@predT nat))) (expn p (logn p n)))) *) do 2!rewrite mulnC big_mkcond /=; rewrite -big_split; apply: eq_bigr => p _ /=. (* Goal: @eq nat (muln (if @in_mem nat p (@mem nat nat_pred_pred pi) then expn p (logn p n) else S O) (if @in_mem nat p (@mem nat nat_pred_pred (negn pi)) then expn p (logn p n) else S O)) (expn p (logn p n)) *) by rewrite mulnC inE /=; case: (p \in pi); rewrite /= (muln1, mul1n). Qed. Lemma dvdn_part pi n : n`_pi %| n. Proof. (* Goal: is_true (dvdn (partn n pi) n) *) by case: n => // n; rewrite -{2}[n.+1](@partnC pi) // dvdn_mulr. Qed. Lemma logn_part p m : logn p m`_p = logn p m. Proof. (* Goal: @eq nat (logn p (partn m (nat_pred_of_nat p))) (logn p m) *) case p_pr: (prime p); first by rewrite p_part pfactorK. (* Goal: @eq nat (logn p (partn m (nat_pred_of_nat p))) (logn p m) *) by rewrite lognE (lognE p m) p_pr. Qed. Lemma partn_lcm pi m n : m > 0 -> n > 0 -> (lcmn m n)`_pi = lcmn m`_pi n`_pi. Proof. (* Goal: forall (_ : is_true (leq (S O) m)) (_ : is_true (leq (S O) n)), @eq nat (partn (lcmn m n) pi) (lcmn (partn m pi) (partn n pi)) *) move=> m_gt0 n_gt0; have p_gt0: lcmn m n > 0 by rewrite lcmn_gt0 m_gt0. (* Goal: @eq nat (partn (lcmn m n) pi) (lcmn (partn m pi) (partn n pi)) *) apply/eqP; rewrite eqn_dvd dvdn_lcm !partn_dvd ?dvdn_lcml ?dvdn_lcmr //. (* Goal: is_true (andb (dvdn (partn (lcmn m n) pi) (lcmn (partn m pi) (partn n pi))) (andb true true)) *) rewrite -(dvdn_pmul2r (part_gt0 pi^' (lcmn m n))) partnC // dvdn_lcm !andbT. (* Goal: is_true (andb (dvdn m (muln (lcmn (partn m pi) (partn n pi)) (partn (lcmn m n) (negn pi)))) (dvdn n (muln (lcmn (partn m pi) (partn n pi)) (partn (lcmn m n) (negn pi))))) *) rewrite -{1}(partnC pi m_gt0) andbC -{1}(partnC pi n_gt0). (* Goal: is_true (andb (dvdn (muln (partn n pi) (partn n (negn pi))) (muln (lcmn (partn m pi) (partn n pi)) (partn (lcmn m n) (negn pi)))) (dvdn (muln (partn m pi) (partn m (negn pi))) (muln (lcmn (partn m pi) (partn n pi)) (partn (lcmn m n) (negn pi))))) *) by rewrite !dvdn_mul ?partn_dvd ?dvdn_lcml ?dvdn_lcmr. Qed. Lemma partn_gcd pi m n : m > 0 -> n > 0 -> (gcdn m n)`_pi = gcdn m`_pi n`_pi. Proof. (* Goal: forall (_ : is_true (leq (S O) m)) (_ : is_true (leq (S O) n)), @eq nat (partn (gcdn m n) pi) (gcdn (partn m pi) (partn n pi)) *) move=> m_gt0 n_gt0; have p_gt0: gcdn m n > 0 by rewrite gcdn_gt0 m_gt0. (* Goal: @eq nat (partn (gcdn m n) pi) (gcdn (partn m pi) (partn n pi)) *) apply/eqP; rewrite eqn_dvd dvdn_gcd !partn_dvd ?dvdn_gcdl ?dvdn_gcdr //=. (* Goal: is_true (dvdn (gcdn (partn m pi) (partn n pi)) (partn (gcdn m n) pi)) *) rewrite -(dvdn_pmul2r (part_gt0 pi^' (gcdn m n))) partnC // dvdn_gcd. (* Goal: is_true (andb (dvdn (muln (gcdn (partn m pi) (partn n pi)) (partn (gcdn m n) (negn pi))) m) (dvdn (muln (gcdn (partn m pi) (partn n pi)) (partn (gcdn m n) (negn pi))) n)) *) rewrite -{3}(partnC pi m_gt0) andbC -{3}(partnC pi n_gt0). (* Goal: is_true (andb (dvdn (muln (gcdn (partn m pi) (partn n pi)) (partn (gcdn m n) (negn pi))) (muln (partn n pi) (partn n (negn pi)))) (dvdn (muln (gcdn (partn m pi) (partn n pi)) (partn (gcdn m n) (negn pi))) (muln (partn m pi) (partn m (negn pi))))) *) by rewrite !dvdn_mul ?partn_dvd ?dvdn_gcdl ?dvdn_gcdr. Qed. Lemma partn_biglcm (I : finType) (P : pred I) F pi : (forall i, P i -> F i > 0) -> (\big[lcmn/1%N]_(i | P i) F i)`_pi = \big[lcmn/1%N]_(i | P i) (F i)`_pi. Proof. (* Goal: forall _ : forall (i : Finite.sort I) (_ : is_true (P i)), is_true (leq (S O) (F i)), @eq nat (partn (@BigOp.bigop nat (Finite.sort I) (S O) (index_enum I) (fun i : Finite.sort I => @BigBody nat (Finite.sort I) i lcmn (P i) (F i))) pi) (@BigOp.bigop nat (Finite.sort I) (S O) (index_enum I) (fun i : Finite.sort I => @BigBody nat (Finite.sort I) i lcmn (P i) (partn (F i) pi))) *) move=> F_gt0; set m := \big[lcmn/1%N]_(i | P i) F i. (* Goal: @eq nat (partn m pi) (@BigOp.bigop nat (Finite.sort I) (S O) (index_enum I) (fun i : Finite.sort I => @BigBody nat (Finite.sort I) i lcmn (P i) (partn (F i) pi))) *) have m_gt0: 0 < m by elim/big_ind: m => // p q p_gt0; rewrite lcmn_gt0 p_gt0. (* Goal: @eq nat (partn m pi) (@BigOp.bigop nat (Finite.sort I) (S O) (index_enum I) (fun i : Finite.sort I => @BigBody nat (Finite.sort I) i lcmn (P i) (partn (F i) pi))) *) apply/eqP; rewrite eqn_dvd andbC; apply/andP; split. (* Goal: is_true (dvdn (partn m pi) (@BigOp.bigop nat (Finite.sort I) (S O) (index_enum I) (fun i : Finite.sort I => @BigBody nat (Finite.sort I) i lcmn (P i) (partn (F i) pi)))) *) (* Goal: is_true (dvdn (@BigOp.bigop nat (Finite.sort I) (S O) (index_enum I) (fun i : Finite.sort I => @BigBody nat (Finite.sort I) i lcmn (P i) (partn (F i) pi))) (partn m pi)) *) by apply/dvdn_biglcmP=> i Pi; rewrite partn_dvd // (@biglcmn_sup _ i). (* Goal: is_true (dvdn (partn m pi) (@BigOp.bigop nat (Finite.sort I) (S O) (index_enum I) (fun i : Finite.sort I => @BigBody nat (Finite.sort I) i lcmn (P i) (partn (F i) pi)))) *) rewrite -(dvdn_pmul2r (part_gt0 pi^' m)) partnC //. (* Goal: is_true (dvdn m (muln (@BigOp.bigop nat (Finite.sort I) (S O) (index_enum I) (fun i : Finite.sort I => @BigBody nat (Finite.sort I) i lcmn (P i) (partn (F i) pi))) (partn m (negn pi)))) *) apply/dvdn_biglcmP=> i Pi; rewrite -(partnC pi (F_gt0 i Pi)) dvdn_mul //. (* Goal: is_true (dvdn (partn (F i) (negn pi)) (partn m (negn pi))) *) (* Goal: is_true (dvdn (partn (F i) pi) (@BigOp.bigop nat (Finite.sort I) (S O) (index_enum I) (fun i : Finite.sort I => @BigBody nat (Finite.sort I) i lcmn (P i) (partn (F i) pi)))) *) by rewrite (@biglcmn_sup _ i). (* Goal: is_true (dvdn (partn (F i) (negn pi)) (partn m (negn pi))) *) by rewrite partn_dvd // (@biglcmn_sup _ i). Qed. Lemma partn_biggcd (I : finType) (P : pred I) F pi : #|SimplPred P| > 0 -> (forall i, P i -> F i > 0) -> (\big[gcdn/0]_(i | P i) F i)`_pi = \big[gcdn/0]_(i | P i) (F i)`_pi. Proof. (* Goal: forall (_ : is_true (leq (S O) (@card I (@mem (Finite.sort I) (simplPredType (Finite.sort I)) (@SimplPred (Finite.sort I) P))))) (_ : forall (i : Finite.sort I) (_ : is_true (P i)), is_true (leq (S O) (F i))), @eq nat (partn (@BigOp.bigop nat (Finite.sort I) O (index_enum I) (fun i : Finite.sort I => @BigBody nat (Finite.sort I) i gcdn (P i) (F i))) pi) (@BigOp.bigop nat (Finite.sort I) O (index_enum I) (fun i : Finite.sort I => @BigBody nat (Finite.sort I) i gcdn (P i) (partn (F i) pi))) *) move=> ntP F_gt0; set d := \big[gcdn/0]_(i | P i) F i. (* Goal: @eq nat (partn d pi) (@BigOp.bigop nat (Finite.sort I) O (index_enum I) (fun i : Finite.sort I => @BigBody nat (Finite.sort I) i gcdn (P i) (partn (F i) pi))) *) have d_gt0: 0 < d. (* Goal: @eq nat (partn d pi) (@BigOp.bigop nat (Finite.sort I) O (index_enum I) (fun i : Finite.sort I => @BigBody nat (Finite.sort I) i gcdn (P i) (partn (F i) pi))) *) (* Goal: is_true (leq (S O) d) *) case/card_gt0P: ntP => i /= Pi; have:= F_gt0 i Pi. (* Goal: @eq nat (partn d pi) (@BigOp.bigop nat (Finite.sort I) O (index_enum I) (fun i : Finite.sort I => @BigBody nat (Finite.sort I) i gcdn (P i) (partn (F i) pi))) *) (* Goal: forall _ : is_true (leq (S O) (F i)), is_true (leq (S O) d) *) rewrite !lt0n -!dvd0n; apply: contra => dv0d. (* Goal: @eq nat (partn d pi) (@BigOp.bigop nat (Finite.sort I) O (index_enum I) (fun i : Finite.sort I => @BigBody nat (Finite.sort I) i gcdn (P i) (partn (F i) pi))) *) (* Goal: is_true (dvdn O (F i)) *) by rewrite (dvdn_trans dv0d) // (@biggcdn_inf _ i). (* Goal: @eq nat (partn d pi) (@BigOp.bigop nat (Finite.sort I) O (index_enum I) (fun i : Finite.sort I => @BigBody nat (Finite.sort I) i gcdn (P i) (partn (F i) pi))) *) apply/eqP; rewrite eqn_dvd; apply/andP; split. (* Goal: is_true (dvdn (@BigOp.bigop nat (Finite.sort I) O (index_enum I) (fun i : Finite.sort I => @BigBody nat (Finite.sort I) i gcdn (P i) (partn (F i) pi))) (partn d pi)) *) (* Goal: is_true (dvdn (partn d pi) (@BigOp.bigop nat (Finite.sort I) O (index_enum I) (fun i : Finite.sort I => @BigBody nat (Finite.sort I) i gcdn (P i) (partn (F i) pi)))) *) by apply/dvdn_biggcdP=> i Pi; rewrite partn_dvd ?F_gt0 // (@biggcdn_inf _ i). (* Goal: is_true (dvdn (@BigOp.bigop nat (Finite.sort I) O (index_enum I) (fun i : Finite.sort I => @BigBody nat (Finite.sort I) i gcdn (P i) (partn (F i) pi))) (partn d pi)) *) rewrite -(dvdn_pmul2r (part_gt0 pi^' d)) partnC //. (* Goal: is_true (dvdn (muln (@BigOp.bigop nat (Finite.sort I) O (index_enum I) (fun i : Finite.sort I => @BigBody nat (Finite.sort I) i gcdn (P i) (partn (F i) pi))) (partn d (negn pi))) d) *) apply/dvdn_biggcdP=> i Pi; rewrite -(partnC pi (F_gt0 i Pi)) dvdn_mul //. (* Goal: is_true (dvdn (partn d (negn pi)) (partn (F i) (negn pi))) *) (* Goal: is_true (dvdn (@BigOp.bigop nat (Finite.sort I) O (index_enum I) (fun i : Finite.sort I => @BigBody nat (Finite.sort I) i gcdn (P i) (partn (F i) pi))) (partn (F i) pi)) *) by rewrite (@biggcdn_inf _ i). (* Goal: is_true (dvdn (partn d (negn pi)) (partn (F i) (negn pi))) *) by rewrite partn_dvd ?F_gt0 // (@biggcdn_inf _ i). Qed. Lemma sub_in_pnat pi rho n : {in \pi(n), {subset pi <= rho}} -> pi.-nat n -> rho.-nat n. Proof. (* Goal: forall (_ : @prop_in1 nat (@mem nat nat_pred_pred (pi_of n)) (fun x : nat => forall _ : is_true (@in_mem nat x (@mem nat nat_pred_pred pi)), is_true (@in_mem nat x (@mem nat nat_pred_pred rho))) (inPhantom (@sub_mem nat (@mem nat nat_pred_pred pi) (@mem nat nat_pred_pred rho)))) (_ : is_true (pnat pi n)), is_true (pnat rho n) *) rewrite /pnat => subpi /andP[-> pi_n]. (* Goal: is_true (andb true (@all nat (@pred_of_simpl nat (@pred_of_mem_pred nat (@mem nat nat_pred_pred rho))) (primes n))) *) by apply/allP=> p pr_p; apply: subpi => //; apply: (allP pi_n). Qed. Lemma eq_in_pnat pi rho n : {in \pi(n), pi =i rho} -> pi.-nat n = rho.-nat n. Proof. (* Goal: forall _ : @prop_in1 nat (@mem nat nat_pred_pred (pi_of n)) (fun x : nat => @eq bool (@in_mem nat x (@mem nat nat_pred_pred pi)) (@in_mem nat x (@mem nat nat_pred_pred rho))) (inPhantom (@eq_mem nat (@mem nat nat_pred_pred pi) (@mem nat nat_pred_pred rho))), @eq bool (pnat pi n) (pnat rho n) *) by move=> eqpi; apply/idP/idP; apply: sub_in_pnat => p /eqpi->. Qed. Lemma eq_pnat pi rho n : pi =i rho -> pi.-nat n = rho.-nat n. Proof. (* Goal: forall _ : @eq_mem nat (@mem nat nat_pred_pred pi) (@mem nat nat_pred_pred rho), @eq bool (pnat pi n) (pnat rho n) *) by move=> eqpi; apply: eq_in_pnat => p _. Qed. Lemma pnatNK pi n : pi^'^'.-nat n = pi.-nat n. Proof. (* Goal: @eq bool (pnat (negn (negn pi)) n) (pnat pi n) *) exact: eq_pnat (negnK pi). Qed. Lemma pnatI pi rho n : [predI pi & rho].-nat n = pi.-nat n && rho.-nat n. Proof. (* Goal: @eq bool (pnat (@predI nat (@pred_of_simpl nat (@pred_of_mem_pred nat (@mem nat nat_pred_pred pi))) (@pred_of_simpl nat (@pred_of_mem_pred nat (@mem nat nat_pred_pred rho)))) n) (andb (pnat pi n) (pnat rho n)) *) by rewrite /pnat andbCA all_predI !andbA andbb. Qed. Lemma pnat_mul pi m n : pi.-nat (m * n) = pi.-nat m && pi.-nat n. Proof. (* Goal: @eq bool (pnat pi (muln m n)) (andb (pnat pi m) (pnat pi n)) *) rewrite /pnat muln_gt0 andbCA -andbA andbCA. (* Goal: @eq bool (andb (leq (S O) n) (andb (leq (S O) m) (@all nat (@pred_of_simpl nat (@pred_of_mem_pred nat (@mem nat nat_pred_pred pi))) (primes (muln m n))))) (andb (leq (S O) n) (andb (andb (leq (S O) m) (@all nat (@pred_of_simpl nat (@pred_of_mem_pred nat (@mem nat nat_pred_pred pi))) (primes m))) (@all nat (@pred_of_simpl nat (@pred_of_mem_pred nat (@mem nat nat_pred_pred pi))) (primes n)))) *) case: posnP => // n_gt0; case: posnP => //= m_gt0. (* Goal: @eq bool (@all nat (@pred_of_simpl nat (@pred_of_mem_pred nat (@mem nat nat_pred_pred pi))) (primes (muln m n))) (andb (@all nat (@pred_of_simpl nat (@pred_of_mem_pred nat (@mem nat nat_pred_pred pi))) (primes m)) (@all nat (@pred_of_simpl nat (@pred_of_mem_pred nat (@mem nat nat_pred_pred pi))) (primes n))) *) apply/allP/andP=> [pi_mn | [pi_m pi_n] p]. (* Goal: forall _ : is_true (@in_mem (Equality.sort nat_eqType) p (@mem (Equality.sort nat_eqType) (seq_predType nat_eqType) (primes (muln m n)))), is_true (@pred_of_simpl nat (@pred_of_mem_pred nat (@mem nat nat_pred_pred pi)) p) *) (* Goal: and (is_true (@all nat (@pred_of_simpl nat (@pred_of_mem_pred nat (@mem nat nat_pred_pred pi))) (primes m))) (is_true (@all nat (@pred_of_simpl nat (@pred_of_mem_pred nat (@mem nat nat_pred_pred pi))) (primes n))) *) by split; apply/allP=> p m_p; apply: pi_mn; rewrite primes_mul // m_p ?orbT. (* Goal: forall _ : is_true (@in_mem (Equality.sort nat_eqType) p (@mem (Equality.sort nat_eqType) (seq_predType nat_eqType) (primes (muln m n)))), is_true (@pred_of_simpl nat (@pred_of_mem_pred nat (@mem nat nat_pred_pred pi)) p) *) by rewrite primes_mul // => /orP[]; [apply: (allP pi_m) | apply: (allP pi_n)]. Qed. Lemma pnat_exp pi m n : pi.-nat (m ^ n) = pi.-nat m || (n == 0). Proof. (* Goal: @eq bool (pnat pi (expn m n)) (orb (pnat pi m) (@eq_op nat_eqType n O)) *) by case: n => [|n]; rewrite orbC // /pnat expn_gt0 orbC primes_exp. Qed. Lemma part_pnat pi n : pi.-nat n`_pi. Proof. (* Goal: is_true (pnat pi (partn n pi)) *) rewrite /pnat primes_part part_gt0. (* Goal: is_true (andb true (@all nat (@pred_of_simpl nat (@pred_of_mem_pred nat (@mem nat nat_pred_pred pi))) (@filter nat (@pred_of_simpl nat (@pred_of_mem_pred nat (@mem nat nat_pred_pred pi))) (primes n)))) *) by apply/allP=> p; rewrite mem_filter => /andP[]. Qed. Lemma pnatE pi p : prime p -> pi.-nat p = (p \in pi). Proof. (* Goal: forall _ : is_true (prime p), @eq bool (pnat pi p) (@in_mem nat p (@mem nat nat_pred_pred pi)) *) by move=> pr_p; rewrite /pnat prime_gt0 ?primes_prime //= andbT. Qed. Lemma pnat_id p : prime p -> p.-nat p. Proof. (* Goal: forall _ : is_true (prime p), is_true (pnat (nat_pred_of_nat p) p) *) by move=> pr_p; rewrite pnatE ?inE /=. Qed. Lemma coprime_pi' m n : m > 0 -> n > 0 -> coprime m n = \pi(m)^'.-nat n. Proof. (* Goal: forall (_ : is_true (leq (S O) m)) (_ : is_true (leq (S O) n)), @eq bool (coprime m n) (pnat (negn (pi_of m)) n) *) by move=> m_gt0 n_gt0; rewrite /pnat n_gt0 all_predC coprime_has_primes. Qed. Lemma pnat_pi n : n > 0 -> \pi(n).-nat n. Proof. (* Goal: forall _ : is_true (leq (S O) n), is_true (pnat (pi_of n) n) *) by rewrite /pnat => ->; apply/allP. Qed. Lemma pi_of_dvd m n : m %| n -> n > 0 -> {subset \pi(m) <= \pi(n)}. Proof. (* Goal: forall (_ : is_true (dvdn m n)) (_ : is_true (leq (S O) n)), @sub_mem nat (@mem nat nat_pred_pred (pi_of m)) (@mem nat nat_pred_pred (pi_of n)) *) move=> m_dv_n n_gt0 p; rewrite !mem_primes n_gt0 => /and3P[-> _ p_dv_m]. (* Goal: is_true (andb true (andb true (dvdn p n))) *) exact: dvdn_trans p_dv_m m_dv_n. Qed. Lemma pi_ofM m n : m > 0 -> n > 0 -> \pi(m * n) =i [predU \pi(m) & \pi(n)]. Proof. (* Goal: forall (_ : is_true (leq (S O) m)) (_ : is_true (leq (S O) n)), @eq_mem nat (@mem nat nat_pred_pred (pi_of (muln m n))) (@mem nat (simplPredType nat) (@predU nat (@pred_of_simpl nat (@pred_of_mem_pred nat (@mem nat nat_pred_pred (pi_of m)))) (@pred_of_simpl nat (@pred_of_mem_pred nat (@mem nat nat_pred_pred (pi_of n)))))) *) by move=> m_gt0 n_gt0 p; apply: primes_mul. Qed. Lemma pi_of_part pi n : n > 0 -> \pi(n`_pi) =i [predI \pi(n) & pi]. Proof. (* Goal: forall _ : is_true (leq (S O) n), @eq_mem nat (@mem nat nat_pred_pred (pi_of (partn n pi))) (@mem nat (simplPredType nat) (@predI nat (@pred_of_simpl nat (@pred_of_mem_pred nat (@mem nat nat_pred_pred (pi_of n)))) (@pred_of_simpl nat (@pred_of_mem_pred nat (@mem nat nat_pred_pred pi))))) *) by move=> n_gt0 p; rewrite /pi_of primes_part mem_filter andbC. Qed. Lemma pi_of_exp p n : n > 0 -> \pi(p ^ n) = \pi(p). Proof. (* Goal: forall _ : is_true (leq (S O) n), @eq nat_pred (pi_of (expn p n)) (pi_of p) *) by move=> n_gt0; rewrite /pi_of primes_exp. Qed. Lemma pi_of_prime p : prime p -> \pi(p) =i (p : nat_pred). Proof. (* Goal: forall _ : is_true (prime p), @eq_mem nat (@mem nat nat_pred_pred (pi_of p)) (@mem nat nat_pred_pred (nat_pred_of_nat p : nat_pred)) *) by move=> pr_p q; rewrite /pi_of primes_prime // mem_seq1. Qed. Lemma p'natEpi p n : n > 0 -> p^'.-nat n = (p \notin \pi(n)). Proof. (* Goal: forall _ : is_true (leq (S O) n), @eq bool (pnat (negn (nat_pred_of_nat p)) n) (negb (@in_mem nat p (@mem nat nat_pred_pred (pi_of n)))) *) by case: n => // n _; rewrite /pnat all_predC has_pred1. Qed. Lemma p'natE p n : prime p -> p^'.-nat n = ~~ (p %| n). Proof. (* Goal: forall _ : is_true (prime p), @eq bool (pnat (negn (nat_pred_of_nat p)) n) (negb (dvdn p n)) *) case: n => [|n] p_pr; first by case: p p_pr. (* Goal: @eq bool (pnat (negn (nat_pred_of_nat p)) (S n)) (negb (dvdn p (S n))) *) by rewrite p'natEpi // mem_primes p_pr. Qed. Lemma pnatPpi pi n p : pi.-nat n -> p \in \pi(n) -> p \in pi. Proof. (* Goal: forall (_ : is_true (pnat pi n)) (_ : is_true (@in_mem nat p (@mem nat nat_pred_pred (pi_of n)))), is_true (@in_mem nat p (@mem nat nat_pred_pred pi)) *) by case/andP=> _ /allP; apply. Qed. Lemma pnat_dvd m n pi : m %| n -> pi.-nat n -> pi.-nat m. Proof. (* Goal: forall (_ : is_true (dvdn m n)) (_ : is_true (pnat pi n)), is_true (pnat pi m) *) by case/dvdnP=> q ->; rewrite pnat_mul; case/andP. Qed. Lemma pnat_div m n pi : m %| n -> pi.-nat n -> pi.-nat (n %/ m). Proof. (* Goal: forall (_ : is_true (dvdn m n)) (_ : is_true (pnat pi n)), is_true (pnat pi (divn n m)) *) case/dvdnP=> q ->; rewrite pnat_mul andbC => /andP[]. (* Goal: forall (_ : is_true (pnat pi m)) (_ : is_true (pnat pi q)), is_true (pnat pi (divn (muln q m) m)) *) by case: m => // m _; rewrite mulnK. Qed. Lemma pnat_coprime pi m n : pi.-nat m -> pi^'.-nat n -> coprime m n. Proof. (* Goal: forall (_ : is_true (pnat pi m)) (_ : is_true (pnat (negn pi) n)), is_true (coprime m n) *) case/andP=> m_gt0 pi_m /andP[n_gt0 pi'_n]; rewrite coprime_has_primes //. (* Goal: is_true (negb (@has (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) (primes m)))) (primes n))) *) by apply/hasPn=> p /(allP pi'_n); apply/contra/allP. Qed. Lemma p'nat_coprime pi m n : pi^'.-nat m -> pi.-nat n -> coprime m n. Proof. (* Goal: forall (_ : is_true (pnat (negn pi) m)) (_ : is_true (pnat pi n)), is_true (coprime m n) *) by move=> pi'm pi_n; rewrite (pnat_coprime pi'm) ?pnatNK. Qed. Lemma sub_pnat_coprime pi rho m n : {subset rho <= pi^'} -> pi.-nat m -> rho.-nat n -> coprime m n. Proof. (* Goal: forall (_ : @sub_mem nat (@mem nat nat_pred_pred rho) (@mem nat nat_pred_pred (negn pi))) (_ : is_true (pnat pi m)) (_ : is_true (pnat rho n)), is_true (coprime m n) *) by move=> pi'rho pi_m; move/(sub_in_pnat (in1W pi'rho)); apply: pnat_coprime. Qed. Lemma coprime_partC pi m n : coprime m`_pi n`_pi^'. Proof. (* Goal: is_true (coprime (partn m pi) (partn n (negn pi))) *) by apply: (@pnat_coprime pi); apply: part_pnat. Qed. Lemma pnat_1 pi n : pi.-nat n -> pi^'.-nat n -> n = 1. Proof. (* Goal: forall (_ : is_true (pnat pi n)) (_ : is_true (pnat (negn pi) n)), @eq nat n (S O) *) by move=> pi_n pi'_n; rewrite -(eqnP (pnat_coprime pi_n pi'_n)) gcdnn. Qed. Lemma part_pnat_id pi n : pi.-nat n -> n`_pi = n. Proof. (* Goal: forall _ : is_true (pnat pi n), @eq nat (partn n pi) n *) case/andP=> n_gt0 pi_n. (* Goal: @eq nat (partn n pi) n *) rewrite -{2}(partnT n_gt0) /partn big_mkcond; apply: eq_bigr=> p _. (* Goal: @eq nat (if @in_mem nat p (@mem nat nat_pred_pred pi) then expn p (logn p n) else S O) (expn p (logn p n)) *) case: (posnP (logn p n)) => [-> |]; first by rewrite if_same. (* Goal: forall _ : is_true (leq (S O) (logn p n)), @eq nat (if @in_mem nat p (@mem nat nat_pred_pred pi) then expn p (logn p n) else S O) (expn p (logn p n)) *) by rewrite logn_gt0 => /(allP pi_n)/= ->. Qed. Lemma part_p'nat pi n : pi^'.-nat n -> n`_pi = 1. Proof. (* Goal: forall _ : is_true (pnat (negn pi) n), @eq nat (partn n pi) (S O) *) case/andP=> n_gt0 pi'_n; apply: big1_seq => p /andP[pi_p _]. (* Goal: @eq nat (expn p (logn p n)) (S O) *) case: (posnP (logn p n)) => [-> //|]. (* Goal: forall _ : is_true (leq (S O) (logn p n)), @eq nat (expn p (logn p n)) (S O) *) by rewrite logn_gt0; move/(allP pi'_n); case/negP. Qed. Lemma partn_eq1 pi n : n > 0 -> (n`_pi == 1) = pi^'.-nat n. Proof. (* Goal: forall _ : is_true (leq (S O) n), @eq bool (@eq_op nat_eqType (partn n pi) (S O)) (pnat (negn pi) n) *) move=> n_gt0; apply/eqP/idP=> [pi_n_1|]; last exact: part_p'nat. (* Goal: is_true (pnat (negn pi) n) *) by rewrite -(partnC pi n_gt0) pi_n_1 mul1n part_pnat. Qed. Lemma pnatP pi n : n > 0 -> reflect (forall p, prime p -> p %| n -> p \in pi) (pi.-nat n). Proof. (* Goal: forall _ : is_true (leq (S O) n), Bool.reflect (forall (p : nat) (_ : is_true (prime p)) (_ : is_true (dvdn p n)), is_true (@in_mem nat p (@mem nat nat_pred_pred pi))) (pnat pi n) *) move=> n_gt0; rewrite /pnat n_gt0. (* Goal: Bool.reflect (forall (p : nat) (_ : is_true (prime p)) (_ : is_true (dvdn p n)), is_true (@in_mem nat p (@mem nat nat_pred_pred pi))) (andb true (@all nat (@pred_of_simpl nat (@pred_of_mem_pred nat (@mem nat nat_pred_pred pi))) (primes n))) *) apply: (iffP allP) => /= pi_n p => [pr_p p_n|]. (* Goal: forall _ : is_true (@in_mem nat p (@mem nat (seq_predType nat_eqType) (primes n))), is_true (@in_mem nat p (@mem nat nat_pred_pred pi)) *) (* Goal: is_true (@in_mem nat p (@mem nat nat_pred_pred pi)) *) by rewrite pi_n // mem_primes pr_p n_gt0. (* Goal: forall _ : is_true (@in_mem nat p (@mem nat (seq_predType nat_eqType) (primes n))), is_true (@in_mem nat p (@mem nat nat_pred_pred pi)) *) by rewrite mem_primes n_gt0 /=; case/andP; move: p. Qed. Lemma pi_pnat pi p n : p.-nat n -> p \in pi -> pi.-nat n. Proof. (* Goal: forall (_ : is_true (pnat (nat_pred_of_nat p) n)) (_ : is_true (@in_mem nat p (@mem nat nat_pred_pred pi))), is_true (pnat pi n) *) move=> p_n pi_p; have [n_gt0 _] := andP p_n. (* Goal: is_true (pnat pi n) *) by apply/pnatP=> // q q_pr /(pnatP _ n_gt0 p_n _ q_pr)/eqnP->. Qed. Lemma p_natP p n : p.-nat n -> {k | n = p ^ k}. Proof. (* Goal: forall _ : is_true (pnat (nat_pred_of_nat p) n), @sig nat (fun k : nat => @eq nat n (expn p k)) *) by move=> p_n; exists (logn p n); rewrite -p_part part_pnat_id. Qed. Lemma pi'_p'nat pi p n : pi^'.-nat n -> p \in pi -> p^'.-nat n. Proof. (* Goal: forall (_ : is_true (pnat (negn pi) n)) (_ : is_true (@in_mem nat p (@mem nat nat_pred_pred pi))), is_true (pnat (negn (nat_pred_of_nat p)) n) *) move=> pi'n pi_p; apply: sub_in_pnat pi'n => q _. (* Goal: forall _ : is_true (@in_mem nat q (@mem nat nat_pred_pred (negn pi))), is_true (@in_mem nat q (@mem nat nat_pred_pred (negn (nat_pred_of_nat p)))) *) by apply: contraNneq => ->. Qed. Lemma pi_p'nat p pi n : pi.-nat n -> p \in pi^' -> p^'.-nat n. Proof. (* Goal: forall (_ : is_true (pnat pi n)) (_ : is_true (@in_mem nat p (@mem nat nat_pred_pred (negn pi)))), is_true (pnat (negn (nat_pred_of_nat p)) n) *) by move=> pi_n; apply: pi'_p'nat; rewrite pnatNK. Qed. Lemma partn_part pi rho n : {subset pi <= rho} -> n`_rho`_pi = n`_pi. Proof. (* Goal: forall _ : @sub_mem nat (@mem nat nat_pred_pred pi) (@mem nat nat_pred_pred rho), @eq nat (partn (partn n rho) pi) (partn n pi) *) move=> pi_sub_rho; have [->|n_gt0] := posnP n; first by rewrite !partn0 partn1. (* Goal: @eq nat (partn (partn n rho) pi) (partn n pi) *) rewrite -{2}(partnC rho n_gt0) partnM //. (* Goal: @eq nat (partn (partn n rho) pi) (muln (partn (partn n rho) pi) (partn (partn n (negn rho)) pi)) *) suffices: pi^'.-nat n`_rho^' by move/part_p'nat->; rewrite muln1. (* Goal: is_true (pnat (negn pi) (partn n (negn rho))) *) by apply: sub_in_pnat (part_pnat _ _) => q _; apply/contra/pi_sub_rho. Qed. Lemma partnI pi rho n : n`_[predI pi & rho] = n`_pi`_rho. Proof. (* Goal: @eq nat (partn n (@predI nat (@pred_of_simpl nat (@pred_of_mem_pred nat (@mem nat nat_pred_pred pi))) (@pred_of_simpl nat (@pred_of_mem_pred nat (@mem nat nat_pred_pred rho))))) (partn (partn n pi) rho) *) rewrite -(@partnC [predI pi & rho] _`_rho) //. (* Goal: @eq nat (partn n (@predI nat (@pred_of_simpl nat (@pred_of_mem_pred nat (@mem nat nat_pred_pred pi))) (@pred_of_simpl nat (@pred_of_mem_pred nat (@mem nat nat_pred_pred rho))))) (muln (partn (partn (partn n pi) rho) (@predI nat (@pred_of_simpl nat (@pred_of_mem_pred nat (@mem nat nat_pred_pred pi))) (@pred_of_simpl nat (@pred_of_mem_pred nat (@mem nat nat_pred_pred rho))))) (partn (partn (partn n pi) rho) (negn (@predI nat (@pred_of_simpl nat (@pred_of_mem_pred nat (@mem nat nat_pred_pred pi))) (@pred_of_simpl nat (@pred_of_mem_pred nat (@mem nat nat_pred_pred rho))))))) *) symmetry; rewrite 2?partn_part; try by move=> p /andP []. (* Goal: @eq nat (muln (partn n (@predI nat (@pred_of_simpl nat (@pred_of_mem_pred nat (@mem nat nat_pred_pred pi))) (@pred_of_simpl nat (@pred_of_mem_pred nat (@mem nat nat_pred_pred rho))))) (partn (partn (partn n pi) rho) (negn (@predI nat (@pred_of_simpl nat (@pred_of_mem_pred nat (@mem nat nat_pred_pred pi))) (@pred_of_simpl nat (@pred_of_mem_pred nat (@mem nat nat_pred_pred rho))))))) (partn n (@predI nat (@pred_of_simpl nat (@pred_of_mem_pred nat (@mem nat nat_pred_pred pi))) (@pred_of_simpl nat (@pred_of_mem_pred nat (@mem nat nat_pred_pred rho))))) *) rewrite mulnC part_p'nat ?mul1n // pnatNK pnatI part_pnat andbT. (* Goal: is_true (pnat pi (partn (partn n pi) rho)) *) exact: pnat_dvd (dvdn_part _ _) (part_pnat _ _). Qed. Lemma odd_2'nat n : odd n = 2^'.-nat n. Proof. (* Goal: @eq bool (odd n) (pnat (negn (nat_pred_of_nat (S (S O)))) n) *) by case: n => // n; rewrite p'natE // dvdn2 negbK. Qed. End PnatTheory. Hint Resolve part_gt0 : core. Lemma divisors_correct n : n > 0 -> [/\ uniq (divisors n), sorted leq (divisors n) & forall d, (d \in divisors n) = (d %| n)]. Proof. (* Goal: forall _ : is_true (leq (S O) n), and3 (is_true (@uniq nat_eqType (divisors n))) (is_true (@sorted nat_eqType leq (divisors n))) (forall d : Equality.sort nat_eqType, @eq bool (@in_mem (Equality.sort nat_eqType) d (@mem (Equality.sort nat_eqType) (seq_predType nat_eqType) (divisors n))) (dvdn d n)) *) move/prod_prime_decomp=> def_n; rewrite {4}def_n {def_n}. (* Goal: and3 (is_true (@uniq nat_eqType (divisors n))) (is_true (@sorted nat_eqType leq (divisors n))) (forall d : Equality.sort nat_eqType, @eq bool (@in_mem (Equality.sort nat_eqType) d (@mem (Equality.sort nat_eqType) (seq_predType nat_eqType) (divisors n))) (dvdn d (@BigOp.bigop nat (prod nat nat) (S O) (prime_decomp n) (fun f : prod nat nat => @BigBody nat (prod nat nat) f muln true (expn (@fst nat nat f) (@snd nat nat f)))))) *) have: all prime (primes n) by apply/allP=> p; rewrite mem_primes; case/andP. (* Goal: forall _ : is_true (@all nat prime (primes n)), and3 (is_true (@uniq nat_eqType (divisors n))) (is_true (@sorted nat_eqType leq (divisors n))) (forall d : Equality.sort nat_eqType, @eq bool (@in_mem (Equality.sort nat_eqType) d (@mem (Equality.sort nat_eqType) (seq_predType nat_eqType) (divisors n))) (dvdn d (@BigOp.bigop nat (prod nat nat) (S O) (prime_decomp n) (fun f : prod nat nat => @BigBody nat (prod nat nat) f muln true (expn (@fst nat nat f) (@snd nat nat f)))))) *) have:= primes_uniq n; rewrite /primes /divisors; move/prime_decomp: n. (* Goal: forall (n : list (prod nat nat)) (_ : is_true (@uniq nat_eqType (@unzip1 nat nat n))) (_ : is_true (@all nat prime (@unzip1 nat nat n))), and3 (is_true (@uniq nat_eqType (@foldr (prod nat nat) (list (Equality.sort nat_eqType)) add_divisors (@cons nat (S O) (@nil nat)) n))) (is_true (@sorted nat_eqType leq (@foldr (prod nat nat) (list (Equality.sort nat_eqType)) add_divisors (@cons nat (S O) (@nil nat)) n))) (forall d : Equality.sort nat_eqType, @eq bool (@in_mem (Equality.sort nat_eqType) d (@mem (Equality.sort nat_eqType) (seq_predType nat_eqType) (@foldr (prod nat nat) (list (Equality.sort nat_eqType)) add_divisors (@cons nat (S O) (@nil nat)) n))) (dvdn d (@BigOp.bigop nat (prod nat nat) (S O) n (fun f : prod nat nat => @BigBody nat (prod nat nat) f muln true (expn (@fst nat nat f) (@snd nat nat f)))))) *) elim=> [|[p e] pd] /=; first by split=> // d; rewrite big_nil dvdn1 mem_seq1. (* Goal: forall (_ : forall (_ : is_true (@uniq nat_eqType (@unzip1 nat nat pd))) (_ : is_true (@all nat prime (@unzip1 nat nat pd))), and3 (is_true (@uniq nat_eqType (@foldr (prod nat nat) (list nat) add_divisors (@cons nat (S O) (@nil nat)) pd))) (is_true (@sorted nat_eqType leq (@foldr (prod nat nat) (list nat) add_divisors (@cons nat (S O) (@nil nat)) pd))) (forall d : nat, @eq bool (@in_mem nat d (@mem nat (seq_predType nat_eqType) (@foldr (prod nat nat) (list nat) add_divisors (@cons nat (S O) (@nil nat)) pd))) (dvdn d (@BigOp.bigop nat (prod nat nat) (S O) pd (fun f : prod nat nat => @BigBody nat (prod nat nat) f muln true (expn (@fst nat nat f) (@snd nat nat f))))))) (_ : is_true (andb (negb (@in_mem nat p (@mem nat (seq_predType nat_eqType) (@unzip1 nat nat pd)))) (@uniq nat_eqType (@unzip1 nat nat pd)))) (_ : is_true (andb (prime p) (@all nat prime (@unzip1 nat nat pd)))), and3 (is_true (@uniq nat_eqType (@iter (list nat) e (fun divs' : list nat => @merge nat_eqType leq (@map nat nat (NatTrec.mul p) divs') (@foldr (prod nat nat) (list nat) add_divisors (@cons nat (S O) (@nil nat)) pd)) (@foldr (prod nat nat) (list nat) add_divisors (@cons nat (S O) (@nil nat)) pd)))) (is_true (@sorted nat_eqType leq (@iter (list nat) e (fun divs' : list nat => @merge nat_eqType leq (@map nat nat (NatTrec.mul p) divs') (@foldr (prod nat nat) (list nat) add_divisors (@cons nat (S O) (@nil nat)) pd)) (@foldr (prod nat nat) (list nat) add_divisors (@cons nat (S O) (@nil nat)) pd)))) (forall d : nat, @eq bool (@in_mem nat d (@mem nat (seq_predType nat_eqType) (@iter (list nat) e (fun divs' : list nat => @merge nat_eqType leq (@map nat nat (NatTrec.mul p) divs') (@foldr (prod nat nat) (list nat) add_divisors (@cons nat (S O) (@nil nat)) pd)) (@foldr (prod nat nat) (list nat) add_divisors (@cons nat (S O) (@nil nat)) pd)))) (dvdn d (@BigOp.bigop nat (prod nat nat) (S O) (@cons (prod nat nat) (@pair nat nat p e) pd) (fun f : prod nat nat => @BigBody nat (prod nat nat) f muln true (expn (@fst nat nat f) (@snd nat nat f)))))) *) rewrite big_cons /=; move: (foldr _ _ pd) => divs. (* Goal: forall (_ : forall (_ : is_true (@uniq nat_eqType (@unzip1 nat nat pd))) (_ : is_true (@all nat prime (@unzip1 nat nat pd))), and3 (is_true (@uniq nat_eqType divs)) (is_true (@sorted nat_eqType leq divs)) (forall d : nat, @eq bool (@in_mem nat d (@mem nat (seq_predType nat_eqType) divs)) (dvdn d (@BigOp.bigop nat (prod nat nat) (S O) pd (fun f : prod nat nat => @BigBody nat (prod nat nat) f muln true (expn (@fst nat nat f) (@snd nat nat f))))))) (_ : is_true (andb (negb (@in_mem nat p (@mem nat (seq_predType nat_eqType) (@unzip1 nat nat pd)))) (@uniq nat_eqType (@unzip1 nat nat pd)))) (_ : is_true (andb (prime p) (@all nat prime (@unzip1 nat nat pd)))), and3 (is_true (@uniq nat_eqType (@iter (list nat) e (fun divs' : list nat => @merge nat_eqType leq (@map nat nat (NatTrec.mul p) divs') divs) divs))) (is_true (@sorted nat_eqType leq (@iter (list nat) e (fun divs' : list nat => @merge nat_eqType leq (@map nat nat (NatTrec.mul p) divs') divs) divs))) (forall d : nat, @eq bool (@in_mem nat d (@mem nat (seq_predType nat_eqType) (@iter (list nat) e (fun divs' : list nat => @merge nat_eqType leq (@map nat nat (NatTrec.mul p) divs') divs) divs))) (dvdn d (muln (expn p e) (@BigOp.bigop nat (prod nat nat) (S O) pd (fun j : prod nat nat => @BigBody nat (prod nat nat) j muln true (expn (@fst nat nat j) (@snd nat nat j))))))) *) move=> IHpd /andP[npd_p Upd] /andP[pr_p pr_pd]. (* Goal: and3 (is_true (@uniq nat_eqType (@iter (list nat) e (fun divs' : list nat => @merge nat_eqType leq (@map nat nat (NatTrec.mul p) divs') divs) divs))) (is_true (@sorted nat_eqType leq (@iter (list nat) e (fun divs' : list nat => @merge nat_eqType leq (@map nat nat (NatTrec.mul p) divs') divs) divs))) (forall d : nat, @eq bool (@in_mem nat d (@mem nat (seq_predType nat_eqType) (@iter (list nat) e (fun divs' : list nat => @merge nat_eqType leq (@map nat nat (NatTrec.mul p) divs') divs) divs))) (dvdn d (muln (expn p e) (@BigOp.bigop nat (prod nat nat) (S O) pd (fun j : prod nat nat => @BigBody nat (prod nat nat) j muln true (expn (@fst nat nat j) (@snd nat nat j))))))) *) have lt0p: 0 < p by apply: prime_gt0. (* Goal: and3 (is_true (@uniq nat_eqType (@iter (list nat) e (fun divs' : list nat => @merge nat_eqType leq (@map nat nat (NatTrec.mul p) divs') divs) divs))) (is_true (@sorted nat_eqType leq (@iter (list nat) e (fun divs' : list nat => @merge nat_eqType leq (@map nat nat (NatTrec.mul p) divs') divs) divs))) (forall d : nat, @eq bool (@in_mem nat d (@mem nat (seq_predType nat_eqType) (@iter (list nat) e (fun divs' : list nat => @merge nat_eqType leq (@map nat nat (NatTrec.mul p) divs') divs) divs))) (dvdn d (muln (expn p e) (@BigOp.bigop nat (prod nat nat) (S O) pd (fun j : prod nat nat => @BigBody nat (prod nat nat) j muln true (expn (@fst nat nat j) (@snd nat nat j))))))) *) have {IHpd Upd}[Udivs Odivs mem_divs] := IHpd Upd pr_pd. (* Goal: and3 (is_true (@uniq nat_eqType (@iter (list nat) e (fun divs' : list nat => @merge nat_eqType leq (@map nat nat (NatTrec.mul p) divs') divs) divs))) (is_true (@sorted nat_eqType leq (@iter (list nat) e (fun divs' : list nat => @merge nat_eqType leq (@map nat nat (NatTrec.mul p) divs') divs) divs))) (forall d : nat, @eq bool (@in_mem nat d (@mem nat (seq_predType nat_eqType) (@iter (list nat) e (fun divs' : list nat => @merge nat_eqType leq (@map nat nat (NatTrec.mul p) divs') divs) divs))) (dvdn d (muln (expn p e) (@BigOp.bigop nat (prod nat nat) (S O) pd (fun j : prod nat nat => @BigBody nat (prod nat nat) j muln true (expn (@fst nat nat j) (@snd nat nat j))))))) *) have ndivs_p m: p * m \notin divs. (* Goal: and3 (is_true (@uniq nat_eqType (@iter (list nat) e (fun divs' : list nat => @merge nat_eqType leq (@map nat nat (NatTrec.mul p) divs') divs) divs))) (is_true (@sorted nat_eqType leq (@iter (list nat) e (fun divs' : list nat => @merge nat_eqType leq (@map nat nat (NatTrec.mul p) divs') divs) divs))) (forall d : nat, @eq bool (@in_mem nat d (@mem nat (seq_predType nat_eqType) (@iter (list nat) e (fun divs' : list nat => @merge nat_eqType leq (@map nat nat (NatTrec.mul p) divs') divs) divs))) (dvdn d (muln (expn p e) (@BigOp.bigop nat (prod nat nat) (S O) pd (fun j : prod nat nat => @BigBody nat (prod nat nat) j muln true (expn (@fst nat nat j) (@snd nat nat j))))))) *) (* Goal: is_true (negb (@in_mem nat (muln p m) (@mem (Equality.sort nat_eqType) (seq_predType nat_eqType) divs))) *) suffices: p \notin divs; rewrite !mem_divs. (* Goal: and3 (is_true (@uniq nat_eqType (@iter (list nat) e (fun divs' : list nat => @merge nat_eqType leq (@map nat nat (NatTrec.mul p) divs') divs) divs))) (is_true (@sorted nat_eqType leq (@iter (list nat) e (fun divs' : list nat => @merge nat_eqType leq (@map nat nat (NatTrec.mul p) divs') divs) divs))) (forall d : nat, @eq bool (@in_mem nat d (@mem nat (seq_predType nat_eqType) (@iter (list nat) e (fun divs' : list nat => @merge nat_eqType leq (@map nat nat (NatTrec.mul p) divs') divs) divs))) (dvdn d (muln (expn p e) (@BigOp.bigop nat (prod nat nat) (S O) pd (fun j : prod nat nat => @BigBody nat (prod nat nat) j muln true (expn (@fst nat nat j) (@snd nat nat j))))))) *) (* Goal: is_true (negb (dvdn p (@BigOp.bigop nat (prod nat nat) (S O) pd (fun f : prod nat nat => @BigBody nat (prod nat nat) f muln true (expn (@fst nat nat f) (@snd nat nat f)))))) *) (* Goal: forall _ : is_true (negb (dvdn p (@BigOp.bigop nat (prod nat nat) (S O) pd (fun f : prod nat nat => @BigBody nat (prod nat nat) f muln true (expn (@fst nat nat f) (@snd nat nat f)))))), is_true (negb (dvdn (muln p m) (@BigOp.bigop nat (prod nat nat) (S O) pd (fun f : prod nat nat => @BigBody nat (prod nat nat) f muln true (expn (@fst nat nat f) (@snd nat nat f)))))) *) by apply: contra => /dvdnP[n ->]; rewrite mulnCA dvdn_mulr. (* Goal: and3 (is_true (@uniq nat_eqType (@iter (list nat) e (fun divs' : list nat => @merge nat_eqType leq (@map nat nat (NatTrec.mul p) divs') divs) divs))) (is_true (@sorted nat_eqType leq (@iter (list nat) e (fun divs' : list nat => @merge nat_eqType leq (@map nat nat (NatTrec.mul p) divs') divs) divs))) (forall d : nat, @eq bool (@in_mem nat d (@mem nat (seq_predType nat_eqType) (@iter (list nat) e (fun divs' : list nat => @merge nat_eqType leq (@map nat nat (NatTrec.mul p) divs') divs) divs))) (dvdn d (muln (expn p e) (@BigOp.bigop nat (prod nat nat) (S O) pd (fun j : prod nat nat => @BigBody nat (prod nat nat) j muln true (expn (@fst nat nat j) (@snd nat nat j))))))) *) (* Goal: is_true (negb (dvdn p (@BigOp.bigop nat (prod nat nat) (S O) pd (fun f : prod nat nat => @BigBody nat (prod nat nat) f muln true (expn (@fst nat nat f) (@snd nat nat f)))))) *) have ndv_p_1: ~~(p %| 1) by rewrite dvdn1 neq_ltn orbC prime_gt1. (* Goal: and3 (is_true (@uniq nat_eqType (@iter (list nat) e (fun divs' : list nat => @merge nat_eqType leq (@map nat nat (NatTrec.mul p) divs') divs) divs))) (is_true (@sorted nat_eqType leq (@iter (list nat) e (fun divs' : list nat => @merge nat_eqType leq (@map nat nat (NatTrec.mul p) divs') divs) divs))) (forall d : nat, @eq bool (@in_mem nat d (@mem nat (seq_predType nat_eqType) (@iter (list nat) e (fun divs' : list nat => @merge nat_eqType leq (@map nat nat (NatTrec.mul p) divs') divs) divs))) (dvdn d (muln (expn p e) (@BigOp.bigop nat (prod nat nat) (S O) pd (fun j : prod nat nat => @BigBody nat (prod nat nat) j muln true (expn (@fst nat nat j) (@snd nat nat j))))))) *) (* Goal: is_true (negb (dvdn p (@BigOp.bigop nat (prod nat nat) (S O) pd (fun f : prod nat nat => @BigBody nat (prod nat nat) f muln true (expn (@fst nat nat f) (@snd nat nat f)))))) *) rewrite big_seq; elim/big_ind: _ => [//|u v npu npv|[q f] /= pd_qf]. (* Goal: and3 (is_true (@uniq nat_eqType (@iter (list nat) e (fun divs' : list nat => @merge nat_eqType leq (@map nat nat (NatTrec.mul p) divs') divs) divs))) (is_true (@sorted nat_eqType leq (@iter (list nat) e (fun divs' : list nat => @merge nat_eqType leq (@map nat nat (NatTrec.mul p) divs') divs) divs))) (forall d : nat, @eq bool (@in_mem nat d (@mem nat (seq_predType nat_eqType) (@iter (list nat) e (fun divs' : list nat => @merge nat_eqType leq (@map nat nat (NatTrec.mul p) divs') divs) divs))) (dvdn d (muln (expn p e) (@BigOp.bigop nat (prod nat nat) (S O) pd (fun j : prod nat nat => @BigBody nat (prod nat nat) j muln true (expn (@fst nat nat j) (@snd nat nat j))))))) *) (* Goal: is_true (negb (dvdn p (expn q f))) *) (* Goal: is_true (negb (dvdn p (muln u v))) *) by rewrite Euclid_dvdM //; apply/norP. (* Goal: and3 (is_true (@uniq nat_eqType (@iter (list nat) e (fun divs' : list nat => @merge nat_eqType leq (@map nat nat (NatTrec.mul p) divs') divs) divs))) (is_true (@sorted nat_eqType leq (@iter (list nat) e (fun divs' : list nat => @merge nat_eqType leq (@map nat nat (NatTrec.mul p) divs') divs) divs))) (forall d : nat, @eq bool (@in_mem nat d (@mem nat (seq_predType nat_eqType) (@iter (list nat) e (fun divs' : list nat => @merge nat_eqType leq (@map nat nat (NatTrec.mul p) divs') divs) divs))) (dvdn d (muln (expn p e) (@BigOp.bigop nat (prod nat nat) (S O) pd (fun j : prod nat nat => @BigBody nat (prod nat nat) j muln true (expn (@fst nat nat j) (@snd nat nat j))))))) *) (* Goal: is_true (negb (dvdn p (expn q f))) *) elim: (f) => // f'; rewrite expnS Euclid_dvdM // orbC negb_or => -> {f'}/=. (* Goal: and3 (is_true (@uniq nat_eqType (@iter (list nat) e (fun divs' : list nat => @merge nat_eqType leq (@map nat nat (NatTrec.mul p) divs') divs) divs))) (is_true (@sorted nat_eqType leq (@iter (list nat) e (fun divs' : list nat => @merge nat_eqType leq (@map nat nat (NatTrec.mul p) divs') divs) divs))) (forall d : nat, @eq bool (@in_mem nat d (@mem nat (seq_predType nat_eqType) (@iter (list nat) e (fun divs' : list nat => @merge nat_eqType leq (@map nat nat (NatTrec.mul p) divs') divs) divs))) (dvdn d (muln (expn p e) (@BigOp.bigop nat (prod nat nat) (S O) pd (fun j : prod nat nat => @BigBody nat (prod nat nat) j muln true (expn (@fst nat nat j) (@snd nat nat j))))))) *) (* Goal: is_true (negb (dvdn p q)) *) have pd_q: q \in unzip1 pd by apply/mapP; exists (q, f). (* Goal: and3 (is_true (@uniq nat_eqType (@iter (list nat) e (fun divs' : list nat => @merge nat_eqType leq (@map nat nat (NatTrec.mul p) divs') divs) divs))) (is_true (@sorted nat_eqType leq (@iter (list nat) e (fun divs' : list nat => @merge nat_eqType leq (@map nat nat (NatTrec.mul p) divs') divs) divs))) (forall d : nat, @eq bool (@in_mem nat d (@mem nat (seq_predType nat_eqType) (@iter (list nat) e (fun divs' : list nat => @merge nat_eqType leq (@map nat nat (NatTrec.mul p) divs') divs) divs))) (dvdn d (muln (expn p e) (@BigOp.bigop nat (prod nat nat) (S O) pd (fun j : prod nat nat => @BigBody nat (prod nat nat) j muln true (expn (@fst nat nat j) (@snd nat nat j))))))) *) (* Goal: is_true (negb (dvdn p q)) *) by apply: contra npd_p; rewrite dvdn_prime2 // ?(allP pr_pd) // => /eqP->. (* Goal: and3 (is_true (@uniq nat_eqType (@iter (list nat) e (fun divs' : list nat => @merge nat_eqType leq (@map nat nat (NatTrec.mul p) divs') divs) divs))) (is_true (@sorted nat_eqType leq (@iter (list nat) e (fun divs' : list nat => @merge nat_eqType leq (@map nat nat (NatTrec.mul p) divs') divs) divs))) (forall d : nat, @eq bool (@in_mem nat d (@mem nat (seq_predType nat_eqType) (@iter (list nat) e (fun divs' : list nat => @merge nat_eqType leq (@map nat nat (NatTrec.mul p) divs') divs) divs))) (dvdn d (muln (expn p e) (@BigOp.bigop nat (prod nat nat) (S O) pd (fun j : prod nat nat => @BigBody nat (prod nat nat) j muln true (expn (@fst nat nat j) (@snd nat nat j))))))) *) elim: e => [|e] /=; first by split=> // d; rewrite mul1n. (* Goal: forall _ : and3 (is_true (@uniq nat_eqType (@iter (list nat) e (fun divs' : list nat => @merge nat_eqType leq (@map nat nat (NatTrec.mul p) divs') divs) divs))) (is_true (@sorted nat_eqType leq (@iter (list nat) e (fun divs' : list nat => @merge nat_eqType leq (@map nat nat (NatTrec.mul p) divs') divs) divs))) (forall d : nat, @eq bool (@in_mem nat d (@mem nat (seq_predType nat_eqType) (@iter (list nat) e (fun divs' : list nat => @merge nat_eqType leq (@map nat nat (NatTrec.mul p) divs') divs) divs))) (dvdn d (muln (expn p e) (@BigOp.bigop nat (prod nat nat) (S O) pd (fun j : prod nat nat => @BigBody nat (prod nat nat) j muln true (expn (@fst nat nat j) (@snd nat nat j))))))), and3 (is_true (@uniq nat_eqType (@merge nat_eqType leq (@map nat nat (NatTrec.mul p) (@iter (list nat) e (fun divs' : list nat => @merge nat_eqType leq (@map nat nat (NatTrec.mul p) divs') divs) divs)) divs))) (is_true (@sorted nat_eqType leq (@merge nat_eqType leq (@map nat nat (NatTrec.mul p) (@iter (list nat) e (fun divs' : list nat => @merge nat_eqType leq (@map nat nat (NatTrec.mul p) divs') divs) divs)) divs))) (forall d : nat, @eq bool (@in_mem nat d (@mem nat (seq_predType nat_eqType) (@merge nat_eqType leq (@map nat nat (NatTrec.mul p) (@iter (list nat) e (fun divs' : list nat => @merge nat_eqType leq (@map nat nat (NatTrec.mul p) divs') divs) divs)) divs))) (dvdn d (muln (expn p (S e)) (@BigOp.bigop nat (prod nat nat) (S O) pd (fun j : prod nat nat => @BigBody nat (prod nat nat) j muln true (expn (@fst nat nat j) (@snd nat nat j))))))) *) have Tmulp_inj: injective (NatTrec.mul p). (* Goal: forall _ : and3 (is_true (@uniq nat_eqType (@iter (list nat) e (fun divs' : list nat => @merge nat_eqType leq (@map nat nat (NatTrec.mul p) divs') divs) divs))) (is_true (@sorted nat_eqType leq (@iter (list nat) e (fun divs' : list nat => @merge nat_eqType leq (@map nat nat (NatTrec.mul p) divs') divs) divs))) (forall d : nat, @eq bool (@in_mem nat d (@mem nat (seq_predType nat_eqType) (@iter (list nat) e (fun divs' : list nat => @merge nat_eqType leq (@map nat nat (NatTrec.mul p) divs') divs) divs))) (dvdn d (muln (expn p e) (@BigOp.bigop nat (prod nat nat) (S O) pd (fun j : prod nat nat => @BigBody nat (prod nat nat) j muln true (expn (@fst nat nat j) (@snd nat nat j))))))), and3 (is_true (@uniq nat_eqType (@merge nat_eqType leq (@map nat nat (NatTrec.mul p) (@iter (list nat) e (fun divs' : list nat => @merge nat_eqType leq (@map nat nat (NatTrec.mul p) divs') divs) divs)) divs))) (is_true (@sorted nat_eqType leq (@merge nat_eqType leq (@map nat nat (NatTrec.mul p) (@iter (list nat) e (fun divs' : list nat => @merge nat_eqType leq (@map nat nat (NatTrec.mul p) divs') divs) divs)) divs))) (forall d : nat, @eq bool (@in_mem nat d (@mem nat (seq_predType nat_eqType) (@merge nat_eqType leq (@map nat nat (NatTrec.mul p) (@iter (list nat) e (fun divs' : list nat => @merge nat_eqType leq (@map nat nat (NatTrec.mul p) divs') divs) divs)) divs))) (dvdn d (muln (expn p (S e)) (@BigOp.bigop nat (prod nat nat) (S O) pd (fun j : prod nat nat => @BigBody nat (prod nat nat) j muln true (expn (@fst nat nat j) (@snd nat nat j))))))) *) (* Goal: @injective nat nat (NatTrec.mul p) *) by move=> u v /eqP; rewrite !natTrecE eqn_pmul2l // => /eqP. (* Goal: forall _ : and3 (is_true (@uniq nat_eqType (@iter (list nat) e (fun divs' : list nat => @merge nat_eqType leq (@map nat nat (NatTrec.mul p) divs') divs) divs))) (is_true (@sorted nat_eqType leq (@iter (list nat) e (fun divs' : list nat => @merge nat_eqType leq (@map nat nat (NatTrec.mul p) divs') divs) divs))) (forall d : nat, @eq bool (@in_mem nat d (@mem nat (seq_predType nat_eqType) (@iter (list nat) e (fun divs' : list nat => @merge nat_eqType leq (@map nat nat (NatTrec.mul p) divs') divs) divs))) (dvdn d (muln (expn p e) (@BigOp.bigop nat (prod nat nat) (S O) pd (fun j : prod nat nat => @BigBody nat (prod nat nat) j muln true (expn (@fst nat nat j) (@snd nat nat j))))))), and3 (is_true (@uniq nat_eqType (@merge nat_eqType leq (@map nat nat (NatTrec.mul p) (@iter (list nat) e (fun divs' : list nat => @merge nat_eqType leq (@map nat nat (NatTrec.mul p) divs') divs) divs)) divs))) (is_true (@sorted nat_eqType leq (@merge nat_eqType leq (@map nat nat (NatTrec.mul p) (@iter (list nat) e (fun divs' : list nat => @merge nat_eqType leq (@map nat nat (NatTrec.mul p) divs') divs) divs)) divs))) (forall d : nat, @eq bool (@in_mem nat d (@mem nat (seq_predType nat_eqType) (@merge nat_eqType leq (@map nat nat (NatTrec.mul p) (@iter (list nat) e (fun divs' : list nat => @merge nat_eqType leq (@map nat nat (NatTrec.mul p) divs') divs) divs)) divs))) (dvdn d (muln (expn p (S e)) (@BigOp.bigop nat (prod nat nat) (S O) pd (fun j : prod nat nat => @BigBody nat (prod nat nat) j muln true (expn (@fst nat nat j) (@snd nat nat j))))))) *) move: (iter e _ _) => divs' [Udivs' Odivs' mem_divs']; split=> [||d]. (* Goal: @eq bool (@in_mem nat d (@mem nat (seq_predType nat_eqType) (@merge nat_eqType leq (@map nat nat (NatTrec.mul p) divs') divs))) (dvdn d (muln (expn p (S e)) (@BigOp.bigop nat (prod nat nat) (S O) pd (fun j : prod nat nat => @BigBody nat (prod nat nat) j muln true (expn (@fst nat nat j) (@snd nat nat j)))))) *) (* Goal: is_true (@sorted nat_eqType leq (@merge nat_eqType leq (@map nat nat (NatTrec.mul p) divs') divs)) *) (* Goal: is_true (@uniq nat_eqType (@merge nat_eqType leq (@map nat nat (NatTrec.mul p) divs') divs)) *) - (* Goal: @eq bool (@in_mem nat d (@mem nat (seq_predType nat_eqType) (@merge nat_eqType leq (@map nat nat (NatTrec.mul p) divs') divs))) (dvdn d (muln (expn p (S e)) (@BigOp.bigop nat (prod nat nat) (S O) pd (fun j : prod nat nat => @BigBody nat (prod nat nat) j muln true (expn (@fst nat nat j) (@snd nat nat j)))))) *) (* Goal: is_true (@sorted nat_eqType leq (@merge nat_eqType leq (@map nat nat (NatTrec.mul p) divs') divs)) *) (* Goal: is_true (@uniq nat_eqType (@merge nat_eqType leq (@map nat nat (NatTrec.mul p) divs') divs)) *) rewrite merge_uniq cat_uniq map_inj_uniq // Udivs Udivs' andbT /=. (* Goal: @eq bool (@in_mem nat d (@mem nat (seq_predType nat_eqType) (@merge nat_eqType leq (@map nat nat (NatTrec.mul p) divs') divs))) (dvdn d (muln (expn p (S e)) (@BigOp.bigop nat (prod nat nat) (S O) pd (fun j : prod nat nat => @BigBody nat (prod nat nat) j muln true (expn (@fst nat nat j) (@snd nat nat j)))))) *) (* Goal: is_true (@sorted nat_eqType leq (@merge nat_eqType leq (@map nat nat (NatTrec.mul p) divs') divs)) *) (* Goal: is_true (negb (@has nat (@pred_of_simpl nat (@pred_of_mem_pred nat (@mem nat (seq_predType nat_eqType) (@map nat nat (NatTrec.mul p) divs')))) divs)) *) apply/hasP=> [[d dv_d /mapP[d' _ def_d]]]. (* Goal: @eq bool (@in_mem nat d (@mem nat (seq_predType nat_eqType) (@merge nat_eqType leq (@map nat nat (NatTrec.mul p) divs') divs))) (dvdn d (muln (expn p (S e)) (@BigOp.bigop nat (prod nat nat) (S O) pd (fun j : prod nat nat => @BigBody nat (prod nat nat) j muln true (expn (@fst nat nat j) (@snd nat nat j)))))) *) (* Goal: is_true (@sorted nat_eqType leq (@merge nat_eqType leq (@map nat nat (NatTrec.mul p) divs') divs)) *) (* Goal: False *) by case/idPn: dv_d; rewrite def_d natTrecE. (* Goal: @eq bool (@in_mem nat d (@mem nat (seq_predType nat_eqType) (@merge nat_eqType leq (@map nat nat (NatTrec.mul p) divs') divs))) (dvdn d (muln (expn p (S e)) (@BigOp.bigop nat (prod nat nat) (S O) pd (fun j : prod nat nat => @BigBody nat (prod nat nat) j muln true (expn (@fst nat nat j) (@snd nat nat j)))))) *) (* Goal: is_true (@sorted nat_eqType leq (@merge nat_eqType leq (@map nat nat (NatTrec.mul p) divs') divs)) *) - (* Goal: @eq bool (@in_mem nat d (@mem nat (seq_predType nat_eqType) (@merge nat_eqType leq (@map nat nat (NatTrec.mul p) divs') divs))) (dvdn d (muln (expn p (S e)) (@BigOp.bigop nat (prod nat nat) (S O) pd (fun j : prod nat nat => @BigBody nat (prod nat nat) j muln true (expn (@fst nat nat j) (@snd nat nat j)))))) *) (* Goal: is_true (@sorted nat_eqType leq (@merge nat_eqType leq (@map nat nat (NatTrec.mul p) divs') divs)) *) rewrite (merge_sorted leq_total) //; case: (divs') Odivs' => //= d ds. (* Goal: @eq bool (@in_mem nat d (@mem nat (seq_predType nat_eqType) (@merge nat_eqType leq (@map nat nat (NatTrec.mul p) divs') divs))) (dvdn d (muln (expn p (S e)) (@BigOp.bigop nat (prod nat nat) (S O) pd (fun j : prod nat nat => @BigBody nat (prod nat nat) j muln true (expn (@fst nat nat j) (@snd nat nat j)))))) *) (* Goal: forall _ : is_true (@path nat leq d ds), is_true (@path nat leq (NatTrec.mul p d) (@map nat nat (NatTrec.mul p) ds)) *) rewrite (@map_path _ _ _ _ leq xpred0) ?has_pred0 // => u v _. (* Goal: @eq bool (@in_mem nat d (@mem nat (seq_predType nat_eqType) (@merge nat_eqType leq (@map nat nat (NatTrec.mul p) divs') divs))) (dvdn d (muln (expn p (S e)) (@BigOp.bigop nat (prod nat nat) (S O) pd (fun j : prod nat nat => @BigBody nat (prod nat nat) j muln true (expn (@fst nat nat j) (@snd nat nat j)))))) *) (* Goal: @eq bool (leq (NatTrec.mul p u) (NatTrec.mul p v)) (leq u v) *) by rewrite !natTrecE leq_pmul2l. (* Goal: @eq bool (@in_mem nat d (@mem nat (seq_predType nat_eqType) (@merge nat_eqType leq (@map nat nat (NatTrec.mul p) divs') divs))) (dvdn d (muln (expn p (S e)) (@BigOp.bigop nat (prod nat nat) (S O) pd (fun j : prod nat nat => @BigBody nat (prod nat nat) j muln true (expn (@fst nat nat j) (@snd nat nat j)))))) *) rewrite mem_merge mem_cat; case dv_d_p: (p %| d). (* Goal: @eq bool (orb (@in_mem (Equality.sort nat_eqType) d (@mem (Equality.sort nat_eqType) (seq_predType nat_eqType) (@map nat nat (NatTrec.mul p) divs'))) (@in_mem (Equality.sort nat_eqType) d (@mem (Equality.sort nat_eqType) (seq_predType nat_eqType) divs))) (dvdn d (muln (expn p (S e)) (@BigOp.bigop nat (prod nat nat) (S O) pd (fun j : prod nat nat => @BigBody nat (prod nat nat) j muln true (expn (@fst nat nat j) (@snd nat nat j)))))) *) (* Goal: @eq bool (orb (@in_mem (Equality.sort nat_eqType) d (@mem (Equality.sort nat_eqType) (seq_predType nat_eqType) (@map nat nat (NatTrec.mul p) divs'))) (@in_mem (Equality.sort nat_eqType) d (@mem (Equality.sort nat_eqType) (seq_predType nat_eqType) divs))) (dvdn d (muln (expn p (S e)) (@BigOp.bigop nat (prod nat nat) (S O) pd (fun j : prod nat nat => @BigBody nat (prod nat nat) j muln true (expn (@fst nat nat j) (@snd nat nat j)))))) *) case/dvdnP: dv_d_p => d' ->{d}; rewrite mulnC (negbTE (ndivs_p d')) orbF. (* Goal: @eq bool (orb (@in_mem (Equality.sort nat_eqType) d (@mem (Equality.sort nat_eqType) (seq_predType nat_eqType) (@map nat nat (NatTrec.mul p) divs'))) (@in_mem (Equality.sort nat_eqType) d (@mem (Equality.sort nat_eqType) (seq_predType nat_eqType) divs))) (dvdn d (muln (expn p (S e)) (@BigOp.bigop nat (prod nat nat) (S O) pd (fun j : prod nat nat => @BigBody nat (prod nat nat) j muln true (expn (@fst nat nat j) (@snd nat nat j)))))) *) (* Goal: @eq bool (@in_mem (Equality.sort nat_eqType) (muln p d') (@mem (Equality.sort nat_eqType) (seq_predType nat_eqType) (@map nat nat (NatTrec.mul p) divs'))) (dvdn (muln p d') (muln (expn p (S e)) (@BigOp.bigop nat (prod nat nat) (S O) pd (fun j : prod nat nat => @BigBody nat (prod nat nat) j muln true (expn (@fst nat nat j) (@snd nat nat j)))))) *) rewrite expnS -mulnA dvdn_pmul2l // -mem_divs'. (* Goal: @eq bool (orb (@in_mem (Equality.sort nat_eqType) d (@mem (Equality.sort nat_eqType) (seq_predType nat_eqType) (@map nat nat (NatTrec.mul p) divs'))) (@in_mem (Equality.sort nat_eqType) d (@mem (Equality.sort nat_eqType) (seq_predType nat_eqType) divs))) (dvdn d (muln (expn p (S e)) (@BigOp.bigop nat (prod nat nat) (S O) pd (fun j : prod nat nat => @BigBody nat (prod nat nat) j muln true (expn (@fst nat nat j) (@snd nat nat j)))))) *) (* Goal: @eq bool (@in_mem (Equality.sort nat_eqType) (muln p d') (@mem (Equality.sort nat_eqType) (seq_predType nat_eqType) (@map nat nat (NatTrec.mul p) divs'))) (@in_mem nat d' (@mem nat (seq_predType nat_eqType) divs')) *) by rewrite -(mem_map Tmulp_inj divs') natTrecE. (* Goal: @eq bool (orb (@in_mem (Equality.sort nat_eqType) d (@mem (Equality.sort nat_eqType) (seq_predType nat_eqType) (@map nat nat (NatTrec.mul p) divs'))) (@in_mem (Equality.sort nat_eqType) d (@mem (Equality.sort nat_eqType) (seq_predType nat_eqType) divs))) (dvdn d (muln (expn p (S e)) (@BigOp.bigop nat (prod nat nat) (S O) pd (fun j : prod nat nat => @BigBody nat (prod nat nat) j muln true (expn (@fst nat nat j) (@snd nat nat j)))))) *) case pdiv_d: (_ \in _). (* Goal: @eq bool (orb false (@in_mem (Equality.sort nat_eqType) d (@mem (Equality.sort nat_eqType) (seq_predType nat_eqType) divs))) (dvdn d (muln (expn p (S e)) (@BigOp.bigop nat (prod nat nat) (S O) pd (fun j : prod nat nat => @BigBody nat (prod nat nat) j muln true (expn (@fst nat nat j) (@snd nat nat j)))))) *) (* Goal: @eq bool (orb true (@in_mem (Equality.sort nat_eqType) d (@mem (Equality.sort nat_eqType) (seq_predType nat_eqType) divs))) (dvdn d (muln (expn p (S e)) (@BigOp.bigop nat (prod nat nat) (S O) pd (fun j : prod nat nat => @BigBody nat (prod nat nat) j muln true (expn (@fst nat nat j) (@snd nat nat j)))))) *) by case/mapP: pdiv_d dv_d_p => d' _ ->; rewrite natTrecE dvdn_mulr. (* Goal: @eq bool (orb false (@in_mem (Equality.sort nat_eqType) d (@mem (Equality.sort nat_eqType) (seq_predType nat_eqType) divs))) (dvdn d (muln (expn p (S e)) (@BigOp.bigop nat (prod nat nat) (S O) pd (fun j : prod nat nat => @BigBody nat (prod nat nat) j muln true (expn (@fst nat nat j) (@snd nat nat j)))))) *) rewrite mem_divs Gauss_dvdr // coprime_sym. (* Goal: is_true (coprime (expn p (S e)) d) *) by rewrite coprime_expl ?prime_coprime ?dv_d_p. Qed. Lemma sorted_divisors n : sorted leq (divisors n). Proof. (* Goal: is_true (@sorted nat_eqType leq (divisors n)) *) by case: (posnP n) => [-> | /divisors_correct[]]. Qed. Lemma divisors_uniq n : uniq (divisors n). Proof. (* Goal: is_true (@uniq nat_eqType (divisors n)) *) by case: (posnP n) => [-> | /divisors_correct[]]. Qed. Lemma sorted_divisors_ltn n : sorted ltn (divisors n). Proof. (* Goal: is_true (@sorted nat_eqType (@rel_of_simpl_rel nat ltn) (divisors n)) *) by rewrite ltn_sorted_uniq_leq divisors_uniq sorted_divisors. Qed. Lemma dvdn_divisors d m : 0 < m -> (d %| m) = (d \in divisors m). Proof. (* Goal: forall _ : is_true (leq (S O) m), @eq bool (dvdn d m) (@in_mem nat d (@mem (Equality.sort nat_eqType) (seq_predType nat_eqType) (divisors m))) *) by case/divisors_correct. Qed. Lemma divisor1 n : 1 \in divisors n. Proof. (* Goal: is_true (@in_mem nat (S O) (@mem (Equality.sort nat_eqType) (seq_predType nat_eqType) (divisors n))) *) by case: n => // n; rewrite -dvdn_divisors // dvd1n. Qed. Lemma divisors_id n : 0 < n -> n \in divisors n. Proof. (* Goal: forall _ : is_true (leq (S O) n), is_true (@in_mem nat n (@mem (Equality.sort nat_eqType) (seq_predType nat_eqType) (divisors n))) *) by move/dvdn_divisors <-. Qed. Lemma dvdn_sum d I r (K : pred I) F : (forall i, K i -> d %| F i) -> d %| \sum_(i <- r | K i) F i. Proof. (* Goal: forall _ : forall (i : I) (_ : is_true (K i)), is_true (dvdn d (F i)), is_true (dvdn d (@BigOp.bigop nat I O r (fun i : I => @BigBody nat I i addn (K i) (F i)))) *) by move=> dF; elim/big_ind: _ => //; apply: dvdn_add. Qed. Lemma dvdn_partP n m : 0 < n -> reflect (forall p, p \in \pi(n) -> n`_p %| m) (n %| m). Proof. (* Goal: forall _ : is_true (leq (S O) n), Bool.reflect (forall (p : nat) (_ : is_true (@in_mem nat p (@mem nat nat_pred_pred (pi_of n)))), is_true (dvdn (partn n (nat_pred_of_nat p)) m)) (dvdn n m) *) move=> n_gt0; apply: (iffP idP) => n_dvd_m => [p _|]. (* Goal: is_true (dvdn n m) *) (* Goal: is_true (dvdn (partn n (nat_pred_of_nat p)) m) *) by apply: dvdn_trans n_dvd_m; apply: dvdn_part. (* Goal: is_true (dvdn n m) *) have [-> // | m_gt0] := posnP m. (* Goal: is_true (dvdn n m) *) rewrite -(partnT n_gt0) -(partnT m_gt0). (* Goal: is_true (dvdn (partn n (@predT nat)) (partn m (@predT nat))) *) rewrite !(@widen_partn (m + n)) ?leq_addl ?leq_addr // /in_mem /=. (* Goal: is_true (dvdn (@BigOp.bigop nat nat (S O) (index_iota O (S (addn m n))) (fun p : nat => @BigBody nat nat p muln true (expn p (logn p n)))) (@BigOp.bigop nat nat (S O) (index_iota O (S (addn m n))) (fun p : nat => @BigBody nat nat p muln true (expn p (logn p m))))) *) elim/big_ind2: _ => // [* | q _]; first exact: dvdn_mul. (* Goal: is_true (dvdn (expn q (logn q n)) (expn q (logn q m))) *) have [-> // | ] := posnP (logn q n); rewrite logn_gt0 => q_n. (* Goal: is_true (dvdn (expn q (logn q n)) (expn q (logn q m))) *) have pr_q: prime q by move: q_n; rewrite mem_primes; case/andP. (* Goal: is_true (dvdn (expn q (logn q n)) (expn q (logn q m))) *) by have:= n_dvd_m q q_n; rewrite p_part !pfactor_dvdn // pfactorK. Qed. Lemma modn_partP n a b : 0 < n -> reflect (forall p : nat, p \in \pi(n) -> a = b %[mod n`_p]) (a == b %[mod n]). Proof. (* Goal: forall _ : is_true (leq (S O) n), Bool.reflect (forall (p : nat) (_ : is_true (@in_mem nat p (@mem nat nat_pred_pred (pi_of n)))), @eq nat (modn a (partn n (nat_pred_of_nat p))) (modn b (partn n (nat_pred_of_nat p)))) (@eq_op nat_eqType (modn a n) (modn b n)) *) move=> n_gt0; wlog le_b_a: a b / b <= a. (* Goal: Bool.reflect (forall (p : nat) (_ : is_true (@in_mem nat p (@mem nat nat_pred_pred (pi_of n)))), @eq nat (modn a (partn n (nat_pred_of_nat p))) (modn b (partn n (nat_pred_of_nat p)))) (@eq_op nat_eqType (modn a n) (modn b n)) *) (* Goal: forall _ : forall (a b : nat) (_ : is_true (leq b a)), Bool.reflect (forall (p : nat) (_ : is_true (@in_mem nat p (@mem nat nat_pred_pred (pi_of n)))), @eq nat (modn a (partn n (nat_pred_of_nat p))) (modn b (partn n (nat_pred_of_nat p)))) (@eq_op nat_eqType (modn a n) (modn b n)), Bool.reflect (forall (p : nat) (_ : is_true (@in_mem nat p (@mem nat nat_pred_pred (pi_of n)))), @eq nat (modn a (partn n (nat_pred_of_nat p))) (modn b (partn n (nat_pred_of_nat p)))) (@eq_op nat_eqType (modn a n) (modn b n)) *) move=> IH; case: (leqP b a) => [|/ltnW] /IH {IH}// IH. (* Goal: Bool.reflect (forall (p : nat) (_ : is_true (@in_mem nat p (@mem nat nat_pred_pred (pi_of n)))), @eq nat (modn a (partn n (nat_pred_of_nat p))) (modn b (partn n (nat_pred_of_nat p)))) (@eq_op nat_eqType (modn a n) (modn b n)) *) (* Goal: Bool.reflect (forall (p : nat) (_ : is_true (@in_mem nat p (@mem nat nat_pred_pred (pi_of n)))), @eq nat (modn a (partn n (nat_pred_of_nat p))) (modn b (partn n (nat_pred_of_nat p)))) (@eq_op nat_eqType (modn a n) (modn b n)) *) by rewrite eq_sym; apply: (iffP IH) => eqab p; move/eqab. (* Goal: Bool.reflect (forall (p : nat) (_ : is_true (@in_mem nat p (@mem nat nat_pred_pred (pi_of n)))), @eq nat (modn a (partn n (nat_pred_of_nat p))) (modn b (partn n (nat_pred_of_nat p)))) (@eq_op nat_eqType (modn a n) (modn b n)) *) rewrite eqn_mod_dvd //; apply: (iffP (dvdn_partP _ n_gt0)) => eqab p /eqab; by rewrite -eqn_mod_dvd // => /eqP. Qed. Lemma totientE n : n > 0 -> totient n = \prod_(p <- primes n) (p.-1 * p ^ (logn p n).-1). Proof. (* Goal: forall _ : is_true (leq (S O) n), @eq nat (totient n) (@BigOp.bigop nat nat (S O) (primes n) (fun p : nat => @BigBody nat nat p muln true (muln (Nat.pred p) (expn p (Nat.pred (logn p n)))))) *) move=> n_gt0; rewrite /totient n_gt0 prime_decompE unlock. (* Goal: @eq nat (@foldr (prod nat nat) nat add_totient_factor (nat_of_bool true) (@map nat (prod nat nat) (fun p : nat => @pair nat nat p (logn p n)) (primes n))) (@reducebig nat nat (S O) (primes n) (fun p : nat => @BigBody nat nat p muln true (muln (Nat.pred p) (expn p (Nat.pred (logn p n)))))) *) by elim: (primes n) => //= [p pr ->]; rewrite !natTrecE. Qed. Lemma totient_gt0 n : (0 < totient n) = (0 < n). Proof. (* Goal: @eq bool (leq (S O) (totient n)) (leq (S O) n) *) case: n => // n; rewrite totientE // big_seq_cond prodn_cond_gt0 // => p. (* Goal: forall _ : is_true (andb (@in_mem (Equality.sort nat_eqType) p (@mem (Equality.sort nat_eqType) (seq_predType nat_eqType) (primes (S n)))) true), is_true (leq (S O) (muln (Nat.pred p) (expn p (Nat.pred (logn p (S n)))))) *) by rewrite mem_primes muln_gt0 expn_gt0; case: p => [|[|]]. Qed. Lemma totient_pfactor p e : prime p -> e > 0 -> totient (p ^ e) = p.-1 * p ^ e.-1. Proof. (* Goal: forall (_ : is_true (prime p)) (_ : is_true (leq (S O) e)), @eq nat (totient (expn p e)) (muln (Nat.pred p) (expn p (Nat.pred e))) *) move=> p_pr e_gt0; rewrite totientE ?expn_gt0 ?prime_gt0 //. (* Goal: @eq nat (@BigOp.bigop nat nat (S O) (primes (expn p e)) (fun p0 : nat => @BigBody nat nat p0 muln true (muln (Nat.pred p0) (expn p0 (Nat.pred (logn p0 (expn p e))))))) (muln (Nat.pred p) (expn p (Nat.pred e))) *) by rewrite primes_exp // primes_prime // unlock /= muln1 pfactorK. Qed. Lemma totient_coprime m n : coprime m n -> totient (m * n) = totient m * totient n. Lemma totient_count_coprime n : totient n = \sum_(0 <= d < n) coprime n d. Proof. (* Goal: @eq nat (totient n) (@BigOp.bigop nat nat O (index_iota O n) (fun d : nat => @BigBody nat nat d addn true (nat_of_bool (coprime n d)))) *) elim: {n}_.+1 {-2}n (ltnSn n) => // m IHm n; rewrite ltnS => le_n_m. (* Goal: @eq nat (totient n) (@BigOp.bigop nat nat O (index_iota O n) (fun d : nat => @BigBody nat nat d addn true (nat_of_bool (coprime n d)))) *) case: (leqP n 1) => [|lt1n]; first by rewrite unlock; case: (n) => [|[]]. (* Goal: @eq nat (totient n) (@BigOp.bigop nat nat O (index_iota O n) (fun d : nat => @BigBody nat nat d addn true (nat_of_bool (coprime n d)))) *) pose p := pdiv n; have p_pr: prime p by apply: pdiv_prime. (* Goal: @eq nat (totient n) (@BigOp.bigop nat nat O (index_iota O n) (fun d : nat => @BigBody nat nat d addn true (nat_of_bool (coprime n d)))) *) have p1 := prime_gt1 p_pr; have p0 := ltnW p1. (* Goal: @eq nat (totient n) (@BigOp.bigop nat nat O (index_iota O n) (fun d : nat => @BigBody nat nat d addn true (nat_of_bool (coprime n d)))) *) pose np := n`_p; pose np' := n`_p^'. (* Goal: @eq nat (totient n) (@BigOp.bigop nat nat O (index_iota O n) (fun d : nat => @BigBody nat nat d addn true (nat_of_bool (coprime n d)))) *) have co_npp': coprime np np' by rewrite coprime_partC. (* Goal: @eq nat (totient n) (@BigOp.bigop nat nat O (index_iota O n) (fun d : nat => @BigBody nat nat d addn true (nat_of_bool (coprime n d)))) *) have [n0 np0 np'0]: [/\ n > 0, np > 0 & np' > 0] by rewrite ltnW ?part_gt0. (* Goal: @eq nat (totient n) (@BigOp.bigop nat nat O (index_iota O n) (fun d : nat => @BigBody nat nat d addn true (nat_of_bool (coprime n d)))) *) have def_n: n = np * np' by rewrite partnC. (* Goal: @eq nat (totient n) (@BigOp.bigop nat nat O (index_iota O n) (fun d : nat => @BigBody nat nat d addn true (nat_of_bool (coprime n d)))) *) have lnp0: 0 < logn p n by rewrite lognE p_pr n0 pdiv_dvd. (* Goal: @eq nat (totient n) (@BigOp.bigop nat nat O (index_iota O n) (fun d : nat => @BigBody nat nat d addn true (nat_of_bool (coprime n d)))) *) pose in_mod k (k0 : k > 0) d := Ordinal (ltn_pmod d k0). (* Goal: @eq nat (totient n) (@BigOp.bigop nat nat O (index_iota O n) (fun d : nat => @BigBody nat nat d addn true (nat_of_bool (coprime n d)))) *) rewrite {1}def_n totient_coprime // {IHm}(IHm np') ?big_mkord; last first. (* Goal: @eq nat (muln (totient np) (@BigOp.bigop nat (Finite.sort (ordinal_finType np')) O (index_enum (ordinal_finType np')) (fun i : ordinal np' => @BigBody nat (ordinal np') i addn true (nat_of_bool (coprime np' (@nat_of_ord np' i)))))) (@BigOp.bigop nat (Finite.sort (ordinal_finType n)) O (index_enum (ordinal_finType n)) (fun i : ordinal n => @BigBody nat (ordinal n) i addn true (nat_of_bool (coprime n (@nat_of_ord n i))))) *) (* Goal: is_true (leq (S np') m) *) apply: leq_trans le_n_m; rewrite def_n ltn_Pmull //. (* Goal: @eq nat (muln (totient np) (@BigOp.bigop nat (Finite.sort (ordinal_finType np')) O (index_enum (ordinal_finType np')) (fun i : ordinal np' => @BigBody nat (ordinal np') i addn true (nat_of_bool (coprime np' (@nat_of_ord np' i)))))) (@BigOp.bigop nat (Finite.sort (ordinal_finType n)) O (index_enum (ordinal_finType n)) (fun i : ordinal n => @BigBody nat (ordinal n) i addn true (nat_of_bool (coprime n (@nat_of_ord n i))))) *) (* Goal: is_true (leq (S (S O)) np) *) by rewrite /np p_part -(expn0 p) ltn_exp2l. (* Goal: @eq nat (muln (totient np) (@BigOp.bigop nat (Finite.sort (ordinal_finType np')) O (index_enum (ordinal_finType np')) (fun i : ordinal np' => @BigBody nat (ordinal np') i addn true (nat_of_bool (coprime np' (@nat_of_ord np' i)))))) (@BigOp.bigop nat (Finite.sort (ordinal_finType n)) O (index_enum (ordinal_finType n)) (fun i : ordinal n => @BigBody nat (ordinal n) i addn true (nat_of_bool (coprime n (@nat_of_ord n i))))) *) have ->: totient np = #|[pred d : 'I_np | coprime np d]|. (* Goal: @eq nat (muln (@card (ordinal_finType np) (@mem (ordinal np) (simplPredType (ordinal np)) (@SimplPred (ordinal np) (fun d : ordinal np => coprime np (@nat_of_ord np d))))) (@BigOp.bigop nat (Finite.sort (ordinal_finType np')) O (index_enum (ordinal_finType np')) (fun i : ordinal np' => @BigBody nat (ordinal np') i addn true (nat_of_bool (coprime np' (@nat_of_ord np' i)))))) (@BigOp.bigop nat (Finite.sort (ordinal_finType n)) O (index_enum (ordinal_finType n)) (fun i : ordinal n => @BigBody nat (ordinal n) i addn true (nat_of_bool (coprime n (@nat_of_ord n i))))) *) (* Goal: @eq nat (totient np) (@card (ordinal_finType np) (@mem (ordinal np) (simplPredType (ordinal np)) (@SimplPred (ordinal np) (fun d : ordinal np => coprime np (@nat_of_ord np d))))) *) rewrite {1}[np]p_part totient_pfactor //=; set q := p ^ _. (* Goal: @eq nat (muln (@card (ordinal_finType np) (@mem (ordinal np) (simplPredType (ordinal np)) (@SimplPred (ordinal np) (fun d : ordinal np => coprime np (@nat_of_ord np d))))) (@BigOp.bigop nat (Finite.sort (ordinal_finType np')) O (index_enum (ordinal_finType np')) (fun i : ordinal np' => @BigBody nat (ordinal np') i addn true (nat_of_bool (coprime np' (@nat_of_ord np' i)))))) (@BigOp.bigop nat (Finite.sort (ordinal_finType n)) O (index_enum (ordinal_finType n)) (fun i : ordinal n => @BigBody nat (ordinal n) i addn true (nat_of_bool (coprime n (@nat_of_ord n i))))) *) (* Goal: @eq nat (muln (Nat.pred p) q) (@card (ordinal_finType np) (@mem (ordinal np) (simplPredType (ordinal np)) (@SimplPred (ordinal np) (fun d : ordinal np => coprime np (@nat_of_ord np d))))) *) apply: (@addnI (1 * q)); rewrite -mulnDl [1 + _]prednK // mul1n. (* Goal: @eq nat (muln (@card (ordinal_finType np) (@mem (ordinal np) (simplPredType (ordinal np)) (@SimplPred (ordinal np) (fun d : ordinal np => coprime np (@nat_of_ord np d))))) (@BigOp.bigop nat (Finite.sort (ordinal_finType np')) O (index_enum (ordinal_finType np')) (fun i : ordinal np' => @BigBody nat (ordinal np') i addn true (nat_of_bool (coprime np' (@nat_of_ord np' i)))))) (@BigOp.bigop nat (Finite.sort (ordinal_finType n)) O (index_enum (ordinal_finType n)) (fun i : ordinal n => @BigBody nat (ordinal n) i addn true (nat_of_bool (coprime n (@nat_of_ord n i))))) *) (* Goal: @eq nat (muln p q) (addn q (@card (ordinal_finType np) (@mem (ordinal np) (simplPredType (ordinal np)) (@SimplPred (ordinal np) (fun d : ordinal np => coprime np (@nat_of_ord np d)))))) *) have def_np: np = p * q by rewrite -expnS prednK // -p_part. (* Goal: @eq nat (muln (@card (ordinal_finType np) (@mem (ordinal np) (simplPredType (ordinal np)) (@SimplPred (ordinal np) (fun d : ordinal np => coprime np (@nat_of_ord np d))))) (@BigOp.bigop nat (Finite.sort (ordinal_finType np')) O (index_enum (ordinal_finType np')) (fun i : ordinal np' => @BigBody nat (ordinal np') i addn true (nat_of_bool (coprime np' (@nat_of_ord np' i)))))) (@BigOp.bigop nat (Finite.sort (ordinal_finType n)) O (index_enum (ordinal_finType n)) (fun i : ordinal n => @BigBody nat (ordinal n) i addn true (nat_of_bool (coprime n (@nat_of_ord n i))))) *) (* Goal: @eq nat (muln p q) (addn q (@card (ordinal_finType np) (@mem (ordinal np) (simplPredType (ordinal np)) (@SimplPred (ordinal np) (fun d : ordinal np => coprime np (@nat_of_ord np d)))))) *) pose mulp := [fun d : 'I_q => in_mod _ np0 (p * d)]. (* Goal: @eq nat (muln (@card (ordinal_finType np) (@mem (ordinal np) (simplPredType (ordinal np)) (@SimplPred (ordinal np) (fun d : ordinal np => coprime np (@nat_of_ord np d))))) (@BigOp.bigop nat (Finite.sort (ordinal_finType np')) O (index_enum (ordinal_finType np')) (fun i : ordinal np' => @BigBody nat (ordinal np') i addn true (nat_of_bool (coprime np' (@nat_of_ord np' i)))))) (@BigOp.bigop nat (Finite.sort (ordinal_finType n)) O (index_enum (ordinal_finType n)) (fun i : ordinal n => @BigBody nat (ordinal n) i addn true (nat_of_bool (coprime n (@nat_of_ord n i))))) *) (* Goal: @eq nat (muln p q) (addn q (@card (ordinal_finType np) (@mem (ordinal np) (simplPredType (ordinal np)) (@SimplPred (ordinal np) (fun d : ordinal np => coprime np (@nat_of_ord np d)))))) *) rewrite -def_np -{1}[np]card_ord -(cardC (mem (codom mulp))). (* Goal: @eq nat (muln (@card (ordinal_finType np) (@mem (ordinal np) (simplPredType (ordinal np)) (@SimplPred (ordinal np) (fun d : ordinal np => coprime np (@nat_of_ord np d))))) (@BigOp.bigop nat (Finite.sort (ordinal_finType np')) O (index_enum (ordinal_finType np')) (fun i : ordinal np' => @BigBody nat (ordinal np') i addn true (nat_of_bool (coprime np' (@nat_of_ord np' i)))))) (@BigOp.bigop nat (Finite.sort (ordinal_finType n)) O (index_enum (ordinal_finType n)) (fun i : ordinal n => @BigBody nat (ordinal n) i addn true (nat_of_bool (coprime n (@nat_of_ord n i))))) *) (* Goal: @eq nat (addn (@card (ordinal_finType np) (@mem (Finite.sort (ordinal_finType np)) (predPredType (Finite.sort (ordinal_finType np))) (@pred_of_simpl (Equality.sort (ordinal_eqType np)) (@pred_of_mem_pred (Equality.sort (ordinal_eqType np)) (@mem (Equality.sort (ordinal_eqType np)) (seq_predType (ordinal_eqType np)) (@codom (ordinal_finType q) (ordinal np) (@fun_of_simpl (ordinal q) (ordinal np) mulp))))))) (@card (ordinal_finType np) (@mem (Finite.sort (ordinal_finType np)) (simplPredType (Finite.sort (ordinal_finType np))) (@predC (Finite.sort (ordinal_finType np)) (@pred_of_simpl (Finite.sort (ordinal_finType np)) (@pred_of_mem_pred (Finite.sort (ordinal_finType np)) (@mem (Finite.sort (ordinal_finType np)) (predPredType (Finite.sort (ordinal_finType np))) (@pred_of_simpl (Equality.sort (ordinal_eqType np)) (@pred_of_mem_pred (Equality.sort (ordinal_eqType np)) (@mem (Equality.sort (ordinal_eqType np)) (seq_predType (ordinal_eqType np)) (@codom (ordinal_finType q) (ordinal np) (@fun_of_simpl (ordinal q) (ordinal np) mulp)))))))))))) (addn q (@card (ordinal_finType np) (@mem (ordinal np) (simplPredType (ordinal np)) (@SimplPred (ordinal np) (fun d : ordinal np => coprime np (@nat_of_ord np d)))))) *) rewrite card_in_image => [|[d1 ltd1] [d2 ltd2] /= _ _ []]; last first. (* Goal: @eq nat (muln (@card (ordinal_finType np) (@mem (ordinal np) (simplPredType (ordinal np)) (@SimplPred (ordinal np) (fun d : ordinal np => coprime np (@nat_of_ord np d))))) (@BigOp.bigop nat (Finite.sort (ordinal_finType np')) O (index_enum (ordinal_finType np')) (fun i : ordinal np' => @BigBody nat (ordinal np') i addn true (nat_of_bool (coprime np' (@nat_of_ord np' i)))))) (@BigOp.bigop nat (Finite.sort (ordinal_finType n)) O (index_enum (ordinal_finType n)) (fun i : ordinal n => @BigBody nat (ordinal n) i addn true (nat_of_bool (coprime n (@nat_of_ord n i))))) *) (* Goal: @eq nat (addn (@card (ordinal_finType q) (@mem (Finite.sort (ordinal_finType q)) (predPredType (Finite.sort (ordinal_finType q))) (@sort_of_simpl_pred (Equality.sort (Finite.eqType (ordinal_finType q))) (pred_of_argType (Equality.sort (Finite.eqType (ordinal_finType q))))))) (@card (ordinal_finType np) (@mem (Finite.sort (ordinal_finType np)) (simplPredType (Finite.sort (ordinal_finType np))) (@predC (Finite.sort (ordinal_finType np)) (@pred_of_simpl (Finite.sort (ordinal_finType np)) (@pred_of_mem_pred (Finite.sort (ordinal_finType np)) (@mem (Finite.sort (ordinal_finType np)) (predPredType (Finite.sort (ordinal_finType np))) (@pred_of_simpl (Equality.sort (ordinal_eqType np)) (@pred_of_mem_pred (Equality.sort (ordinal_eqType np)) (@mem (Equality.sort (ordinal_eqType np)) (seq_predType (ordinal_eqType np)) (@codom (ordinal_finType q) (ordinal np) (@fun_of_simpl (ordinal q) (ordinal np) mulp)))))))))))) (addn q (@card (ordinal_finType np) (@mem (ordinal np) (simplPredType (ordinal np)) (@SimplPred (ordinal np) (fun d : ordinal np => coprime np (@nat_of_ord np d)))))) *) (* Goal: forall _ : @eq nat (modn (muln p d1) np) (modn (muln p d2) np), @eq (ordinal q) (@Ordinal q d1 ltd1) (@Ordinal q d2 ltd2) *) move/eqP; rewrite def_np -!muln_modr ?modn_small //. (* Goal: @eq nat (muln (@card (ordinal_finType np) (@mem (ordinal np) (simplPredType (ordinal np)) (@SimplPred (ordinal np) (fun d : ordinal np => coprime np (@nat_of_ord np d))))) (@BigOp.bigop nat (Finite.sort (ordinal_finType np')) O (index_enum (ordinal_finType np')) (fun i : ordinal np' => @BigBody nat (ordinal np') i addn true (nat_of_bool (coprime np' (@nat_of_ord np' i)))))) (@BigOp.bigop nat (Finite.sort (ordinal_finType n)) O (index_enum (ordinal_finType n)) (fun i : ordinal n => @BigBody nat (ordinal n) i addn true (nat_of_bool (coprime n (@nat_of_ord n i))))) *) (* Goal: @eq nat (addn (@card (ordinal_finType q) (@mem (Finite.sort (ordinal_finType q)) (predPredType (Finite.sort (ordinal_finType q))) (@sort_of_simpl_pred (Equality.sort (Finite.eqType (ordinal_finType q))) (pred_of_argType (Equality.sort (Finite.eqType (ordinal_finType q))))))) (@card (ordinal_finType np) (@mem (Finite.sort (ordinal_finType np)) (simplPredType (Finite.sort (ordinal_finType np))) (@predC (Finite.sort (ordinal_finType np)) (@pred_of_simpl (Finite.sort (ordinal_finType np)) (@pred_of_mem_pred (Finite.sort (ordinal_finType np)) (@mem (Finite.sort (ordinal_finType np)) (predPredType (Finite.sort (ordinal_finType np))) (@pred_of_simpl (Equality.sort (ordinal_eqType np)) (@pred_of_mem_pred (Equality.sort (ordinal_eqType np)) (@mem (Equality.sort (ordinal_eqType np)) (seq_predType (ordinal_eqType np)) (@codom (ordinal_finType q) (ordinal np) (@fun_of_simpl (ordinal q) (ordinal np) mulp)))))))))))) (addn q (@card (ordinal_finType np) (@mem (ordinal np) (simplPredType (ordinal np)) (@SimplPred (ordinal np) (fun d : ordinal np => coprime np (@nat_of_ord np d)))))) *) (* Goal: forall _ : is_true (@eq_op nat_eqType (muln p d1) (muln p d2)), @eq (ordinal q) (@Ordinal q d1 ltd1) (@Ordinal q d2 ltd2) *) by rewrite eqn_pmul2l // => eq_op12; apply/eqP. (* Goal: @eq nat (muln (@card (ordinal_finType np) (@mem (ordinal np) (simplPredType (ordinal np)) (@SimplPred (ordinal np) (fun d : ordinal np => coprime np (@nat_of_ord np d))))) (@BigOp.bigop nat (Finite.sort (ordinal_finType np')) O (index_enum (ordinal_finType np')) (fun i : ordinal np' => @BigBody nat (ordinal np') i addn true (nat_of_bool (coprime np' (@nat_of_ord np' i)))))) (@BigOp.bigop nat (Finite.sort (ordinal_finType n)) O (index_enum (ordinal_finType n)) (fun i : ordinal n => @BigBody nat (ordinal n) i addn true (nat_of_bool (coprime n (@nat_of_ord n i))))) *) (* Goal: @eq nat (addn (@card (ordinal_finType q) (@mem (Finite.sort (ordinal_finType q)) (predPredType (Finite.sort (ordinal_finType q))) (@sort_of_simpl_pred (Equality.sort (Finite.eqType (ordinal_finType q))) (pred_of_argType (Equality.sort (Finite.eqType (ordinal_finType q))))))) (@card (ordinal_finType np) (@mem (Finite.sort (ordinal_finType np)) (simplPredType (Finite.sort (ordinal_finType np))) (@predC (Finite.sort (ordinal_finType np)) (@pred_of_simpl (Finite.sort (ordinal_finType np)) (@pred_of_mem_pred (Finite.sort (ordinal_finType np)) (@mem (Finite.sort (ordinal_finType np)) (predPredType (Finite.sort (ordinal_finType np))) (@pred_of_simpl (Equality.sort (ordinal_eqType np)) (@pred_of_mem_pred (Equality.sort (ordinal_eqType np)) (@mem (Equality.sort (ordinal_eqType np)) (seq_predType (ordinal_eqType np)) (@codom (ordinal_finType q) (ordinal np) (@fun_of_simpl (ordinal q) (ordinal np) mulp)))))))))))) (addn q (@card (ordinal_finType np) (@mem (ordinal np) (simplPredType (ordinal np)) (@SimplPred (ordinal np) (fun d : ordinal np => coprime np (@nat_of_ord np d)))))) *) rewrite card_ord; congr (q + _); apply: eq_card => d /=. (* Goal: @eq nat (muln (@card (ordinal_finType np) (@mem (ordinal np) (simplPredType (ordinal np)) (@SimplPred (ordinal np) (fun d : ordinal np => coprime np (@nat_of_ord np d))))) (@BigOp.bigop nat (Finite.sort (ordinal_finType np')) O (index_enum (ordinal_finType np')) (fun i : ordinal np' => @BigBody nat (ordinal np') i addn true (nat_of_bool (coprime np' (@nat_of_ord np' i)))))) (@BigOp.bigop nat (Finite.sort (ordinal_finType n)) O (index_enum (ordinal_finType n)) (fun i : ordinal n => @BigBody nat (ordinal n) i addn true (nat_of_bool (coprime n (@nat_of_ord n i))))) *) (* Goal: @eq bool (@in_mem (ordinal np) d (@mem (ordinal np) (predPredType (ordinal np)) (@pred_of_simpl (ordinal np) (@predC (ordinal np) (@pred_of_simpl (ordinal np) (@pred_of_mem_pred (ordinal np) (@mem (ordinal np) (predPredType (ordinal np)) (@pred_of_simpl (ordinal np) (@pred_of_mem_pred (ordinal np) (@mem (ordinal np) (seq_predType (ordinal_eqType np)) (@codom (ordinal_finType q) (ordinal np) (@fun_of_simpl (ordinal q) (ordinal np) mulp)))))))))))) (@in_mem (ordinal np) d (@mem (ordinal np) (predPredType (ordinal np)) (@pred_of_simpl (ordinal np) (@SimplPred (ordinal np) (fun d : ordinal np => coprime np (@nat_of_ord np d)))))) *) rewrite !inE [np in coprime np _]p_part coprime_pexpl ?prime_coprime //. (* Goal: @eq nat (muln (@card (ordinal_finType np) (@mem (ordinal np) (simplPredType (ordinal np)) (@SimplPred (ordinal np) (fun d : ordinal np => coprime np (@nat_of_ord np d))))) (@BigOp.bigop nat (Finite.sort (ordinal_finType np')) O (index_enum (ordinal_finType np')) (fun i : ordinal np' => @BigBody nat (ordinal np') i addn true (nat_of_bool (coprime np' (@nat_of_ord np' i)))))) (@BigOp.bigop nat (Finite.sort (ordinal_finType n)) O (index_enum (ordinal_finType n)) (fun i : ordinal n => @BigBody nat (ordinal n) i addn true (nat_of_bool (coprime n (@nat_of_ord n i))))) *) (* Goal: @eq bool (negb (@in_mem (ordinal np) d (@mem (ordinal np) (seq_predType (ordinal_eqType np)) (@codom (ordinal_finType q) (ordinal np) (@fun_of_simpl (ordinal q) (ordinal np) mulp))))) (negb (dvdn p (@nat_of_ord np d))) *) congr (~~ _); apply/codomP/idP=> [[d' -> /=] | /dvdnP[r def_d]]. (* Goal: @eq nat (muln (@card (ordinal_finType np) (@mem (ordinal np) (simplPredType (ordinal np)) (@SimplPred (ordinal np) (fun d : ordinal np => coprime np (@nat_of_ord np d))))) (@BigOp.bigop nat (Finite.sort (ordinal_finType np')) O (index_enum (ordinal_finType np')) (fun i : ordinal np' => @BigBody nat (ordinal np') i addn true (nat_of_bool (coprime np' (@nat_of_ord np' i)))))) (@BigOp.bigop nat (Finite.sort (ordinal_finType n)) O (index_enum (ordinal_finType n)) (fun i : ordinal n => @BigBody nat (ordinal n) i addn true (nat_of_bool (coprime n (@nat_of_ord n i))))) *) (* Goal: @ex (Finite.sort (ordinal_finType q)) (fun x : Finite.sort (ordinal_finType q) => @eq (Equality.sort (ordinal_eqType np)) d (@fun_of_simpl (ordinal q) (ordinal np) mulp x)) *) (* Goal: is_true (dvdn p (modn (muln p (@nat_of_ord q d')) np)) *) by rewrite def_np -muln_modr // dvdn_mulr. (* Goal: @eq nat (muln (@card (ordinal_finType np) (@mem (ordinal np) (simplPredType (ordinal np)) (@SimplPred (ordinal np) (fun d : ordinal np => coprime np (@nat_of_ord np d))))) (@BigOp.bigop nat (Finite.sort (ordinal_finType np')) O (index_enum (ordinal_finType np')) (fun i : ordinal np' => @BigBody nat (ordinal np') i addn true (nat_of_bool (coprime np' (@nat_of_ord np' i)))))) (@BigOp.bigop nat (Finite.sort (ordinal_finType n)) O (index_enum (ordinal_finType n)) (fun i : ordinal n => @BigBody nat (ordinal n) i addn true (nat_of_bool (coprime n (@nat_of_ord n i))))) *) (* Goal: @ex (Finite.sort (ordinal_finType q)) (fun x : Finite.sort (ordinal_finType q) => @eq (Equality.sort (ordinal_eqType np)) d (@fun_of_simpl (ordinal q) (ordinal np) mulp x)) *) do [rewrite mulnC; case: d => d ltd /=] in def_d *. have ltr: r < q by rewrite -(ltn_pmul2l p0) -def_np -def_d. by exists (Ordinal ltr); apply: val_inj; rewrite /= -def_d modn_small. pose h (d : 'I_n) := (in_mod _ np0 d, in_mod _ np'0 d). (* Goal: @eq nat (muln (@card (ordinal_finType np) (@mem (ordinal np) (simplPredType (ordinal np)) (@SimplPred (ordinal np) (fun d : ordinal np => coprime np (@nat_of_ord np d))))) (@BigOp.bigop nat (Finite.sort (ordinal_finType np')) O (index_enum (ordinal_finType np')) (fun i : ordinal np' => @BigBody nat (ordinal np') i addn true (nat_of_bool (coprime np' (@nat_of_ord np' i)))))) (@BigOp.bigop nat (Finite.sort (ordinal_finType n)) O (index_enum (ordinal_finType n)) (fun i : ordinal n => @BigBody nat (ordinal n) i addn true (nat_of_bool (coprime n (@nat_of_ord n i))))) *) (* Goal: @ex (Finite.sort (ordinal_finType q)) (fun x : Finite.sort (ordinal_finType q) => @eq (Equality.sort (ordinal_eqType np)) d (@fun_of_simpl (ordinal q) (ordinal np) mulp x)) *) pose h' (d : 'I_np * 'I_np') := in_mod _ n0 (chinese np np' d.1 d.2). (* Goal: @eq nat (muln (@card (ordinal_finType np) (@mem (ordinal np) (simplPredType (ordinal np)) (@SimplPred (ordinal np) (fun d : ordinal np => coprime np (@nat_of_ord np d))))) (@BigOp.bigop nat (Finite.sort (ordinal_finType np')) O (index_enum (ordinal_finType np')) (fun i : ordinal np' => @BigBody nat (ordinal np') i addn true (nat_of_bool (coprime np' (@nat_of_ord np' i)))))) (@BigOp.bigop nat (Finite.sort (ordinal_finType n)) O (index_enum (ordinal_finType n)) (fun i : ordinal n => @BigBody nat (ordinal n) i addn true (nat_of_bool (coprime n (@nat_of_ord n i))))) *) (* Goal: @ex (Finite.sort (ordinal_finType q)) (fun x : Finite.sort (ordinal_finType q) => @eq (Equality.sort (ordinal_eqType np)) d (@fun_of_simpl (ordinal q) (ordinal np) mulp x)) *) rewrite -!big_mkcond -sum_nat_const pair_big (reindex_onto h h') => [|[d d'] _]. apply: eq_bigl => [[d ltd] /=]; rewrite !inE /= -val_eqE /= andbC. rewrite !coprime_modr def_n -chinese_mod // -coprime_mull -def_n. by rewrite modn_small ?eqxx. apply/eqP; rewrite /eq_op /= /eq_op /= !modn_dvdm ?dvdn_part //. by rewrite chinese_modl // chinese_modr // !modn_small ?eqxx ?ltn_ord. Qed. Qed.
Require Import mathcomp.ssreflect.ssreflect. From mathcomp Require Import ssrfun ssrbool eqtype ssrnat seq path choice div. From mathcomp Require Import fintype tuple finfun bigop prime ssralg ssrnum finset fingroup. From mathcomp Require Import morphism perm automorphism quotient action zmodp cyclic center. From mathcomp Require Import gproduct commutator gseries nilpotent pgroup sylow maximal. From mathcomp Require Import frobenius. From mathcomp Require Import matrix mxalgebra mxrepresentation vector algC classfun character. Set Implicit Arguments. Unset Strict Implicit. Unset Printing Implicit Defensive. Import GroupScope GRing.Theory Num.Theory. Local Open Scope ring_scope. Reserved Notation "''I[' phi ]" (at level 8, format "''I[' phi ]"). Reserved Notation "''I_' G [ phi ]" (at level 8, G at level 2, format "''I_' G [ phi ]"). Section ConjDef. Variables (gT : finGroupType) (B : {set gT}) (y : gT) (phi : 'CF(B)). Local Notation G := <<B>>. Fact cfConjg_subproof : is_class_fun G [ffun x => phi (if y \in 'N(G) then x ^ y^-1 else x)]. Proof. (* Goal: is_true (@is_class_fun gT (@generated gT B) (@FunFinfun.finfun (FinGroup.arg_finType (FinGroup.base gT)) Algebraics.Implementation.type (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @fun_of_cfun gT B phi (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)) (@normaliser gT (@generated gT B)))) then @conjg gT x (@invg (FinGroup.base gT) y) else x)))) *) apply: intro_class_fun => [x z _ Gz | x notGx]. (* Goal: @eq (GRing.Zmodule.sort Algebraics.Implementation.zmodType) (@fun_of_cfun gT B phi (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)) (@normaliser gT (@generated gT B)))) then @conjg gT x (@invg (FinGroup.base gT) y) else x)) (GRing.zero Algebraics.Implementation.zmodType) *) (* Goal: @eq (GRing.Zmodule.sort Algebraics.Implementation.zmodType) (@fun_of_cfun gT B phi (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)) (@normaliser gT (@generated gT B)))) then @conjg gT (@conjg gT x z) (@invg (FinGroup.base gT) y) else @conjg gT x z)) (@fun_of_cfun gT B phi (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)) (@normaliser gT (@generated gT B)))) then @conjg gT x (@invg (FinGroup.base gT) y) else x)) *) have [nGy | _] := ifP; last by rewrite cfunJgen. (* Goal: @eq (GRing.Zmodule.sort Algebraics.Implementation.zmodType) (@fun_of_cfun gT B phi (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)) (@normaliser gT (@generated gT B)))) then @conjg gT x (@invg (FinGroup.base gT) y) else x)) (GRing.zero Algebraics.Implementation.zmodType) *) (* Goal: @eq (GRing.Zmodule.sort Algebraics.Implementation.zmodType) (@fun_of_cfun gT B phi (@conjg gT (@conjg gT x z) (@invg (FinGroup.base gT) y))) (@fun_of_cfun gT B phi (@conjg gT x (@invg (FinGroup.base gT) y))) *) by rewrite -conjgM conjgC conjgM cfunJgen // memJ_norm ?groupV. (* Goal: @eq (GRing.Zmodule.sort Algebraics.Implementation.zmodType) (@fun_of_cfun gT B phi (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)) (@normaliser gT (@generated gT B)))) then @conjg gT x (@invg (FinGroup.base gT) y) else x)) (GRing.zero Algebraics.Implementation.zmodType) *) by rewrite cfun0gen //; case: ifP => // nGy; rewrite memJ_norm ?groupV. Qed. Definition cfConjg := Cfun 1 cfConjg_subproof. End ConjDef. Prenex Implicits cfConjg. Notation "f ^ y" := (cfConjg y f) : cfun_scope. Section Conj. Variables (gT : finGroupType) (G : {group gT}). Implicit Type phi : 'CF(G). Lemma cfConjgE phi y x : y \in 'N(G) -> (phi ^ y)%CF x = phi (x ^ y^-1)%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)) (@normaliser gT (@gval gT G))))), @eq Algebraics.Implementation.type (@fun_of_cfun gT (@gval gT G) (@cfConjg gT (@gval gT G) y phi) x) (@fun_of_cfun gT (@gval gT G) phi (@conjg gT x (@invg (FinGroup.base gT) y))) *) by rewrite cfunElock genGid => ->. Qed. Lemma cfConjgEJ phi y x : y \in 'N(G) -> (phi ^ y)%CF (x ^ y) = phi x. 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)) (@normaliser gT (@gval gT G))))), @eq Algebraics.Implementation.type (@fun_of_cfun gT (@gval gT G) (@cfConjg gT (@gval gT G) y phi) (@conjg gT x y)) (@fun_of_cfun gT (@gval gT G) phi x) *) by move/cfConjgE->; rewrite conjgK. Qed. Lemma cfConjgEout phi y : y \notin 'N(G) -> (phi ^ y = phi)%CF. Proof. (* Goal: forall _ : is_true (negb (@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 (@gval gT G)))))), @eq (@classfun gT (@gval gT G)) (@cfConjg gT (@gval gT G) y phi) phi *) by move/negbTE=> notNy; apply/cfunP=> x; rewrite !cfunElock genGid notNy. Qed. Lemma cfConjgEin phi y (nGy : y \in 'N(G)) : (phi ^ y)%CF = cfIsom (norm_conj_isom nGy) phi. Proof. (* Goal: @eq (@classfun gT (@gval gT G)) (@cfConjg gT (@gval gT G) y phi) (@cfIsom gT gT G (@conjgm_morphism gT (@gval gT G) y) G (@norm_conj_isom gT G y nGy) phi) *) apply/cfun_inP=> x Gx. (* Goal: @eq Algebraics.Implementation.type (@fun_of_cfun gT (@gval gT G) (@cfConjg gT (@gval gT G) y phi) x) (@fun_of_cfun gT (@gval gT G) (@cfIsom gT gT G (@conjgm_morphism gT (@gval gT G) y) G (@norm_conj_isom gT G y nGy) phi) x) *) by rewrite cfConjgE // -{2}[x](conjgKV y) cfIsomE ?memJ_norm ?groupV. Qed. Lemma cfConjgMnorm phi : {in 'N(G) &, forall y z, phi ^ (y * z) = (phi ^ y) ^ z}%CF. 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)) (@normaliser gT (@gval gT G)))) (fun y z : FinGroup.arg_sort (FinGroup.base gT) => @eq (@classfun gT (@gval gT G)) (@cfConjg gT (@gval gT G) (@mulg (FinGroup.base gT) y z) phi) (@cfConjg gT (@gval gT G) z (@cfConjg gT (@gval gT G) y phi))) (inPhantom (forall y z : FinGroup.arg_sort (FinGroup.base gT), @eq (@classfun gT (@gval gT G)) (@cfConjg gT (@gval gT G) (@mulg (FinGroup.base gT) y z) phi) (@cfConjg gT (@gval gT G) z (@cfConjg gT (@gval gT G) y phi)))) *) move=> y z nGy nGz. (* Goal: @eq (@classfun gT (@gval gT G)) (@cfConjg gT (@gval gT G) (@mulg (FinGroup.base gT) y z) phi) (@cfConjg gT (@gval gT G) z (@cfConjg gT (@gval gT G) y phi)) *) by apply/cfunP=> x; rewrite !cfConjgE ?groupM // invMg conjgM. Qed. Lemma cfConjg_id phi y : y \in G -> (phi ^ y)%CF = phi. 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 (@classfun gT (@gval gT G)) (@cfConjg gT (@gval gT G) y phi) phi *) move=> Gy; apply/cfunP=> x; have nGy := subsetP (normG G) y Gy. (* Goal: @eq Algebraics.Implementation.type (@fun_of_cfun gT (@gval gT G) (@cfConjg gT (@gval gT G) y phi) x) (@fun_of_cfun gT (@gval gT G) phi x) *) by rewrite -(cfunJ _ _ Gy) cfConjgEJ. Qed. Lemma cfConjgM L phi : G <| L -> {in L &, forall y z, phi ^ (y * z) = (phi ^ y) ^ z}%CF. Proof. (* Goal: forall _ : is_true (@normal gT (@gval gT G) L), @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)) L)) (fun y z : FinGroup.arg_sort (FinGroup.base gT) => @eq (@classfun gT (@gval gT G)) (@cfConjg gT (@gval gT G) (@mulg (FinGroup.base gT) y z) phi) (@cfConjg gT (@gval gT G) z (@cfConjg gT (@gval gT G) y phi))) (inPhantom (forall y z : FinGroup.arg_sort (FinGroup.base gT), @eq (@classfun gT (@gval gT G)) (@cfConjg gT (@gval gT G) (@mulg (FinGroup.base gT) y z) phi) (@cfConjg gT (@gval gT G) z (@cfConjg gT (@gval gT G) y phi)))) *) by case/andP=> _ /subsetP nGL; apply: sub_in2 (cfConjgMnorm phi). Qed. Lemma cfConjgJ1 phi : (phi ^ 1)%CF = phi. Proof. (* Goal: @eq (@classfun gT (@gval gT G)) (@cfConjg gT (@gval gT G) (oneg (FinGroup.base gT)) phi) phi *) by apply/cfunP=> x; rewrite cfConjgE ?group1 // invg1 conjg1. Qed. Lemma cfConjgK y : cancel (cfConjg y) (cfConjg y^-1 : 'CF(G) -> 'CF(G)). Proof. (* Goal: @cancel (@classfun gT (@gval gT G)) (@classfun gT (@gval gT G)) (@cfConjg gT (@gval gT G) y) (@cfConjg gT (@gval gT G) (@invg (FinGroup.base gT) y) : forall _ : @classfun gT (@gval gT G), @classfun gT (@gval gT G)) *) move=> phi; apply/cfunP=> x; rewrite !cfunElock groupV /=. (* Goal: @eq Algebraics.Implementation.type (@fun_of_cfun gT (@gval gT G) phi (if @in_mem (FinGroup.arg_sort (FinGroup.base gT)) y (@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 (@generated gT (@gval gT G))))) then @conjg gT (if @in_mem (FinGroup.arg_sort (FinGroup.base gT)) y (@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 (@generated gT (@gval gT G))))) then @conjg gT x (@invg (FinGroup.base gT) (@invg (FinGroup.base gT) y)) else x) (@invg (FinGroup.base gT) y) else if @in_mem (FinGroup.arg_sort (FinGroup.base gT)) y (@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 (@generated gT (@gval gT G))))) then @conjg gT x (@invg (FinGroup.base gT) (@invg (FinGroup.base gT) y)) else x)) (@fun_of_cfun gT (@gval gT G) phi x) *) by case: ifP => -> //; rewrite conjgKV. Qed. Lemma cfConjgKV y : cancel (cfConjg y^-1) (cfConjg y : 'CF(G) -> 'CF(G)). Proof. (* Goal: @cancel (@classfun gT (@gval gT G)) (@classfun gT (@gval gT G)) (@cfConjg gT (@gval gT G) (@invg (FinGroup.base gT) y)) (@cfConjg gT (@gval gT G) y : forall _ : @classfun gT (@gval gT G), @classfun gT (@gval gT G)) *) by move=> phi /=; rewrite -{1}[y]invgK cfConjgK. Qed. Lemma cfConjg1 phi y : (phi ^ y)%CF 1%g = phi 1%g. Proof. (* Goal: @eq Algebraics.Implementation.type (@fun_of_cfun gT (@gval gT G) (@cfConjg gT (@gval gT G) y phi) (oneg (FinGroup.base gT))) (@fun_of_cfun gT (@gval gT G) phi (oneg (FinGroup.base gT))) *) by rewrite cfunElock conj1g if_same. Qed. Fact cfConjg_is_linear y : linear (cfConjg y : 'CF(G) -> 'CF(G)). Proof. (* Goal: @GRing.Linear.axiom Algebraics.Implementation.ringType (@cfun_lmodType gT (@gval gT G)) (@cfun_zmodType gT (@gval gT G)) (@GRing.scale Algebraics.Implementation.ringType (@cfun_lmodType gT (@gval gT G))) (@cfConjg gT (@gval gT G) y : forall _ : @classfun gT (@gval gT G), @classfun gT (@gval gT G)) (@GRing.Scale.scale_law Algebraics.Implementation.ringType (@cfun_lmodType gT (@gval gT G))) (@Logic.eq_refl (forall (_ : GRing.Ring.sort Algebraics.Implementation.ringType) (_ : 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)))))), 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)))))) (@GRing.scale Algebraics.Implementation.ringType (@cfun_lmodType gT (@gval gT G)))) *) by move=> a phi psi; apply/cfunP=> x; rewrite !cfunElock. Qed. Canonical cfConjg_additive y := Additive (cfConjg_is_linear y). Canonical cfConjg_linear y := AddLinear (cfConjg_is_linear y). Lemma cfConjg_cfuniJ A y : y \in 'N(G) -> ('1_A ^ y)%CF = '1_(A :^ y) :> 'CF(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)) (@normaliser gT (@gval gT G))))), @eq (@classfun gT (@gval gT G)) (@cfConjg gT (@gval gT G) y (@cfun_indicator gT (@gval gT G) A)) (@cfun_indicator gT (@gval gT G) (@conjugate gT A y)) *) move=> nGy; apply/cfunP=> x; rewrite !cfunElock genGid nGy -sub_conjgV. (* Goal: @eq Algebraics.Implementation.type (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (nat_of_bool (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 G)))) (@subset (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 (@conjg gT x (@invg (FinGroup.base gT) y)) (@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)) A)))))) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (nat_of_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)))) (@subset (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 (@class gT x (@gval gT G)) (@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)) A)))))) *) by rewrite -class_lcoset -class_rcoset norm_rlcoset ?memJ_norm ?groupV. Qed. Lemma cfConjg_cfuni A y : y \in 'N(A) -> ('1_A ^ y)%CF = '1_A :> 'CF(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)) (@normaliser gT A)))), @eq (@classfun gT (@gval gT G)) (@cfConjg gT (@gval gT G) y (@cfun_indicator gT (@gval gT G) A)) (@cfun_indicator gT (@gval gT G) A) *) by have [/cfConjg_cfuniJ-> /normP-> | /cfConjgEout] := boolP (y \in 'N(G)). Qed. Lemma cfConjg_cfun1 y : (1 ^ y)%CF = 1 :> 'CF(G). Proof. (* Goal: @eq (@classfun gT (@gval gT G)) (@cfConjg gT (@gval gT G) y (GRing.one (@cfun_ringType gT (@gval gT G)))) (GRing.one (@cfun_ringType gT (@gval gT G))) *) by rewrite -cfuniG; have [/cfConjg_cfuni|/cfConjgEout] := boolP (y \in 'N(G)). Qed. Fact cfConjg_is_multiplicative y : multiplicative (cfConjg y : _ -> 'CF(G)). Proof. (* Goal: @GRing.RMorphism.mixin_of (@cfun_ringType gT (@gval gT G)) (@cfun_ringType gT (@gval gT G)) (@cfConjg gT (@gval gT G) y : forall _ : @classfun gT (@gval gT G), @classfun gT (@gval gT G)) *) split=> [phi psi|]; last exact: cfConjg_cfun1. (* Goal: @eq (GRing.Ring.sort (@cfun_ringType gT (@gval gT G))) (@cfConjg gT (@gval gT G) y (@GRing.mul (@cfun_ringType gT (@gval gT G)) phi psi)) (@GRing.mul (@cfun_ringType gT (@gval gT G)) (@cfConjg gT (@gval gT G) y phi) (@cfConjg gT (@gval gT G) y psi)) *) by apply/cfunP=> x; rewrite !cfunElock. Qed. Canonical cfConjg_rmorphism y := AddRMorphism (cfConjg_is_multiplicative y). Canonical cfConjg_lrmorphism y := [lrmorphism of cfConjg y]. Lemma cfConjg_eq1 phi y : ((phi ^ y)%CF == 1) = (phi == 1). Proof. (* Goal: @eq bool (@eq_op (@cfun_eqType gT (@gval gT G)) (@cfConjg gT (@gval gT G) y phi) (GRing.one (@cfun_ringType gT (@gval gT G)))) (@eq_op (@cfun_eqType gT (@gval gT G)) phi (GRing.one (@cfun_ringType gT (@gval gT G)))) *) by apply: rmorph_eq1; apply: can_inj (cfConjgK y). Qed. Lemma cfAutConjg phi u y : cfAut u (phi ^ y) = (cfAut u phi ^ y)%CF. Proof. (* Goal: @eq (@classfun gT (@gval gT G)) (@cfAut gT (@gval gT G) u (@cfConjg gT (@gval gT G) y phi)) (@cfConjg gT (@gval gT G) y (@cfAut gT (@gval gT G) u phi)) *) by apply/cfunP=> x; rewrite !cfunElock. Qed. Lemma conj_cfConjg phi y : (phi ^ y)^*%CF = (phi^* ^ y)%CF. Proof. (* Goal: @eq (@classfun gT (@gval gT G)) (@cfAut gT (@gval gT G) (@conjC Algebraics.Implementation.numClosedFieldType) (@cfConjg gT (@gval gT G) y phi)) (@cfConjg gT (@gval gT G) y (@cfAut gT (@gval gT G) (@conjC Algebraics.Implementation.numClosedFieldType) phi)) *) exact: cfAutConjg. Qed. Lemma cfker_conjg phi y : y \in 'N(G) -> cfker (phi ^ y) = cfker phi :^ y. 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)) (@normaliser 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) (@cfConjg gT (@gval gT G) y phi)) (@conjugate gT (@cfker gT (@gval gT G) phi) y) *) move=> nGy; rewrite cfConjgEin // cfker_isom. (* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@morphim gT gT (@gval gT G) (@conjgm_morphism gT (@gval gT G) y) (@MorPhantom gT gT (@mfun gT gT (@gval gT G) (@conjgm_morphism gT (@gval gT G) y))) (@cfker gT (@gval gT G) phi)) (@conjugate gT (@cfker gT (@gval gT G) phi) y) *) by rewrite morphim_conj (setIidPr (cfker_sub _)). Qed. Lemma cfDetConjg phi y : cfDet (phi ^ y) = (cfDet phi ^ y)%CF. Proof. (* Goal: @eq (GRing.Ring.sort (@cfun_ringType gT (@gval gT G))) (@cfDet gT G (@cfConjg gT (@gval gT G) y phi)) (@cfConjg gT (@gval gT G) y (@cfDet gT G phi)) *) have [nGy | not_nGy] := boolP (y \in 'N(G)); last by rewrite !cfConjgEout. (* Goal: @eq (GRing.Ring.sort (@cfun_ringType gT (@gval gT G))) (@cfDet gT G (@cfConjg gT (@gval gT G) y phi)) (@cfConjg gT (@gval gT G) y (@cfDet gT G phi)) *) by rewrite !cfConjgEin cfDetIsom. Qed. End Conj. Section Inertia. Variable gT : finGroupType. Definition inertia (B : {set gT}) (phi : 'CF(B)) := [set y in 'N(B) | (phi ^ y)%CF == phi]. Local Notation "''I[' phi ]" := (inertia phi) : group_scope. Local Notation "''I_' G [ phi ]" := (G%g :&: 'I[phi]) : group_scope. Fact group_set_inertia (H : {group gT}) phi : group_set 'I[phi : 'CF(H)]. Proof. (* Goal: is_true (@group_set gT (@inertia (@gval gT H) (phi : @classfun gT (@gval gT H)))) *) apply/group_setP; split; first by rewrite inE group1 /= cfConjgJ1. (* Goal: @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)) (@inertia (@gval gT H) 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)) (@inertia (@gval gT H) phi))) (fun x y : FinGroup.arg_sort (FinGroup.base gT) => is_true (@in_mem (FinGroup.sort (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)) (@inertia (@gval gT H) phi))))) (inPhantom (forall x y : FinGroup.arg_sort (FinGroup.base gT), is_true (@in_mem (FinGroup.sort (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)) (@inertia (@gval gT H) phi)))))) *) move=> y z /setIdP[nHy /eqP n_phi_y] /setIdP[nHz n_phi_z]. (* Goal: is_true (@in_mem (FinGroup.sort (FinGroup.base gT)) (@mulg (FinGroup.base gT) 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)) (@inertia (@gval gT H) phi)))) *) by rewrite inE groupM //= cfConjgMnorm ?n_phi_y. Qed. Canonical inertia_group H phi := Group (@group_set_inertia H phi). Local Notation "''I[' phi ]" := (inertia_group phi) : Group_scope. Local Notation "''I_' G [ phi ]" := (G :&: 'I[phi])%G : Group_scope. Variables G H : {group gT}. Implicit Type phi : 'CF(H). Lemma inertiaJ phi y : y \in 'I[phi] -> (phi ^ y)%CF = phi. 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)) (@inertia (@gval gT H) phi)))), @eq (@classfun gT (@gval gT H)) (@cfConjg gT (@gval gT H) y phi) phi *) by case/setIdP=> _ /eqP->. Qed. Lemma inertia_valJ phi x y : y \in 'I[phi] -> phi (x ^ y)%g = phi x. 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)) (@inertia (@gval gT H) phi)))), @eq Algebraics.Implementation.type (@fun_of_cfun gT (@gval gT H) phi (@conjg gT x y)) (@fun_of_cfun gT (@gval gT H) phi x) *) by case/setIdP=> nHy /eqP {1}<-; rewrite cfConjgEJ. Qed. Lemma Inertia_sub phi : 'I_G[phi] \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) (@inertia (@gval gT H) 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)))) *) exact: subsetIl. Qed. Lemma norm_inertia phi : 'I[phi] \subset 'N(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)) (@inertia (@gval gT H) 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)) (@normaliser gT (@gval gT H))))) *) by rewrite ['I[_]]setIdE subsetIl. Qed. Lemma sub_inertia phi : H \subset 'I[phi]. 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 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)) (@inertia (@gval gT H) phi)))) *) by apply/subsetP=> y Hy; rewrite inE cfConjg_id ?(subsetP (normG H)) /=. Qed. Lemma normal_inertia phi : H <| 'I[phi]. Proof. (* Goal: is_true (@normal gT (@gval gT H) (@inertia (@gval gT H) phi)) *) by rewrite /normal sub_inertia norm_inertia. Qed. Lemma sub_Inertia phi : H \subset G -> H \subset 'I_G[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 (@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)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@inertia (@gval gT H) phi))))) *) by rewrite subsetI sub_inertia andbT. Qed. Lemma norm_Inertia phi : 'I_G[phi] \subset 'N(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)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@inertia (@gval gT H) 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)) (@normaliser gT (@gval gT H))))) *) by rewrite setIC subIset ?norm_inertia. Qed. Lemma normal_Inertia phi : H \subset G -> H <| 'I_G[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 (@normal gT (@gval gT H) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@inertia (@gval gT H) phi))) *) by rewrite /normal norm_Inertia andbT; apply: sub_Inertia. Qed. Lemma cfConjg_eqE phi : H <| G -> {in G &, forall y z, (phi ^ y == phi ^ z)%CF = (z \in 'I_G[phi] :* y)}. Proof. (* Goal: forall _ : is_true (@normal gT (@gval gT H) (@gval gT G)), @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 y z : FinGroup.arg_sort (FinGroup.base gT) => @eq bool (@eq_op (@cfun_eqType gT (@gval gT H)) (@cfConjg gT (@gval gT H) y phi) (@cfConjg gT (@gval gT H) z phi)) (@in_mem (FinGroup.arg_sort (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)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@inertia (@gval gT H) phi)) (@set1 (FinGroup.arg_finType (FinGroup.base gT)) y)))))) (inPhantom (forall y z : FinGroup.arg_sort (FinGroup.base gT), @eq bool (@eq_op (@cfun_eqType gT (@gval gT H)) (@cfConjg gT (@gval gT H) y phi) (@cfConjg gT (@gval gT H) z phi)) (@in_mem (FinGroup.arg_sort (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)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@inertia (@gval gT H) phi)) (@set1 (FinGroup.arg_finType (FinGroup.base gT)) y))))))) *) case/andP=> _ nHG y z Gy; rewrite -{1 2}[z](mulgKV y) groupMr // mem_rcoset. (* Goal: forall _ : is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@mulg (FinGroup.base gT) z (@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 G)))), @eq bool (@eq_op (@cfun_eqType gT (@gval gT H)) (@cfConjg gT (@gval gT H) y phi) (@cfConjg gT (@gval gT H) (@mulg (FinGroup.base gT) (@mulg (FinGroup.base gT) z (@invg (FinGroup.base gT) y)) y) phi)) (@in_mem (FinGroup.sort (FinGroup.base gT)) (@mulg (FinGroup.base gT) z (@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)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@inertia (@gval gT H) phi))))) *) move: {z}(z * _)%g => z Gz; rewrite 2!inE Gz cfConjgMnorm ?(subsetP nHG) //=. (* Goal: @eq bool (@eq_op (@cfun_eqType gT (@gval gT H)) (@cfConjg gT (@gval gT H) y phi) (@cfConjg gT (@gval gT H) y (@cfConjg gT (@gval gT H) z phi))) (@eq_op (@cfun_eqType gT (@gval gT H)) (@cfConjg gT (@gval gT H) z phi) phi) *) by rewrite eq_sym (can_eq (cfConjgK y)). Qed. Lemma cent_sub_inertia phi : 'C(H) \subset 'I[phi]. 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)) (@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)) (@inertia (@gval gT H) phi)))) *) apply/subsetP=> y cHy; have nHy := subsetP (cent_sub H) y cHy. (* 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)) (@inertia (@gval gT H) phi)))) *) rewrite inE nHy; apply/eqP/cfun_inP=> x Hx; rewrite cfConjgE //. (* Goal: @eq Algebraics.Implementation.type (@fun_of_cfun gT (@gval gT H) phi (@conjg gT x (@invg (FinGroup.base gT) y))) (@fun_of_cfun gT (@gval gT H) phi x) *) by rewrite /conjg invgK mulgA (centP cHy) ?mulgK. Qed. Lemma cent_sub_Inertia phi : 'C_G(H) \subset 'I_G[phi]. 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) (@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 G) (@inertia (@gval gT H) phi))))) *) exact: setIS (cent_sub_inertia phi). Qed. Lemma center_sub_Inertia phi : H \subset G -> 'Z(G) \subset 'I_G[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 (@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)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@inertia (@gval gT H) phi))))) *) by move/centS=> sHG; rewrite setIS // (subset_trans sHG) // cent_sub_inertia. Qed. Lemma conjg_inertia phi y : y \in 'N(H) -> 'I[phi] :^ y = 'I[phi ^ y]. 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)) (@normaliser gT (@gval gT H))))), @eq (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base gT))))) (@conjugate gT (@inertia (@gval gT H) phi) y) (@inertia (@gval gT H) (@cfConjg gT (@gval gT H) y phi)) *) move=> nHy; apply/setP=> z; rewrite !['I[_]]setIdE conjIg conjGid // !in_setI. (* Goal: @eq bool (andb (@in_mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) z (@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)) (@gval gT (@normaliser_group gT (@gval gT H)))))) (@in_mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) z (@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 (@SetDef.finset (FinGroup.arg_finType (FinGroup.base gT)) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @eq_op (@cfun_eqType gT (@gval gT H)) (@cfConjg gT (@gval gT H) x phi) phi)) y))))) (andb (@in_mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) z (@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))) z (@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)) (@SetDef.finset (FinGroup.arg_finType (FinGroup.base gT)) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @eq_op (@cfun_eqType gT (@gval gT H)) (@cfConjg gT (@gval gT H) x (@cfConjg gT (@gval gT H) y phi)) (@cfConjg gT (@gval gT H) y phi))))))) *) apply/andb_id2l=> nHz; rewrite mem_conjg !inE. (* Goal: @eq bool (@eq_op (@cfun_eqType gT (@gval gT H)) (@cfConjg gT (@gval gT H) (@conjg gT z (@invg (FinGroup.base gT) y)) phi) phi) (@eq_op (@cfun_eqType gT (@gval gT H)) (@cfConjg gT (@gval gT H) z (@cfConjg gT (@gval gT H) y phi)) (@cfConjg gT (@gval gT H) y phi)) *) by rewrite !cfConjgMnorm ?in_group ?(can2_eq (cfConjgKV y) (cfConjgK y)) ?invgK. Qed. Lemma inertia0 : 'I[0 : 'CF(H)] = 'N(H). Proof. (* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@inertia (@gval gT H) (GRing.zero (@cfun_zmodType gT (@gval gT H)) : @classfun gT (@gval gT H))) (@normaliser gT (@gval gT H)) *) by apply/setP=> x; rewrite !inE linear0 eqxx andbT. Qed. Lemma inertia_add phi psi : 'I[phi] :&: 'I[psi] \subset 'I[phi + psi]. 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)) (@inertia (@gval gT H) phi) (@inertia (@gval gT H) psi)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@inertia (@gval gT H) (@GRing.add (@cfun_zmodType gT (@gval gT H)) phi psi))))) *) rewrite !['I[_]]setIdE -setIIr setIS //. (* 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)) (@SetDef.finset (FinGroup.arg_finType (FinGroup.base gT)) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @eq_op (@cfun_eqType gT (@gval gT H)) (@cfConjg gT (@gval gT H) x phi) phi)) (@SetDef.finset (FinGroup.arg_finType (FinGroup.base gT)) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @eq_op (@cfun_eqType gT (@gval gT H)) (@cfConjg gT (@gval gT H) x psi) psi))))) (@mem (Finite.sort (FinGroup.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 (@cfun_eqType gT (@gval gT H)) (@cfConjg gT (@gval gT H) x (@GRing.add (@cfun_zmodType gT (@gval gT H)) phi psi)) (@GRing.add (@cfun_zmodType gT (@gval gT H)) phi psi)))))) *) by apply/subsetP=> x; rewrite !inE linearD /= => /andP[/eqP-> /eqP->]. Qed. Lemma inertia_sum I r (P : pred I) (Phi : I -> 'CF(H)) : 'N(H) :&: \bigcap_(i <- r | P i) 'I[Phi i] \subset 'I[\sum_(i <- r | P i) Phi i]. 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)) (@normaliser gT (@gval gT H)) (@BigOp.bigop (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) I (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) r (fun i : I => @BigBody (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) I i (@setI (FinGroup.arg_finType (FinGroup.base gT))) (P i) (@inertia (@gval gT H) (Phi 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)) (@inertia (@gval gT H) (@BigOp.bigop (GRing.Zmodule.sort (@cfun_zmodType gT (@gval gT H))) I (GRing.zero (@cfun_zmodType gT (@gval gT H))) r (fun i : I => @BigBody (GRing.Zmodule.sort (@cfun_zmodType gT (@gval gT H))) I i (@GRing.add (@cfun_zmodType gT (@gval gT H))) (P i) (Phi i))))))) *) elim/big_rec2: _ => [|i K psi Pi sK_Ipsi]; first by rewrite setIT inertia0. (* 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)) (@normaliser gT (@gval gT H)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@inertia (@gval gT H) (Phi i)) psi)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@inertia (@gval gT H) (@GRing.add (@cfun_zmodType gT (@gval gT H)) (Phi i) K))))) *) by rewrite setICA; apply: subset_trans (setIS _ sK_Ipsi) (inertia_add _ _). Qed. Lemma inertia_scale a phi : 'I[phi] \subset 'I[a *: phi]. 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)) (@inertia (@gval gT H) 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)) (@inertia (@gval gT H) (@GRing.scale Algebraics.Implementation.ringType (@cfun_lmodType gT (@gval gT H)) a phi))))) *) apply/subsetP=> x /setIdP[nHx /eqP Iphi_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)) (@inertia (@gval gT H) (@GRing.scale Algebraics.Implementation.ringType (@cfun_lmodType gT (@gval gT H)) a phi))))) *) by rewrite inE nHx linearZ /= Iphi_x. Qed. Lemma inertia_scale_nz a phi : a != 0 -> 'I[a *: phi] = 'I[phi]. Lemma inertia_opp phi : 'I[- phi] = 'I[phi]. Proof. (* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@inertia (@gval gT H) (@GRing.opp (@cfun_zmodType gT (@gval gT H)) phi)) (@inertia (@gval gT H) phi) *) by rewrite -scaleN1r inertia_scale_nz // oppr_eq0 oner_eq0. Qed. Lemma inertia1 : 'I[1 : 'CF(H)] = 'N(H). Proof. (* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@inertia (@gval gT H) (GRing.one (@cfun_ringType gT (@gval gT H)) : @classfun gT (@gval gT H))) (@normaliser gT (@gval gT H)) *) by apply/setP=> x; rewrite inE rmorph1 eqxx andbT. Qed. Lemma Inertia1 : H <| G -> 'I_G[1 : 'CF(H)] = 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))))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@inertia (@gval gT H) (GRing.one (@cfun_ringType gT (@gval gT H)) : @classfun gT (@gval gT H)))) (@gval gT G) *) by rewrite inertia1 => /normal_norm/setIidPl. Qed. Lemma inertia_mul phi psi : 'I[phi] :&: 'I[psi] \subset 'I[phi * psi]. 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)) (@inertia (@gval gT H) phi) (@inertia (@gval gT H) psi)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@inertia (@gval gT H) (@GRing.mul (@cfun_ringType gT (@gval gT H)) phi psi))))) *) rewrite !['I[_]]setIdE -setIIr setIS //. (* 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)) (@SetDef.finset (FinGroup.arg_finType (FinGroup.base gT)) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @eq_op (@cfun_eqType gT (@gval gT H)) (@cfConjg gT (@gval gT H) x phi) phi)) (@SetDef.finset (FinGroup.arg_finType (FinGroup.base gT)) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @eq_op (@cfun_eqType gT (@gval gT H)) (@cfConjg gT (@gval gT H) x psi) psi))))) (@mem (Finite.sort (FinGroup.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 (@cfun_eqType gT (@gval gT H)) (@cfConjg gT (@gval gT H) x (@GRing.mul (@cfun_ringType gT (@gval gT H)) phi psi)) (@GRing.mul (@cfun_ringType gT (@gval gT H)) phi psi)))))) *) by apply/subsetP=> x; rewrite !inE rmorphM /= => /andP[/eqP-> /eqP->]. Qed. Lemma inertia_prod I r (P : pred I) (Phi : I -> 'CF(H)) : 'N(H) :&: \bigcap_(i <- r | P i) 'I[Phi i] \subset 'I[\prod_(i <- r | P i) Phi i]. 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)) (@normaliser gT (@gval gT H)) (@BigOp.bigop (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) I (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) r (fun i : I => @BigBody (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) I i (@setI (FinGroup.arg_finType (FinGroup.base gT))) (P i) (@inertia (@gval gT H) (Phi 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)) (@inertia (@gval gT H) (@BigOp.bigop (GRing.Ring.sort (@cfun_ringType gT (@gval gT H))) I (GRing.one (@cfun_ringType gT (@gval gT H))) r (fun i : I => @BigBody (GRing.Ring.sort (@cfun_ringType gT (@gval gT H))) I i (@GRing.mul (@cfun_ringType gT (@gval gT H))) (P i) (Phi i))))))) *) elim/big_rec2: _ => [|i K psi Pi sK_psi]; first by rewrite inertia1 setIT. (* 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)) (@normaliser gT (@gval gT H)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@inertia (@gval gT H) (Phi i)) psi)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@inertia (@gval gT H) (@GRing.mul (@cfun_ringType gT (@gval gT H)) (Phi i) K))))) *) by rewrite setICA; apply: subset_trans (setIS _ sK_psi) (inertia_mul _ _). Qed. Lemma inertia_injective (chi : 'CF(H)) : {in H &, injective chi} -> 'I[chi] = 'C(H). Lemma inertia_irr_prime p i : #|H| = p -> prime p -> i != 0 -> 'I['chi[H]_i] = 'C(H). Proof. (* Goal: forall (_ : @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 H)))) p) (_ : is_true (prime p)) (_ : is_true (negb (@eq_op (GRing.Zmodule.eqType (Zp_zmodType (@pred_Nirr gT (@gval gT H)))) i (GRing.zero (Zp_zmodType (@pred_Nirr gT (@gval gT H))))))), @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@inertia (@gval gT H) (@tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) i)) (@centraliser gT (@gval gT H)) *) by move=> <- pr_H /(irr_prime_injP pr_H); apply: inertia_injective. Qed. Lemma inertia_irr0 : 'I['chi[H]_0] = 'N(H). Proof. (* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@inertia (@gval gT H) (@tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) (GRing.zero (Zp_zmodType (@pred_Nirr gT (@gval gT H)))))) (@normaliser gT (@gval gT H)) *) by rewrite irr0 inertia1. Qed. Lemma cfConjg_iso y : isometry (cfConjg y : 'CF(H) -> 'CF(H)). Lemma cfdot_Res_conjg psi phi y : y \in G -> '['Res[H, G] psi, phi ^ y] = '['Res[H] psi, phi]. 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.Ring.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (@cfdot gT (@gval gT H) (@cfRes gT (@gval gT H) (@gval gT G) psi) (@cfConjg gT (@gval gT H) y phi)) (@cfdot gT (@gval gT H) (@cfRes gT (@gval gT H) (@gval gT G) psi) phi) *) move=> Gy; rewrite -(cfConjg_iso y _ phi); congr '[_, _]; apply/cfunP=> x. (* Goal: @eq Algebraics.Implementation.type (@fun_of_cfun gT (@gval gT H) (@cfRes gT (@gval gT H) (@gval gT G) psi) x) (@fun_of_cfun gT (@gval gT H) (@cfConjg gT (@gval gT H) y (@cfRes gT (@gval gT H) (@gval gT G) psi)) x) *) rewrite !cfunElock !genGid; case nHy: (y \in 'N(H)) => //. (* Goal: @eq Algebraics.Implementation.type (@GRing.natmul Algebraics.Implementation.zmodType (@fun_of_cfun gT (@gval gT G) psi (if @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))) then x else oneg (FinGroup.base gT))) (nat_of_bool (@in_mem (Finite.sort (FinGroup.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 Algebraics.Implementation.zmodType (@fun_of_cfun gT (@gval gT G) psi (if @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))) then @conjg gT x (@invg (FinGroup.base gT) y) else oneg (FinGroup.base gT))) (nat_of_bool (@in_mem (Finite.sort (FinGroup.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)))))) *) by rewrite !(fun_if psi) cfunJ ?memJ_norm ?groupV. Qed. Lemma cfConjg_char (chi : 'CF(H)) y : chi \is a character -> (chi ^ y)%CF \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 H)) (@cfConjg gT (@gval gT H) y 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 [nHy Nchi | /cfConjgEout-> //] := boolP (y \in 'N(H)). (* Goal: is_true (@in_mem (@classfun gT (@gval gT H)) (@cfConjg gT (@gval gT H) y 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 cfConjgEin cfIsom_char. Qed. Lemma cfConjg_lin_char (chi : 'CF(H)) y : chi \is a linear_char -> (chi ^ y)%CF \is a linear_char. 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)) (@linear_char gT (@gval gT H))))), is_true (@in_mem (@classfun gT (@gval gT H)) (@cfConjg gT (@gval gT H) y 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 chi1; rewrite qualifE cfConjg1 cfConjg_char. Qed. Lemma cfConjg_irr y chi : chi \in irr H -> (chi ^ y)%CF \in irr H. Proof. (* Goal: forall _ : is_true (@in_mem (Equality.sort (@cfun_eqType 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)))), is_true (@in_mem (@classfun gT (@gval gT H)) (@cfConjg gT (@gval gT H) y 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 cfConjg_iso => /andP[/cfConjg_char->]. Qed. Definition conjg_Iirr i y := cfIirr ('chi[H]_i ^ y)%CF. Lemma conjg_IirrE i y : 'chi_(conjg_Iirr i y) = ('chi_i ^ y)%CF. Proof. (* Goal: @eq (@classfun gT (@gval gT H)) (@tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) (conjg_Iirr i y)) (@cfConjg gT (@gval gT H) y (@tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) i)) *) by rewrite cfIirrE ?cfConjg_irr ?mem_irr. Qed. Lemma conjg_IirrK y : cancel (conjg_Iirr^~ y) (conjg_Iirr^~ y^-1%g). Proof. (* Goal: @cancel (ordinal (S (@pred_Nirr gT (@gval gT H)))) (ordinal (S (@pred_Nirr gT (@gval gT H)))) (fun x : ordinal (S (@pred_Nirr gT (@gval gT H))) => conjg_Iirr x y) (fun x : ordinal (S (@pred_Nirr gT (@gval gT H))) => conjg_Iirr x (@invg (FinGroup.base gT) y)) *) by move=> i; apply/irr_inj; rewrite !conjg_IirrE cfConjgK. Qed. Lemma conjg_IirrKV y : cancel (conjg_Iirr^~ y^-1%g) (conjg_Iirr^~ y). Proof. (* Goal: @cancel (ordinal (S (@pred_Nirr gT (@gval gT H)))) (ordinal (S (@pred_Nirr gT (@gval gT H)))) (fun x : ordinal (S (@pred_Nirr gT (@gval gT H))) => conjg_Iirr x (@invg (FinGroup.base gT) y)) (fun x : ordinal (S (@pred_Nirr gT (@gval gT H))) => conjg_Iirr x y) *) by rewrite -{2}[y]invgK; apply: conjg_IirrK. Qed. Lemma conjg_Iirr_inj y : injective (conjg_Iirr^~ y). Proof. (* Goal: @injective (ordinal (S (@pred_Nirr gT (@gval gT H)))) (ordinal (S (@pred_Nirr gT (@gval gT H)))) (fun x : ordinal (S (@pred_Nirr gT (@gval gT H))) => conjg_Iirr x y) *) exact: can_inj (conjg_IirrK y). Qed. Lemma conjg_Iirr_eq0 i y : (conjg_Iirr i y == 0) = (i == 0). Proof. (* Goal: @eq bool (@eq_op (ordinal_eqType (S (@pred_Nirr gT (@gval gT H)))) (conjg_Iirr i y) (GRing.zero (Zp_zmodType (@pred_Nirr gT (@gval gT H))))) (@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 conjg_IirrE cfConjg_eq1. Qed. Lemma conjg_Iirr0 x : conjg_Iirr 0 x = 0. Proof. (* Goal: @eq (ordinal (S (@pred_Nirr gT (@gval gT H)))) (conjg_Iirr (GRing.zero (Zp_zmodType (@pred_Nirr gT (@gval gT H)))) x) (GRing.zero (Zp_zmodType (@pred_Nirr gT (@gval gT H)))) *) by apply/eqP; rewrite conjg_Iirr_eq0. Qed. Lemma cfdot_irr_conjg i y : H <| G -> y \in G -> '['chi_i, 'chi_i ^ y]_H = (y \in 'I_G['chi_i])%:R. Proof. (* Goal: forall (_ : is_true (@normal gT (@gval gT H) (@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))))), @eq (GRing.Ring.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (@cfdot gT (@gval gT H) (@tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) i) (@cfConjg gT (@gval gT H) y (@tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) i))) (@GRing.natmul (GRing.Ring.zmodType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (GRing.one (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (nat_of_bool (@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)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@inertia (@gval gT H) (@tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) i)))))))) *) move=> nsHG Gy; rewrite -conjg_IirrE cfdot_irr -(inj_eq irr_inj) conjg_IirrE. (* Goal: @eq (GRing.Ring.sort (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 (@cfun_eqType gT (@gval gT H)) (@tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) i) (@cfConjg gT (@gval gT H) y (@tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) i))))) (@GRing.natmul (GRing.Ring.zmodType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (GRing.one (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (nat_of_bool (@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)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@inertia (@gval gT H) (@tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) i)))))))) *) by rewrite -{1}['chi_i]cfConjgJ1 cfConjg_eqE ?mulg1. Qed. Definition cfclass (A : {set gT}) (phi : 'CF(A)) (B : {set gT}) := [seq (phi ^ repr Tx)%CF | Tx in rcosets 'I_B[phi] B]. Local Notation "phi ^: G" := (cfclass phi G) : cfun_scope. Lemma size_cfclass i : size ('chi[H]_i ^: G)%CF = #|G : 'I_G['chi_i]|. Proof. (* Goal: @eq nat (@size (@classfun gT (@gval gT H)) (@cfclass (@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))) (@indexg gT (@gval gT G) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@inertia (@gval gT H) (@tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) i)))) *) by rewrite size_map -cardE. Qed. Lemma cfclassP (A : {group gT}) phi psi : reflect (exists2 y, y \in A & psi = phi ^ y)%CF (psi \in phi ^: A)%CF. Proof. (* Goal: Bool.reflect (@ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (fun y : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => 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 A))))) (fun y : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @eq (@classfun gT (@gval gT H)) psi (@cfConjg gT (@gval gT H) y phi))) (@in_mem (@classfun gT (@gval gT H)) psi (@mem (Equality.sort (@cfun_eqType gT (@gval gT H))) (seq_predType (@cfun_eqType gT (@gval gT H))) (@cfclass (@gval gT H) phi (@gval gT A)))) *) apply: (iffP imageP) => [[_ /rcosetsP[y Ay ->] ->] | [y Ay ->]]. (* Goal: @ex2 (Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT)))) (fun 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.finType (FinGroup.base gT))) (@rcosets gT (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT A) (@inertia (@gval gT H) phi)) (@gval gT A)))))) (fun x : Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) => @eq (Equality.sort (@cfun_eqType gT (@gval gT H))) (@cfConjg gT (@gval gT H) y phi) (@cfConjg gT (@gval gT H) (@repr (FinGroup.base gT) x) phi)) *) (* Goal: @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (fun y : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => 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 A))))) (fun y0 : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @eq (@classfun gT (@gval gT H)) (@cfConjg gT (@gval gT H) (@repr (FinGroup.base gT) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT A) (@inertia (@gval gT H) phi)) (@set1 (FinGroup.arg_finType (FinGroup.base gT)) y))) phi) (@cfConjg gT (@gval gT H) y0 phi)) *) by case: repr_rcosetP => z /setIdP[Az _]; exists (z * y)%g; rewrite ?groupM. (* Goal: @ex2 (Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT)))) (fun 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.finType (FinGroup.base gT))) (@rcosets gT (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT A) (@inertia (@gval gT H) phi)) (@gval gT A)))))) (fun x : Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) => @eq (Equality.sort (@cfun_eqType gT (@gval gT H))) (@cfConjg gT (@gval gT H) y phi) (@cfConjg gT (@gval gT H) (@repr (FinGroup.base gT) x) phi)) *) without loss nHy: y Ay / y \in 'N(H). (* Goal: @ex2 (Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT)))) (fun 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.finType (FinGroup.base gT))) (@rcosets gT (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT A) (@inertia (@gval gT H) phi)) (@gval gT A)))))) (fun x : Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) => @eq (Equality.sort (@cfun_eqType gT (@gval gT H))) (@cfConjg gT (@gval gT H) y phi) (@cfConjg gT (@gval gT H) (@repr (FinGroup.base gT) x) phi)) *) (* Goal: forall _ : forall (y : Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (_ : 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 A))))) (_ : 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)) (@normaliser gT (@gval gT H)))))), @ex2 (Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT)))) (fun 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.finType (FinGroup.base gT))) (@rcosets gT (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT A) (@inertia (@gval gT H) phi)) (@gval gT A)))))) (fun x : Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) => @eq (Equality.sort (@cfun_eqType gT (@gval gT H))) (@cfConjg gT (@gval gT H) y phi) (@cfConjg gT (@gval gT H) (@repr (FinGroup.base gT) x) phi)), @ex2 (Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT)))) (fun x0 : 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)))) x0 (@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.finType (FinGroup.base gT))) (@rcosets gT (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT A) (@inertia (@gval gT H) phi)) (@gval gT A)))))) (fun x0 : Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) => @eq (Equality.sort (@cfun_eqType gT (@gval gT H))) (@cfConjg gT (@gval gT H) y phi) (@cfConjg gT (@gval gT H) (@repr (FinGroup.base gT) x0) phi)) *) have [nHy | /cfConjgEout->] := boolP (y \in 'N(H)); first exact. (* Goal: @ex2 (Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT)))) (fun 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.finType (FinGroup.base gT))) (@rcosets gT (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT A) (@inertia (@gval gT H) phi)) (@gval gT A)))))) (fun x : Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) => @eq (Equality.sort (@cfun_eqType gT (@gval gT H))) (@cfConjg gT (@gval gT H) y phi) (@cfConjg gT (@gval gT H) (@repr (FinGroup.base gT) x) phi)) *) (* Goal: forall _ : forall (y : Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (_ : 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 A))))) (_ : 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)) (@normaliser gT (@gval gT H)))))), @ex2 (Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT)))) (fun 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.finType (FinGroup.base gT))) (@rcosets gT (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT A) (@inertia (@gval gT H) phi)) (@gval gT A)))))) (fun x : Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) => @eq (Equality.sort (@cfun_eqType gT (@gval gT H))) (@cfConjg gT (@gval gT H) y phi) (@cfConjg gT (@gval gT H) (@repr (FinGroup.base gT) x) phi)), @ex2 (Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT)))) (fun x0 : 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)))) x0 (@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.finType (FinGroup.base gT))) (@rcosets gT (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT A) (@inertia (@gval gT H) phi)) (@gval gT A)))))) (fun x0 : Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) => @eq (Equality.sort (@cfun_eqType gT (@gval gT H))) phi (@cfConjg gT (@gval gT H) (@repr (FinGroup.base gT) x0) phi)) *) by move/(_ 1%g); rewrite !group1 !cfConjgJ1; apply. (* Goal: @ex2 (Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT)))) (fun 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.finType (FinGroup.base gT))) (@rcosets gT (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT A) (@inertia (@gval gT H) phi)) (@gval gT A)))))) (fun x : Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) => @eq (Equality.sort (@cfun_eqType gT (@gval gT H))) (@cfConjg gT (@gval gT H) y phi) (@cfConjg gT (@gval gT H) (@repr (FinGroup.base gT) x) phi)) *) exists ('I_A[phi] :* y); first by rewrite -rcosetE mem_imset. (* Goal: @eq (Equality.sort (@cfun_eqType gT (@gval gT H))) (@cfConjg gT (@gval gT H) y phi) (@cfConjg gT (@gval gT H) (@repr (FinGroup.base gT) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT A) (@inertia (@gval gT H) phi)) (@set1 (FinGroup.arg_finType (FinGroup.base gT)) y))) phi) *) case: repr_rcosetP => z /setIP[_ /setIdP[nHz /eqP Tz]]. (* Goal: @eq (Equality.sort (@cfun_eqType gT (@gval gT H))) (@cfConjg gT (@gval gT H) y phi) (@cfConjg gT (@gval gT H) (@mulg (FinGroup.base gT) z y) phi) *) by rewrite cfConjgMnorm ?Tz. Qed. Lemma cfclassInorm phi : (phi ^: 'N_G(H) =i phi ^: G)%CF. Proof. (* Goal: @eq_mem (Equality.sort (@cfun_eqType gT (@gval gT H))) (@mem (Equality.sort (@cfun_eqType gT (@gval gT H))) (seq_predType (@cfun_eqType gT (@gval gT H))) (@cfclass (@gval gT H) phi (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@normaliser gT (@gval gT H))))) (@mem (Equality.sort (@cfun_eqType gT (@gval gT H))) (seq_predType (@cfun_eqType gT (@gval gT H))) (@cfclass (@gval gT H) phi (@gval gT G))) *) move=> xi; apply/cfclassP/cfclassP=> [[x /setIP[Gx _] ->] | [x Gx ->]]. (* Goal: @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (fun y : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => 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 (@setI_group gT G (@normaliser_group gT (@gval gT H)))))))) (fun y : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @eq (@classfun gT (@gval gT H)) (@cfConjg gT (@gval gT H) x phi) (@cfConjg gT (@gval gT H) y phi)) *) (* Goal: @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (fun y : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => 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))))) (fun y : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @eq (@classfun gT (@gval gT H)) (@cfConjg gT (@gval gT H) x phi) (@cfConjg gT (@gval gT H) y phi)) *) by exists x. (* Goal: @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (fun y : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => 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 (@setI_group gT G (@normaliser_group gT (@gval gT H)))))))) (fun y : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @eq (@classfun gT (@gval gT H)) (@cfConjg gT (@gval gT H) x phi) (@cfConjg gT (@gval gT H) y phi)) *) have [Nx | /cfConjgEout-> //] := boolP (x \in 'N(H)). (* Goal: @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (fun y : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => 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 (@setI_group gT G (@normaliser_group gT (@gval gT H)))))))) (fun y : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @eq (@classfun gT (@gval gT H)) phi (@cfConjg gT (@gval gT H) y phi)) *) (* Goal: @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (fun y : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => 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 (@setI_group gT G (@normaliser_group gT (@gval gT H)))))))) (fun y : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @eq (@classfun gT (@gval gT H)) (@cfConjg gT (@gval gT H) x phi) (@cfConjg gT (@gval gT H) y phi)) *) by exists x; first apply/setIP. (* Goal: @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (fun y : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => 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 (@setI_group gT G (@normaliser_group gT (@gval gT H)))))))) (fun y : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @eq (@classfun gT (@gval gT H)) phi (@cfConjg gT (@gval gT H) y phi)) *) by exists 1%g; rewrite ?group1 ?cfConjgJ1. Qed. Lemma cfclass_refl phi : phi \in (phi ^: G)%CF. Proof. (* Goal: is_true (@in_mem (@classfun gT (@gval gT H)) phi (@mem (Equality.sort (@cfun_eqType gT (@gval gT H))) (seq_predType (@cfun_eqType gT (@gval gT H))) (@cfclass (@gval gT H) phi (@gval gT G)))) *) by apply/cfclassP; exists 1%g => //; rewrite cfConjgJ1. Qed. Lemma cfclass_transr phi psi : (psi \in phi ^: G)%CF -> (phi ^: G =i psi ^: G)%CF. Proof. (* Goal: forall _ : is_true (@in_mem (Equality.sort (@cfun_eqType gT (@gval gT H))) psi (@mem (Equality.sort (@cfun_eqType gT (@gval gT H))) (seq_predType (@cfun_eqType gT (@gval gT H))) (@cfclass (@gval gT H) phi (@gval gT G)))), @eq_mem (Equality.sort (@cfun_eqType gT (@gval gT H))) (@mem (Equality.sort (@cfun_eqType gT (@gval gT H))) (seq_predType (@cfun_eqType gT (@gval gT H))) (@cfclass (@gval gT H) phi (@gval gT G))) (@mem (Equality.sort (@cfun_eqType gT (@gval gT H))) (seq_predType (@cfun_eqType gT (@gval gT H))) (@cfclass (@gval gT H) psi (@gval gT G))) *) rewrite -cfclassInorm; case/cfclassP=> x Gx -> xi; rewrite -!cfclassInorm. (* Goal: @eq bool (@in_mem (Equality.sort (@cfun_eqType gT (@gval gT H))) xi (@mem (Equality.sort (@cfun_eqType gT (@gval gT H))) (seq_predType (@cfun_eqType gT (@gval gT H))) (@cfclass (@gval gT H) phi (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@normaliser gT (@gval gT H)))))) (@in_mem (Equality.sort (@cfun_eqType gT (@gval gT H))) xi (@mem (Equality.sort (@cfun_eqType gT (@gval gT H))) (seq_predType (@cfun_eqType gT (@gval gT H))) (@cfclass (@gval gT H) (@cfConjg gT (@gval gT H) x phi) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@normaliser gT (@gval gT H)))))) *) have nHN: {subset 'N_G(H) <= 'N(H)} by apply/subsetP; apply: subsetIr. (* Goal: @eq bool (@in_mem (Equality.sort (@cfun_eqType gT (@gval gT H))) xi (@mem (Equality.sort (@cfun_eqType gT (@gval gT H))) (seq_predType (@cfun_eqType gT (@gval gT H))) (@cfclass (@gval gT H) phi (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@normaliser gT (@gval gT H)))))) (@in_mem (Equality.sort (@cfun_eqType gT (@gval gT H))) xi (@mem (Equality.sort (@cfun_eqType gT (@gval gT H))) (seq_predType (@cfun_eqType gT (@gval gT H))) (@cfclass (@gval gT H) (@cfConjg gT (@gval gT H) x phi) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@normaliser gT (@gval gT H)))))) *) apply/cfclassP/cfclassP=> [[y Gy ->] | [y Gy ->]]. (* Goal: @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (fun y : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => 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 (@setI_group gT G (@normaliser_group gT (@gval gT H)))))))) (fun y0 : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @eq (@classfun gT (@gval gT H)) (@cfConjg gT (@gval gT H) y (@cfConjg gT (@gval gT H) x phi)) (@cfConjg gT (@gval gT H) y0 phi)) *) (* Goal: @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (fun y : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => 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 (@setI_group gT G (@normaliser_group gT (@gval gT H)))))))) (fun y0 : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @eq (@classfun gT (@gval gT H)) (@cfConjg gT (@gval gT H) y phi) (@cfConjg gT (@gval gT H) y0 (@cfConjg gT (@gval gT H) x phi))) *) by exists (x^-1 * y)%g; rewrite -?cfConjgMnorm ?groupM ?groupV ?nHN // mulKVg. (* Goal: @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (fun y : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => 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 (@setI_group gT G (@normaliser_group gT (@gval gT H)))))))) (fun y0 : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @eq (@classfun gT (@gval gT H)) (@cfConjg gT (@gval gT H) y (@cfConjg gT (@gval gT H) x phi)) (@cfConjg gT (@gval gT H) y0 phi)) *) by exists (x * y)%g; rewrite -?cfConjgMnorm ?groupM ?nHN. Qed. Lemma cfclass_sym phi psi : (psi \in phi ^: G)%CF = (phi \in psi ^: G)%CF. Proof. (* Goal: @eq bool (@in_mem (Equality.sort (@cfun_eqType gT (@gval gT H))) psi (@mem (Equality.sort (@cfun_eqType gT (@gval gT H))) (seq_predType (@cfun_eqType gT (@gval gT H))) (@cfclass (@gval gT H) phi (@gval gT G)))) (@in_mem (@classfun gT (@gval gT H)) phi (@mem (Equality.sort (@cfun_eqType gT (@gval gT H))) (seq_predType (@cfun_eqType gT (@gval gT H))) (@cfclass (@gval gT H) psi (@gval gT G)))) *) by apply/idP/idP=> /cfclass_transr <-; apply: cfclass_refl. Qed. Lemma cfclass_uniq phi : H <| G -> uniq (phi ^: G)%CF. Proof. (* Goal: forall _ : is_true (@normal gT (@gval gT H) (@gval gT G)), is_true (@uniq (@cfun_eqType gT (@gval gT H)) (@cfclass (@gval gT H) phi (@gval gT G))) *) move=> nsHG; rewrite map_inj_in_uniq ?enum_uniq // => Ty Tz; rewrite !mem_enum. (* Goal: forall (_ : is_true (@in_mem (Equality.sort (Finite.eqType (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))))) Ty (@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.finType (FinGroup.base gT))) (@rcosets gT (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@inertia (@gval gT H) phi)) (@gval gT G)))))) (_ : is_true (@in_mem (Equality.sort (Finite.eqType (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))))) Tz (@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.finType (FinGroup.base gT))) (@rcosets gT (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@inertia (@gval gT H) phi)) (@gval gT G)))))) (_ : @eq (Equality.sort (@cfun_eqType gT (@gval gT H))) (@cfConjg gT (@gval gT H) (@repr (FinGroup.base gT) Ty) phi) (@cfConjg gT (@gval gT H) (@repr (FinGroup.base gT) Tz) phi)), @eq (Equality.sort (Finite.eqType (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))))) Ty Tz *) move=> {Ty}/rcosetsP[y Gy ->] {Tz}/rcosetsP[z Gz ->] /eqP. (* Goal: forall _ : is_true (@eq_op (@cfun_eqType gT (@gval gT H)) (@cfConjg gT (@gval gT H) (@repr (FinGroup.base gT) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@inertia (@gval gT H) phi)) (@set1 (FinGroup.arg_finType (FinGroup.base gT)) y))) phi) (@cfConjg gT (@gval gT H) (@repr (FinGroup.base gT) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@inertia (@gval gT H) phi)) (@set1 (FinGroup.arg_finType (FinGroup.base gT)) z))) phi)), @eq (Equality.sort (Finite.eqType (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))))) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@inertia (@gval gT H) phi)) (@set1 (FinGroup.arg_finType (FinGroup.base gT)) y)) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@inertia (@gval gT H) phi)) (@set1 (FinGroup.arg_finType (FinGroup.base gT)) z)) *) case: repr_rcosetP => u Iphi_u; case: repr_rcosetP => v Iphi_v. (* Goal: forall _ : is_true (@eq_op (@cfun_eqType gT (@gval gT H)) (@cfConjg gT (@gval gT H) (@mulg (FinGroup.base gT) u y) phi) (@cfConjg gT (@gval gT H) (@mulg (FinGroup.base gT) v z) phi)), @eq (Equality.sort (Finite.eqType (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))))) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@inertia (@gval gT H) phi)) (@set1 (FinGroup.arg_finType (FinGroup.base gT)) y)) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@inertia (@gval gT H) phi)) (@set1 (FinGroup.arg_finType (FinGroup.base gT)) z)) *) have [[Gu _] [Gv _]] := (setIdP Iphi_u, setIdP Iphi_v). (* Goal: forall _ : is_true (@eq_op (@cfun_eqType gT (@gval gT H)) (@cfConjg gT (@gval gT H) (@mulg (FinGroup.base gT) u y) phi) (@cfConjg gT (@gval gT H) (@mulg (FinGroup.base gT) v z) phi)), @eq (Equality.sort (Finite.eqType (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))))) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@inertia (@gval gT H) phi)) (@set1 (FinGroup.arg_finType (FinGroup.base gT)) y)) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@inertia (@gval gT H) phi)) (@set1 (FinGroup.arg_finType (FinGroup.base gT)) z)) *) rewrite cfConjg_eqE ?groupM // => /rcoset_eqP. (* Goal: forall _ : @eq (FinGroup.sort (group_set_of_baseGroupType (FinGroup.base gT))) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@gval gT (@setI_group gT G (@inertia_group H phi))) (@set1 (FinGroup.arg_finType (FinGroup.base gT)) (@mulg (FinGroup.base gT) v z))) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@gval gT (@setI_group gT G (@inertia_group H phi))) (@set1 (FinGroup.arg_finType (FinGroup.base gT)) (@mulg (FinGroup.base gT) u y))), @eq (Equality.sort (Finite.eqType (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))))) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@inertia (@gval gT H) phi)) (@set1 (FinGroup.arg_finType (FinGroup.base gT)) y)) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@inertia (@gval gT H) phi)) (@set1 (FinGroup.arg_finType (FinGroup.base gT)) z)) *) by rewrite !rcosetM (rcoset_id Iphi_v) (rcoset_id Iphi_u). Qed. Lemma cfclass_invariant phi : G \subset 'I[phi] -> (phi ^: G)%CF = 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 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)) (@inertia (@gval gT H) phi)))), @eq (list (@classfun gT (@gval gT H))) (@cfclass (@gval gT H) phi (@gval gT G)) (@seq_of_cfun gT (@gval gT H) phi) *) move/setIidPl=> IGphi; rewrite /cfclass IGphi // rcosets_id. (* Goal: @eq (list (@classfun gT (@gval gT H))) (@image_mem (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) (@classfun gT (@gval gT H)) (fun Tx : Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) => @cfConjg gT (@gval gT H) (@repr (FinGroup.base gT) Tx) phi) (@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))) (@set1 (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) (@gval gT G))))) (@seq_of_cfun gT (@gval gT H) phi) *) by rewrite /(image _ _) enum_set1 /= repr_group cfConjgJ1. Qed. Lemma cfclass1 : H <| G -> (1 ^: G)%CF = [:: 1 : 'CF(H)]. Proof. (* Goal: forall _ : is_true (@normal gT (@gval gT H) (@gval gT G)), @eq (list (@classfun gT (@gval gT H))) (@cfclass (@gval gT H) (GRing.one (@cfun_ringType gT (@gval gT H))) (@gval gT G)) (@cons (@classfun gT (@gval gT H)) (GRing.one (@cfun_ringType gT (@gval gT H)) : @classfun gT (@gval gT H)) (@nil (@classfun gT (@gval gT H)))) *) by move/normal_norm=> nHG; rewrite cfclass_invariant ?inertia1. Qed. Definition cfclass_Iirr (A : {set gT}) i := conjg_Iirr i @: A. Lemma cfclass_IirrE i j : (j \in cfclass_Iirr G i) = ('chi_j \in 'chi_i ^: G)%CF. Proof. (* Goal: @eq bool (@in_mem (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT H))))) j (@mem (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT H))))) (predPredType (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT H)))))) (@SetDef.pred_of_set (ordinal_finType (S (@pred_Nirr gT (@gval gT H)))) (cfclass_Iirr (@gval gT G) i)))) (@in_mem (@classfun gT (@gval gT H)) (@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 H))) (seq_predType (@cfun_eqType gT (@gval gT H))) (@cfclass (@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)))) *) apply/imsetP/cfclassP=> [[y Gy ->] | [y]]; exists y; rewrite ?conjg_IirrE //. (* Goal: @eq (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT H))))) j (conjg_Iirr i y) *) by apply: irr_inj; rewrite conjg_IirrE. Qed. Lemma eq_cfclass_IirrE i j : (cfclass_Iirr G j == cfclass_Iirr G i) = (j \in cfclass_Iirr G i). Proof. (* Goal: @eq bool (@eq_op (set_of_eqType (ordinal_finType (S (@pred_Nirr gT (@gval gT H))))) (cfclass_Iirr (@gval gT G) j) (cfclass_Iirr (@gval gT G) i)) (@in_mem (ordinal (S (@pred_Nirr gT (@gval gT H)))) j (@mem (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT H))))) (predPredType (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT H)))))) (@SetDef.pred_of_set (ordinal_finType (S (@pred_Nirr gT (@gval gT H)))) (cfclass_Iirr (@gval gT G) i)))) *) apply/eqP/idP=> [<- | iGj]; first by rewrite cfclass_IirrE cfclass_refl. (* Goal: @eq (Equality.sort (set_of_eqType (ordinal_finType (S (@pred_Nirr gT (@gval gT H)))))) (cfclass_Iirr (@gval gT G) j) (cfclass_Iirr (@gval gT G) i) *) by apply/setP=> k; rewrite !cfclass_IirrE in iGj *; apply/esym/cfclass_transr. Qed. Lemma im_cfclass_Iirr i : H <| G -> perm_eq [seq 'chi_j | j in cfclass_Iirr G i] ('chi_i ^: G)%CF. Proof. (* Goal: forall _ : is_true (@normal gT (@gval gT H) (@gval gT G)), is_true (@perm_eq (@cfun_eqType gT (@gval gT H)) (@image_mem (ordinal_finType (S (@pred_Nirr gT (@gval gT H)))) (@classfun gT (@gval gT H)) (fun j : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT H)))) => @tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) j) (@mem (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT H))))) (predPredType (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT H)))))) (@SetDef.pred_of_set (ordinal_finType (S (@pred_Nirr gT (@gval gT H)))) (cfclass_Iirr (@gval gT G) i)))) (@cfclass (@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))) *) move=> nsHG; have UchiG := cfclass_uniq 'chi_i nsHG. (* Goal: is_true (@perm_eq (@cfun_eqType gT (@gval gT H)) (@image_mem (ordinal_finType (S (@pred_Nirr gT (@gval gT H)))) (@classfun gT (@gval gT H)) (fun j : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT H)))) => @tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) j) (@mem (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT H))))) (predPredType (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT H)))))) (@SetDef.pred_of_set (ordinal_finType (S (@pred_Nirr gT (@gval gT H)))) (cfclass_Iirr (@gval gT G) i)))) (@cfclass (@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))) *) apply: uniq_perm_eq; rewrite ?(map_inj_uniq irr_inj) ?enum_uniq // => phi. (* Goal: @eq bool (@in_mem (Equality.sort (@cfun_eqType gT (@gval gT H))) phi (@mem (Equality.sort (@cfun_eqType gT (@gval gT H))) (seq_predType (@cfun_eqType gT (@gval gT H))) (@image_mem (ordinal_finType (S (@pred_Nirr gT (@gval gT H)))) (@classfun gT (@gval gT H)) (fun j : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT H)))) => @tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) j) (@mem (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT H))))) (predPredType (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT H)))))) (@SetDef.pred_of_set (ordinal_finType (S (@pred_Nirr gT (@gval gT H)))) (cfclass_Iirr (@gval gT G) i)))))) (@in_mem (Equality.sort (@cfun_eqType gT (@gval gT H))) phi (@mem (Equality.sort (@cfun_eqType gT (@gval gT H))) (seq_predType (@cfun_eqType gT (@gval gT H))) (@cfclass (@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)))) *) apply/imageP/idP=> [[j iGj ->] | /cfclassP[y]]; first by rewrite -cfclass_IirrE. (* 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 (@classfun gT (@gval gT H)) phi (@cfConjg gT (@gval gT H) y (@tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) i))), @ex2 (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT H))))) (fun x : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT H)))) => is_true (@in_mem (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT H))))) x (@mem (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT H))))) (predPredType (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT H)))))) (@SetDef.pred_of_set (ordinal_finType (S (@pred_Nirr gT (@gval gT H)))) (cfclass_Iirr (@gval gT G) i))))) (fun x : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT H)))) => @eq (Equality.sort (@cfun_eqType gT (@gval gT H))) phi (@tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) x)) *) by exists (conjg_Iirr i y); rewrite ?mem_imset ?conjg_IirrE. Qed. Lemma card_cfclass_Iirr i : H <| G -> #|cfclass_Iirr G i| = #|G : 'I_G['chi_i]|. Proof. (* Goal: forall _ : is_true (@normal gT (@gval gT H) (@gval gT G)), @eq nat (@card (ordinal_finType (S (@pred_Nirr gT (@gval gT H)))) (@mem (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT H))))) (predPredType (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT H)))))) (@SetDef.pred_of_set (ordinal_finType (S (@pred_Nirr gT (@gval gT H)))) (cfclass_Iirr (@gval gT G) i)))) (@indexg gT (@gval gT G) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@inertia (@gval gT H) (@tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) i)))) *) move=> nsHG; rewrite -size_cfclass -(perm_eq_size (im_cfclass_Iirr i nsHG)). (* Goal: @eq nat (@card (ordinal_finType (S (@pred_Nirr gT (@gval gT H)))) (@mem (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT H))))) (predPredType (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT H)))))) (@SetDef.pred_of_set (ordinal_finType (S (@pred_Nirr gT (@gval gT H)))) (cfclass_Iirr (@gval gT G) i)))) (@size (Equality.sort (@cfun_eqType gT (@gval gT H))) (@image_mem (ordinal_finType (S (@pred_Nirr gT (@gval gT H)))) (@classfun gT (@gval gT H)) (fun j : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT H)))) => @tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) j) (@mem (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT H))))) (predPredType (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT H)))))) (@SetDef.pred_of_set (ordinal_finType (S (@pred_Nirr gT (@gval gT H)))) (cfclass_Iirr (@gval gT G) i))))) *) by rewrite size_map -cardE. Qed. Lemma reindex_cfclass R idx (op : Monoid.com_law idx) (F : 'CF(H) -> R) i : Proof. (* Goal: forall _ : is_true (@normal gT (@gval gT H) (@gval gT G)), @eq R (@BigOp.bigop R (@classfun gT (@gval gT H)) idx (@cfclass (@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)) (fun chi : @classfun gT (@gval gT H) => @BigBody R (@classfun gT (@gval gT H)) chi (@Monoid.operator R idx (@Monoid.com_operator R idx op)) true (F chi))) (@BigOp.bigop R (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT H))))) idx (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 R (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT H))))) j (@Monoid.operator R idx (@Monoid.com_operator R idx op)) (@in_mem (@classfun gT (@gval gT H)) (@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 H))) (seq_predType (@cfun_eqType gT (@gval gT H))) (@cfclass (@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)))) (F (@tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) j)))) *) move/im_cfclass_Iirr/(eq_big_perm _) <-; rewrite big_map big_filter /=. (* Goal: @eq R (@BigOp.bigop R (ordinal (S (@pred_Nirr gT (@gval gT H)))) idx (Finite.EnumDef.enum (ordinal_finType (S (@pred_Nirr gT (@gval gT H))))) (fun i0 : ordinal (S (@pred_Nirr gT (@gval gT H))) => @BigBody R (ordinal (S (@pred_Nirr gT (@gval gT H)))) i0 (@Monoid.operator R idx (@Monoid.com_operator R idx op)) (@in_mem (ordinal (S (@pred_Nirr gT (@gval gT H)))) i0 (@mem (ordinal (S (@pred_Nirr gT (@gval gT H)))) (predPredType (ordinal (S (@pred_Nirr gT (@gval gT H))))) (@SetDef.pred_of_set (ordinal_finType (S (@pred_Nirr gT (@gval gT H)))) (cfclass_Iirr (@gval gT G) i)))) (F (@tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) i0)))) (@BigOp.bigop R (ordinal (S (@pred_Nirr gT (@gval gT H)))) idx (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT H))))) (fun j : ordinal (S (@pred_Nirr gT (@gval gT H))) => @BigBody R (ordinal (S (@pred_Nirr gT (@gval gT H)))) j (@Monoid.operator R idx (@Monoid.com_operator R idx op)) (@in_mem (@classfun gT (@gval gT H)) (@tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) j) (@mem (@classfun gT (@gval gT H)) (seq_predType (@cfun_eqType gT (@gval gT H))) (@cfclass (@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)))) (F (@tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) j)))) *) by apply: eq_bigl => j; rewrite cfclass_IirrE. Qed. Lemma cfResInd j: H <| G -> 'Res[H] ('Ind[G] 'chi_j) = #|H|%:R^-1 *: (\sum_(y in G) 'chi_j ^ y)%CF. Lemma Clifford_Res_sum_cfclass i j : H <| G -> j \in irr_constt ('Res[H, G] 'chi_i) -> 'Res[H] 'chi_i = '['Res[H] 'chi_i, 'chi_j] *: (\sum_(chi <- ('chi_j ^: G)%CF) chi). Proof. (* Goal: forall (_ : is_true (@normal gT (@gval gT H) (@gval gT G))) (_ : 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)))))), @eq (@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)) i)) (@GRing.scale (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@cfun_lmodType gT (@gval gT H)) (@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)) i)) (@tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) j)) (@BigOp.bigop (GRing.Zmodule.sort (@cfun_zmodType gT (@gval gT H))) (@classfun gT (@gval gT H)) (GRing.zero (@cfun_zmodType gT (@gval gT H))) (@cfclass (@gval gT H) (@tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) j) (@gval gT G)) (fun chi : @classfun gT (@gval gT H) => @BigBody (GRing.Zmodule.sort (@cfun_zmodType gT (@gval gT H))) (@classfun gT (@gval gT H)) chi (@GRing.add (@cfun_zmodType gT (@gval gT H))) true chi))) *) move=> nsHG chiHj; have [sHG /subsetP nHG] := andP nsHG. (* Goal: @eq (@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)) i)) (@GRing.scale (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@cfun_lmodType gT (@gval gT H)) (@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)) i)) (@tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) j)) (@BigOp.bigop (GRing.Zmodule.sort (@cfun_zmodType gT (@gval gT H))) (@classfun gT (@gval gT H)) (GRing.zero (@cfun_zmodType gT (@gval gT H))) (@cfclass (@gval gT H) (@tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) j) (@gval gT G)) (fun chi : @classfun gT (@gval gT H) => @BigBody (GRing.Zmodule.sort (@cfun_zmodType gT (@gval gT H))) (@classfun gT (@gval gT H)) chi (@GRing.add (@cfun_zmodType gT (@gval gT H))) true chi))) *) rewrite reindex_cfclass //= big_mkcond. (* Goal: @eq (@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)) i)) (@GRing.scale (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@cfun_lmodType gT (@gval gT H)) (@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)) i)) (@tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) j)) (@BigOp.bigop (@classfun gT (@gval gT H)) (ordinal (S (@pred_Nirr gT (@gval gT H)))) (GRing.zero (@cfun_zmodType gT (@gval gT H))) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT H))))) (fun i : ordinal (S (@pred_Nirr gT (@gval gT H))) => @BigBody (@classfun gT (@gval gT H)) (ordinal (S (@pred_Nirr gT (@gval gT H)))) i (@Monoid.operator (@classfun gT (@gval gT H)) (GRing.zero (@cfun_zmodType gT (@gval gT H))) (GRing.add_monoid (@cfun_zmodType gT (@gval gT H)))) true (if @in_mem (@classfun gT (@gval gT H)) (@tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) i) (@mem (@classfun gT (@gval gT H)) (seq_predType (@cfun_eqType gT (@gval gT H))) (@cfclass (@gval gT H) (@tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) j) (@gval gT G))) then @tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) i else GRing.zero (@cfun_zmodType gT (@gval gT H)))))) *) rewrite {1}['Res _]cfun_sum_cfdot linear_sum /=; apply: eq_bigr => k _. (* Goal: @eq (@classfun gT (@gval gT H)) (@GRing.scale (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@cfun_lmodType gT (@gval gT H)) (@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)) i)) (@tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) k)) (@tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) k)) (@GRing.scale (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType Algebraics.Implementation.comUnitRingType)) (@cfun_lmodType gT (@gval gT H)) (@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)) i)) (@tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) j)) (if @in_mem (@classfun gT (@gval gT H)) (@tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) k) (@mem (@classfun gT (@gval gT H)) (seq_predType (@cfun_eqType gT (@gval gT H))) (@cfclass (@gval gT H) (@tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) j) (@gval gT G))) then @tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) k else GRing.zero (@cfun_zmodType gT (@gval gT H)))) *) have [[y Gy ->] | ] := altP (cfclassP _ _ _); first by rewrite cfdot_Res_conjg. (* Goal: forall _ : is_true (negb (@in_mem (@classfun gT (@gval gT H)) (@tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) k) (@mem (Equality.sort (@cfun_eqType gT (@gval gT H))) (seq_predType (@cfun_eqType gT (@gval gT H))) (@cfclass (@gval gT H) (@tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) j) (@gval gT G))))), @eq (@classfun gT (@gval gT H)) (@GRing.scale (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@cfun_lmodType gT (@gval gT H)) (@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)) i)) (@tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) k)) (@tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) k)) (@GRing.scale (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType Algebraics.Implementation.comUnitRingType)) (@cfun_lmodType gT (@gval gT H)) (@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)) i)) (@tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) j)) (GRing.zero (@cfun_zmodType gT (@gval gT H)))) *) apply: contraNeq; rewrite scaler0 scaler_eq0 orbC => /norP[_ chiHk]. (* Goal: is_true (@in_mem (@classfun gT (@gval gT H)) (@tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) k) (@mem (Equality.sort (@cfun_eqType gT (@gval gT H))) (seq_predType (@cfun_eqType gT (@gval gT H))) (@cfclass (@gval gT H) (@tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) j) (@gval gT G)))) *) have{chiHk chiHj}: '['Res[H] ('Ind[G] 'chi_j), 'chi_k] != 0. (* Goal: forall _ : is_true (negb (@eq_op (GRing.Ring.eqType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (@cfdot gT (@gval gT H) (@cfRes gT (@gval gT H) (@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))) (@tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) k)) (GRing.zero (GRing.Ring.zmodType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType))))), is_true (@in_mem (@classfun gT (@gval gT H)) (@tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) k) (@mem (Equality.sort (@cfun_eqType gT (@gval gT H))) (seq_predType (@cfun_eqType gT (@gval gT H))) (@cfclass (@gval gT H) (@tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) j) (@gval gT G)))) *) (* Goal: is_true (negb (@eq_op (GRing.Ring.eqType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (@cfdot gT (@gval gT H) (@cfRes gT (@gval gT H) (@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))) (@tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) k)) (GRing.zero (GRing.Ring.zmodType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType))))) *) rewrite !inE !cfdot_Res_l in chiHj chiHk *. apply: contraNneq chiHk; rewrite cfdot_sum_irr => /psumr_eq0P/(_ i isT)/eqP. rewrite -cfdotC cfdotC mulf_eq0 conjC_eq0 (negbTE chiHj) /= => -> // i1. by rewrite -cfdotC Cnat_ge0 // rpredM ?Cnat_cfdot_char ?cfInd_char ?irr_char. rewrite cfResInd // cfdotZl mulf_eq0 cfdot_suml => /norP[_]. apply: contraR => chiGk'j; rewrite big1 // => x Gx; apply: contraNeq chiGk'j. rewrite -conjg_IirrE cfdot_irr pnatr_eq0; case: (_ =P k) => // <- _. by rewrite conjg_IirrE; apply/cfclassP; exists x. Qed. Qed. Lemma cfRes_Ind_invariant psi : H <| G -> G \subset 'I[psi] -> 'Res ('Ind[G, H] psi) = #|G : H|%:R *: psi. Corollary constt0_Res_cfker i : H <| G -> 0 \in irr_constt ('Res[H] 'chi[G]_i) -> H \subset cfker 'chi[G]_i. Proof. (* Goal: forall (_ : is_true (@normal gT (@gval gT H) (@gval gT G))) (_ : is_true (@in_mem (GRing.Zmodule.sort (Zp_zmodType (@pred_Nirr gT (@gval gT H)))) (GRing.zero (Zp_zmodType (@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)) 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 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 /(Clifford_Res_sum_cfclass nsHG); have [sHG nHG] := andP nsHG. (* Goal: forall _ : @eq (@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)) i)) (@GRing.scale (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@cfun_lmodType gT (@gval gT H)) (@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)) i)) (@tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) (GRing.zero (Zp_zmodType (@pred_Nirr gT (@gval gT H)))))) (@BigOp.bigop (GRing.Zmodule.sort (@cfun_zmodType gT (@gval gT H))) (@classfun gT (@gval gT H)) (GRing.zero (@cfun_zmodType gT (@gval gT H))) (@cfclass (@gval gT H) (@tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) (GRing.zero (Zp_zmodType (@pred_Nirr gT (@gval gT H))))) (@gval gT G)) (fun chi : @classfun gT (@gval gT H) => @BigBody (GRing.Zmodule.sort (@cfun_zmodType gT (@gval gT H))) (@classfun gT (@gval gT H)) chi (@GRing.add (@cfun_zmodType gT (@gval gT H))) true 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)) (@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))))) *) rewrite irr0 cfdot_Res_l cfclass1 // big_seq1 cfInd_cfun1 //. (* Goal: forall _ : @eq (@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)) i)) (@GRing.scale (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@cfun_lmodType gT (@gval gT H)) (@cfdot gT (@gval gT G) (@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.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (@indexg gT (@gval gT G) (@gval gT H))) (@cfun_indicator gT (@gval gT G) (@gval gT H)))) (GRing.one (@cfun_ringType 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)) (@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 cfdotZr conjC_nat => def_chiH. (* 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)) i))))) *) apply/subsetP=> x Hx; rewrite cfkerEirr inE -!(cfResE _ sHG) //. (* Goal: is_true (@eq_op Algebraics.Implementation.eqType (@fun_of_cfun 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)) x) (@fun_of_cfun 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)) (oneg (FinGroup.base gT)))) *) by rewrite def_chiH !cfunE cfun11 cfun1E Hx. Qed. Lemma dvdn_constt_Res1_irr1 i j : H <| G -> j \in irr_constt ('Res[H, G] 'chi_i) -> exists n, 'chi_i 1%g = n%:R * 'chi_j 1%g. Lemma cfclass_Ind phi psi : H <| G -> psi \in (phi ^: G)%CF -> 'Ind[G] phi = 'Ind[G] psi. End Inertia. Arguments inertia {gT B%g} phi%CF. Arguments cfclass {gT A%g} phi%CF B%g. Arguments conjg_Iirr_inj {gT H} y [i1 i2] : rename. Notation "''I[' phi ] " := (inertia phi) : group_scope. Notation "''I[' phi ] " := (inertia_group phi) : Group_scope. Notation "''I_' G [ phi ] " := (G%g :&: 'I[phi]) : group_scope. Notation "''I_' G [ phi ] " := (G :&: 'I[phi])%G : Group_scope. Notation "phi ^: G" := (cfclass phi G) : cfun_scope. Section ConjRestrict. Variables (gT : finGroupType) (G H K : {group gT}). Lemma cfConjgRes_norm phi y : y \in 'N(K) -> y \in 'N(H) -> ('Res[K, H] phi ^ y)%CF = 'Res (phi ^ y)%CF. 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)) (@normaliser gT (@gval gT K)))))) (_ : 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)) (@normaliser gT (@gval gT H)))))), @eq (@classfun gT (@gval gT K)) (@cfConjg gT (@gval gT K) y (@cfRes gT (@gval gT K) (@gval gT H) phi)) (@cfRes gT (@gval gT K) (@gval gT H) (@cfConjg gT (@gval gT H) y phi)) *) move=> nKy nHy; have [sKH | not_sKH] := boolP (K \subset H); last first. (* Goal: @eq (@classfun gT (@gval gT K)) (@cfConjg gT (@gval gT K) y (@cfRes gT (@gval gT K) (@gval gT H) phi)) (@cfRes gT (@gval gT K) (@gval gT H) (@cfConjg gT (@gval gT H) y phi)) *) (* Goal: @eq (@classfun gT (@gval gT K)) (@cfConjg gT (@gval gT K) y (@cfRes gT (@gval gT K) (@gval gT H) phi)) (@cfRes gT (@gval gT K) (@gval gT H) (@cfConjg gT (@gval gT H) y phi)) *) by rewrite !cfResEout // linearZ rmorph1 cfConjg1. (* Goal: @eq (@classfun gT (@gval gT K)) (@cfConjg gT (@gval gT K) y (@cfRes gT (@gval gT K) (@gval gT H) phi)) (@cfRes gT (@gval gT K) (@gval gT H) (@cfConjg gT (@gval gT H) y phi)) *) by apply/cfun_inP=> x Kx; rewrite !(cfConjgE, cfResE) ?memJ_norm ?groupV. Qed. Lemma cfConjgRes phi y : H <| G -> K <| G -> y \in G -> ('Res[K, H] phi ^ y)%CF = 'Res (phi ^ y)%CF. Proof. (* Goal: forall (_ : is_true (@normal gT (@gval gT H) (@gval gT G))) (_ : is_true (@normal gT (@gval gT K) (@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))))), @eq (@classfun gT (@gval gT K)) (@cfConjg gT (@gval gT K) y (@cfRes gT (@gval gT K) (@gval gT H) phi)) (@cfRes gT (@gval gT K) (@gval gT H) (@cfConjg gT (@gval gT H) y phi)) *) move=> /andP[_ nHG] /andP[_ nKG] Gy. (* Goal: @eq (@classfun gT (@gval gT K)) (@cfConjg gT (@gval gT K) y (@cfRes gT (@gval gT K) (@gval gT H) phi)) (@cfRes gT (@gval gT K) (@gval gT H) (@cfConjg gT (@gval gT H) y phi)) *) by rewrite cfConjgRes_norm ?(subsetP nHG) ?(subsetP nKG). Qed. Lemma sub_inertia_Res phi : G \subset 'N(K) -> 'I_G[phi] \subset 'I_G['Res[K, H] 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 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 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)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@inertia gT (@gval gT H) 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)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@inertia gT (@gval gT K) (@cfRes gT (@gval gT K) (@gval gT H) phi)))))) *) move=> nKG; apply/subsetP=> y /setIP[Gy /setIdP[nHy /eqP Iphi_y]]. (* 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)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@inertia gT (@gval gT K) (@cfRes gT (@gval gT K) (@gval gT H) phi)))))) *) by rewrite 2!inE Gy cfConjgRes_norm ?(subsetP nKG) ?Iphi_y /=. Qed. Lemma cfConjgInd_norm phi y : y \in 'N(K) -> y \in 'N(H) -> ('Ind[H, K] phi ^ y)%CF = 'Ind (phi ^ y)%CF. Lemma cfConjgInd phi y : H <| G -> K <| G -> y \in G -> ('Ind[H, K] phi ^ y)%CF = 'Ind (phi ^ y)%CF. Proof. (* Goal: forall (_ : is_true (@normal gT (@gval gT H) (@gval gT G))) (_ : is_true (@normal gT (@gval gT K) (@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))))), @eq (@classfun gT (@gval gT H)) (@cfConjg gT (@gval gT H) y (@cfInd gT (@gval gT H) (@gval gT K) phi)) (@cfInd gT (@gval gT H) (@gval gT K) (@cfConjg gT (@gval gT K) y phi)) *) move=> /andP[_ nHG] /andP[_ nKG] Gy. (* Goal: @eq (@classfun gT (@gval gT H)) (@cfConjg gT (@gval gT H) y (@cfInd gT (@gval gT H) (@gval gT K) phi)) (@cfInd gT (@gval gT H) (@gval gT K) (@cfConjg gT (@gval gT K) y phi)) *) by rewrite cfConjgInd_norm ?(subsetP nHG) ?(subsetP nKG). Qed. Lemma sub_inertia_Ind phi : G \subset 'N(H) -> 'I_G[phi] \subset 'I_G['Ind[H, K] 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 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)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@inertia gT (@gval gT K) 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)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@inertia gT (@gval gT H) (@cfInd gT (@gval gT H) (@gval gT K) phi)))))) *) move=> nHG; apply/subsetP=> y /setIP[Gy /setIdP[nKy /eqP Iphi_y]]. (* 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)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@inertia gT (@gval gT H) (@cfInd gT (@gval gT H) (@gval gT K) phi)))))) *) by rewrite 2!inE Gy cfConjgInd_norm ?(subsetP nHG) ?Iphi_y /=. Qed. End ConjRestrict. Section MoreInertia. Variables (gT : finGroupType) (G H : {group gT}) (i : Iirr H). Let T := 'I_G['chi_i]. Lemma cfclass_inertia : ('chi[H]_i ^: T)%CF = [:: 'chi_i]. Proof. (* Goal: @eq (list (@classfun gT (@gval gT H))) (@cfclass gT (@gval gT H) (@tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) i) T) (@cons (@classfun gT (@gval gT H)) (@tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) i) (@nil (@classfun gT (@gval gT H)))) *) rewrite /cfclass inertia_id rcosets_id /(image _ _) enum_set1 /=. (* Goal: @eq (list (@classfun gT (@gval gT H))) (@cons (@classfun gT (@gval gT H)) (@cfConjg gT (@gval gT H) (@repr (FinGroup.base gT) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@inertia gT (@gval gT H) (@tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) i)))) (@tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) i)) (@nil (@classfun gT (@gval gT H)))) (@cons (@classfun gT (@gval gT H)) (@tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) i) (@nil (@classfun gT (@gval gT H)))) *) by rewrite repr_group cfConjgJ1. Qed. End MoreInertia. Section ConjMorph. Variables (aT rT : finGroupType) (D G H : {group aT}) (f : {morphism D >-> rT}). Lemma cfConjgMorph (phi : 'CF(f @* H)) y : y \in D -> y \in 'N(H) -> (cfMorph phi ^ y)%CF = cfMorph (phi ^ f y). Proof. (* Goal: forall (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) y (@mem (Finite.sort (FinGroup.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))) y (@mem (Finite.sort (FinGroup.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 (@classfun aT (@gval aT H)) (@cfConjg aT (@gval aT H) y (@cfMorph aT rT D f H phi)) (@cfMorph aT rT D f H (@cfConjg rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT H)) (@mfun aT rT (@gval aT D) f y) phi)) *) move=> Dy nHy; have [sHD | not_sHD] := boolP (H \subset D); last first. (* Goal: @eq (@classfun aT (@gval aT H)) (@cfConjg aT (@gval aT H) y (@cfMorph aT rT D f H phi)) (@cfMorph aT rT D f H (@cfConjg rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT H)) (@mfun aT rT (@gval aT D) f y) phi)) *) (* Goal: @eq (@classfun aT (@gval aT H)) (@cfConjg aT (@gval aT H) y (@cfMorph aT rT D f H phi)) (@cfMorph aT rT D f H (@cfConjg rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT H)) (@mfun aT rT (@gval aT D) f y) phi)) *) by rewrite !cfMorphEout // linearZ rmorph1 cfConjg1. (* Goal: @eq (@classfun aT (@gval aT H)) (@cfConjg aT (@gval aT H) y (@cfMorph aT rT D f H phi)) (@cfMorph aT rT D f H (@cfConjg rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT H)) (@mfun aT rT (@gval aT D) f y) phi)) *) apply/cfun_inP=> x Gx; rewrite !(cfConjgE, cfMorphE) ?memJ_norm ?groupV //. (* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (@mfun aT rT (@gval aT D) f 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)) (@normaliser rT (@gval rT (@morphim_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) H)))))) *) (* Goal: @eq Algebraics.Implementation.type (@fun_of_cfun rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT H)) phi (@mfun aT rT (@gval aT D) f (@conjg aT x (@invg (FinGroup.base aT) y)))) (@fun_of_cfun rT (@gval rT (@morphim_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) H)) phi (@conjg rT (@mfun aT rT (@gval aT D) f x) (@invg (FinGroup.base rT) (@mfun aT rT (@gval aT D) f y)))) *) by rewrite morphJ ?morphV ?groupV // (subsetP sHD). (* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (@mfun aT rT (@gval aT D) f 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)) (@normaliser rT (@gval rT (@morphim_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) H)))))) *) by rewrite (subsetP (morphim_norm _ _)) ?mem_morphim. Qed. Lemma inertia_morph_pre (phi : 'CF(f @* H)) : H <| G -> G \subset D -> 'I_G[cfMorph phi] = G :&: f @*^-1 'I_(f @* G)[phi]. Proof. (* Goal: forall (_ : is_true (@normal aT (@gval aT H) (@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))))), @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)) (@gval aT G) (@inertia aT (@gval aT H) (@cfMorph aT rT D f H phi))) (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G) (@morphpre aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@setI (FinGroup.finType (FinGroup.base rT)) (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G)) (@inertia rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT H)) phi)))) *) case/andP=> sHG nHG sGD; have sHD := subset_trans sHG sGD. (* 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)) (@gval aT G) (@inertia aT (@gval aT H) (@cfMorph aT rT D f H phi))) (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G) (@morphpre aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@setI (FinGroup.finType (FinGroup.base rT)) (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G)) (@inertia rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT H)) phi)))) *) apply/setP=> y; rewrite !in_setI; apply: andb_id2l => Gy. (* Goal: @eq bool (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) y (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@inertia aT (@gval aT H) (@cfMorph aT rT D f H phi))))) (andb (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) y (@mem (Finite.sort (FinGroup.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)))) (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) y (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@preimset (FinGroup.arg_finType (FinGroup.base aT)) (FinGroup.sort (FinGroup.base rT)) (@mfun aT rT (@gval aT D) f) (@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.finType (FinGroup.base rT)) (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G)) (@inertia rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT H)) phi))))))))) *) have [Dy nHy] := (subsetP sGD y Gy, subsetP nHG y Gy). (* Goal: @eq bool (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) y (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@inertia aT (@gval aT H) (@cfMorph aT rT D f H phi))))) (andb (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) y (@mem (Finite.sort (FinGroup.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)))) (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) y (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@preimset (FinGroup.arg_finType (FinGroup.base aT)) (FinGroup.sort (FinGroup.base rT)) (@mfun aT rT (@gval aT D) f) (@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.finType (FinGroup.base rT)) (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G)) (@inertia rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT H)) phi))))))))) *) rewrite Dy inE nHy 4!inE mem_morphim // -morphimJ ?(normP nHy) // subxx /=. (* Goal: @eq bool (@eq_op (@cfun_eqType aT (@gval aT H)) (@cfConjg aT (@gval aT H) y (@cfMorph aT rT D f H phi)) (@cfMorph aT rT D f H phi)) (@eq_op (@cfun_eqType rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT H))) (@cfConjg rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT H)) (@mfun aT rT (@gval aT D) f y) phi) phi) *) rewrite cfConjgMorph //; apply/eqP/eqP=> [Iphi_y | -> //]. (* Goal: @eq (Equality.sort (@cfun_eqType rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT H)))) (@cfConjg rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT H)) (@mfun aT rT (@gval aT D) f y) phi) phi *) by apply/cfun_inP=> _ /morphimP[x Dx Hx ->]; rewrite -!cfMorphE ?Iphi_y. Qed. Lemma inertia_morph_im (phi : 'CF(f @* H)) : H <| G -> G \subset D -> f @* 'I_G[cfMorph phi] = 'I_(f @* G)[phi]. Proof. (* Goal: forall (_ : is_true (@normal aT (@gval aT H) (@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))))), @eq (@set_of (FinGroup.finType (FinGroup.base rT)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base rT))))) (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G) (@inertia aT (@gval aT H) (@cfMorph aT rT D f H phi)))) (@setI (FinGroup.finType (FinGroup.base rT)) (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G)) (@inertia rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT H)) phi)) *) move=> nsHG sGD; rewrite inertia_morph_pre // morphim_setIpre. (* Goal: @eq (@set_of (FinGroup.finType (FinGroup.base rT)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base rT))))) (@setI (FinGroup.finType (FinGroup.base rT)) (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G)) (@setI (FinGroup.finType (FinGroup.base rT)) (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G)) (@inertia rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT H)) phi))) (@setI (FinGroup.finType (FinGroup.base rT)) (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G)) (@inertia rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT H)) phi)) *) by rewrite (setIidPr _) ?Inertia_sub. Qed. Variables (R S : {group rT}). Variables (g : {morphism G >-> rT}) (h : {morphism H >-> rT}). Hypotheses (isoG : isom G R g) (isoH : isom H S h). Hypotheses (eq_hg : {in H, h =1 g}) (sHG : H \subset G). Lemma cfConjgIsom phi y : y \in G -> y \in 'N(H) -> (cfIsom isoH phi ^ g y)%CF = cfIsom isoH (phi ^ y). Proof. (* Goal: forall (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) y (@mem (Finite.sort (FinGroup.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 (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) y (@mem (Finite.sort (FinGroup.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 (@classfun rT (@gval rT S)) (@cfConjg rT (@gval rT S) (@mfun aT rT (@gval aT G) g y) (@cfIsom aT rT H h S isoH phi)) (@cfIsom aT rT H h S isoH (@cfConjg aT (@gval aT H) y phi)) *) move=> Gy nHy; have [_ defS] := isomP isoH. (* Goal: @eq (@classfun rT (@gval rT S)) (@cfConjg rT (@gval rT S) (@mfun aT rT (@gval aT G) g y) (@cfIsom aT rT H h S isoH phi)) (@cfIsom aT rT H h S isoH (@cfConjg aT (@gval aT H) y phi)) *) rewrite morphimEdom (eq_in_imset eq_hg) -morphimEsub // in defS. (* Goal: @eq (@classfun rT (@gval rT S)) (@cfConjg rT (@gval rT S) (@mfun aT rT (@gval aT G) g y) (@cfIsom aT rT H h S isoH phi)) (@cfIsom aT rT H h S isoH (@cfConjg aT (@gval aT H) y phi)) *) apply/cfun_inP=> gx; rewrite -{1}defS => /morphimP[x Gx Hx ->] {gx}. (* Goal: @eq Algebraics.Implementation.type (@fun_of_cfun rT (@gval rT S) (@cfConjg rT (@gval rT S) (@mfun aT rT (@gval aT G) g y) (@cfIsom aT rT H h S isoH phi)) (@mfun aT rT (@gval aT G) g x)) (@fun_of_cfun rT (@gval rT S) (@cfIsom aT rT H h S isoH (@cfConjg aT (@gval aT H) y phi)) (@mfun aT rT (@gval aT G) g x)) *) rewrite cfConjgE; last by rewrite -defS inE -morphimJ ?(normP nHy). (* Goal: @eq Algebraics.Implementation.type (@fun_of_cfun rT (@gval rT S) (@cfIsom aT rT H h S isoH phi) (@conjg rT (@mfun aT rT (@gval aT G) g x) (@invg (FinGroup.base rT) (@mfun aT rT (@gval aT G) g y)))) (@fun_of_cfun rT (@gval rT S) (@cfIsom aT rT H h S isoH (@cfConjg aT (@gval aT H) y phi)) (@mfun aT rT (@gval aT G) g x)) *) by rewrite -morphV -?morphJ -?eq_hg ?cfIsomE ?cfConjgE ?memJ_norm ?groupV. Qed. Lemma inertia_isom phi : 'I_R[cfIsom isoH phi] = g @* 'I_G[phi]. 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)) (@gval rT R) (@inertia rT (@gval rT S) (@cfIsom aT rT H h S isoH phi))) (@morphim aT rT (@gval aT G) g (@MorPhantom aT rT (@mfun aT rT (@gval aT G) g)) (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G) (@inertia aT (@gval aT H) phi))) *) have [[_ defS] [injg <-]] := (isomP isoH, isomP isoG). (* 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)) (@morphim aT rT (@gval aT G) g (@MorPhantom aT rT (@mfun aT rT (@gval aT G) g)) (@gval aT G)) (@inertia rT (@gval rT S) (@cfIsom aT rT H h S isoH phi))) (@morphim aT rT (@gval aT G) g (@MorPhantom aT rT (@mfun aT rT (@gval aT G) g)) (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G) (@inertia aT (@gval aT H) phi))) *) rewrite morphimEdom (eq_in_imset eq_hg) -morphimEsub // in defS. (* 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)) (@morphim aT rT (@gval aT G) g (@MorPhantom aT rT (@mfun aT rT (@gval aT G) g)) (@gval aT G)) (@inertia rT (@gval rT S) (@cfIsom aT rT H h S isoH phi))) (@morphim aT rT (@gval aT G) g (@MorPhantom aT rT (@mfun aT rT (@gval aT G) g)) (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G) (@inertia aT (@gval aT H) phi))) *) rewrite /inertia !setIdE morphimIdom setIA -{1}defS -injm_norm ?injmI //. (* 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)) (@morphim aT rT (@gval aT G) g (@MorPhantom aT rT (@mfun aT rT (@gval aT G) g)) (@normaliser aT (@gval aT H))) (@SetDef.finset (FinGroup.arg_finType (FinGroup.base rT)) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base rT)) => @eq_op (@cfun_eqType rT (@gval rT S)) (@cfConjg rT (@gval rT S) x (@cfIsom aT rT H h S isoH phi)) (@cfIsom aT rT H h S isoH phi)))) (@setI (FinGroup.finType (FinGroup.base rT)) (@morphim aT rT (@gval aT G) g (@MorPhantom aT rT (@mfun aT rT (@gval aT G) g)) (@normaliser aT (@gval aT H))) (@morphim aT rT (@gval aT G) g (@MorPhantom aT rT (@mfun aT rT (@gval aT G) g)) (@SetDef.finset (FinGroup.arg_finType (FinGroup.base aT)) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base aT)) => @eq_op (@cfun_eqType aT (@gval aT H)) (@cfConjg aT (@gval aT H) x phi) phi)))) *) apply/setP=> gy; rewrite !inE; apply: andb_id2l => /morphimP[y Gy nHy ->] {gy}. (* Goal: @eq bool (@eq_op (@cfun_eqType rT (@gval rT S)) (@cfConjg rT (@gval rT S) (@mfun aT rT (@gval aT G) g y) (@cfIsom aT rT H h S isoH phi)) (@cfIsom aT rT H h S isoH phi)) (@in_mem (Finite.sort (FinGroup.finType (FinGroup.base rT))) (@mfun aT rT (@gval aT G) g y) (@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 aT rT (@gval aT G) g (@MorPhantom aT rT (@mfun aT rT (@gval aT G) g)) (@SetDef.finset (FinGroup.arg_finType (FinGroup.base aT)) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base aT)) => @eq_op (@cfun_eqType aT (@gval aT H)) (@cfConjg aT (@gval aT H) x phi) phi)))))) *) rewrite cfConjgIsom // -sub1set -morphim_set1 // injmSK ?sub1set //= inE. (* Goal: @eq bool (@eq_op (@cfun_eqType rT (@gval rT S)) (@cfIsom aT rT H h S isoH (@cfConjg aT (@gval aT H) y phi)) (@cfIsom aT rT H h S isoH phi)) (@eq_op (@cfun_eqType aT (@gval aT H)) (@cfConjg aT (@gval aT H) y phi) phi) *) apply/eqP/eqP=> [Iphi_y | -> //]. (* Goal: @eq (Equality.sort (@cfun_eqType aT (@gval aT H))) (@cfConjg aT (@gval aT H) y phi) phi *) by apply/cfun_inP=> x Hx; rewrite -!(cfIsomE isoH) ?Iphi_y. Qed. End ConjMorph. Section ConjQuotient. Variables gT : finGroupType. Implicit Types G H K : {group gT}. Lemma cfConjgMod_norm H K (phi : 'CF(H / K)) y : y \in 'N(K) -> y \in 'N(H) -> ((phi %% K) ^ y)%CF = (phi ^ coset K y %% K)%CF. 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)) (@normaliser gT (@gval gT K)))))) (_ : 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)) (@normaliser gT (@gval gT H)))))), @eq (@classfun gT (@gval gT H)) (@cfConjg gT (@gval gT H) y (@cfMod gT H (@gval gT K) phi)) (@cfMod gT H (@gval gT K) (@cfConjg (@coset_groupType gT (@gval gT K)) (@quotient gT (@gval gT H) (@gval gT K)) (@coset gT (@gval gT K) y) phi)) *) exact: cfConjgMorph. Qed. Lemma cfConjgMod G H K (phi : 'CF(H / K)) y : H <| G -> K <| G -> y \in G -> ((phi %% K) ^ y)%CF = (phi ^ coset K y %% K)%CF. Proof. (* Goal: forall (_ : is_true (@normal gT (@gval gT H) (@gval gT G))) (_ : is_true (@normal gT (@gval gT K) (@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))))), @eq (@classfun gT (@gval gT H)) (@cfConjg gT (@gval gT H) y (@cfMod gT H (@gval gT K) phi)) (@cfMod gT H (@gval gT K) (@cfConjg (@coset_groupType gT (@gval gT K)) (@quotient gT (@gval gT H) (@gval gT K)) (@coset gT (@gval gT K) y) phi)) *) move=> /andP[_ nHG] /andP[_ nKG] Gy. (* Goal: @eq (@classfun gT (@gval gT H)) (@cfConjg gT (@gval gT H) y (@cfMod gT H (@gval gT K) phi)) (@cfMod gT H (@gval gT K) (@cfConjg (@coset_groupType gT (@gval gT K)) (@quotient gT (@gval gT H) (@gval gT K)) (@coset gT (@gval gT K) y) phi)) *) by rewrite cfConjgMod_norm ?(subsetP nHG) ?(subsetP nKG). Qed. Lemma cfConjgQuo_norm H K (phi : 'CF(H)) y : y \in 'N(K) -> y \in 'N(H) -> ((phi / K) ^ coset K y)%CF = (phi ^ y / K)%CF. 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)) (@normaliser gT (@gval gT K)))))) (_ : 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)) (@normaliser gT (@gval gT H)))))), @eq (@classfun (@coset_groupType gT (@gval gT K)) (@quotient gT (@gval gT H) (@gval gT K))) (@cfConjg (@coset_groupType gT (@gval gT K)) (@quotient gT (@gval gT H) (@gval gT K)) (@coset gT (@gval gT K) y) (@cfQuo gT H (@gval gT K) phi)) (@cfQuo gT H (@gval gT K) (@cfConjg gT (@gval gT H) y phi)) *) move=> nKy nHy; have keryK: (K \subset cfker (phi ^ y)) = (K \subset cfker phi). (* Goal: @eq (@classfun (@coset_groupType gT (@gval gT K)) (@quotient gT (@gval gT H) (@gval gT K))) (@cfConjg (@coset_groupType gT (@gval gT K)) (@quotient gT (@gval gT H) (@gval gT K)) (@coset gT (@gval gT K) y) (@cfQuo gT H (@gval gT K) phi)) (@cfQuo gT H (@gval gT K) (@cfConjg gT (@gval gT H) y phi)) *) (* 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 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 H) (@cfConjg gT (@gval gT H) y phi))))) (@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 H) phi)))) *) by rewrite cfker_conjg // -{1}(normP nKy) conjSg. (* Goal: @eq (@classfun (@coset_groupType gT (@gval gT K)) (@quotient gT (@gval gT H) (@gval gT K))) (@cfConjg (@coset_groupType gT (@gval gT K)) (@quotient gT (@gval gT H) (@gval gT K)) (@coset gT (@gval gT K) y) (@cfQuo gT H (@gval gT K) phi)) (@cfQuo gT H (@gval gT K) (@cfConjg gT (@gval gT H) y phi)) *) have [kerK | not_kerK] := boolP (K \subset cfker phi); last first. (* Goal: @eq (@classfun (@coset_groupType gT (@gval gT K)) (@quotient gT (@gval gT H) (@gval gT K))) (@cfConjg (@coset_groupType gT (@gval gT K)) (@quotient gT (@gval gT H) (@gval gT K)) (@coset gT (@gval gT K) y) (@cfQuo gT H (@gval gT K) phi)) (@cfQuo gT H (@gval gT K) (@cfConjg gT (@gval gT H) y phi)) *) (* Goal: @eq (@classfun (@coset_groupType gT (@gval gT K)) (@quotient gT (@gval gT H) (@gval gT K))) (@cfConjg (@coset_groupType gT (@gval gT K)) (@quotient gT (@gval gT H) (@gval gT K)) (@coset gT (@gval gT K) y) (@cfQuo gT H (@gval gT K) phi)) (@cfQuo gT H (@gval gT K) (@cfConjg gT (@gval gT H) y phi)) *) by rewrite !cfQuoEout ?linearZ ?rmorph1 ?cfConjg1 ?keryK. (* Goal: @eq (@classfun (@coset_groupType gT (@gval gT K)) (@quotient gT (@gval gT H) (@gval gT K))) (@cfConjg (@coset_groupType gT (@gval gT K)) (@quotient gT (@gval gT H) (@gval gT K)) (@coset gT (@gval gT K) y) (@cfQuo gT H (@gval gT K) phi)) (@cfQuo gT H (@gval gT K) (@cfConjg gT (@gval gT H) y phi)) *) apply/cfun_inP=> _ /morphimP[x nKx Hx ->]. (* Goal: @eq Algebraics.Implementation.type (@fun_of_cfun (@coset_groupType gT (@gval gT K)) (@gval (@coset_groupType gT (@gval gT K)) (@quotient_group gT H (@gval gT K))) (@cfConjg (@coset_groupType gT (@gval gT K)) (@quotient gT (@gval gT H) (@gval gT K)) (@coset gT (@gval gT K) y) (@cfQuo gT H (@gval gT K) phi)) (@mfun gT (@coset_groupType gT (@gval gT K)) (@normaliser gT (@gval gT K)) (@coset_morphism gT (@gval gT K)) x)) (@fun_of_cfun (@coset_groupType gT (@gval gT K)) (@gval (@coset_groupType gT (@gval gT K)) (@quotient_group gT H (@gval gT K))) (@cfQuo gT H (@gval gT K) (@cfConjg gT (@gval gT H) y phi)) (@mfun gT (@coset_groupType gT (@gval gT K)) (@normaliser gT (@gval gT K)) (@coset_morphism gT (@gval gT K)) x)) *) have nHyb: coset K y \in 'N(H / K) by rewrite inE -morphimJ ?(normP nHy). (* Goal: @eq Algebraics.Implementation.type (@fun_of_cfun (@coset_groupType gT (@gval gT K)) (@gval (@coset_groupType gT (@gval gT K)) (@quotient_group gT H (@gval gT K))) (@cfConjg (@coset_groupType gT (@gval gT K)) (@quotient gT (@gval gT H) (@gval gT K)) (@coset gT (@gval gT K) y) (@cfQuo gT H (@gval gT K) phi)) (@mfun gT (@coset_groupType gT (@gval gT K)) (@normaliser gT (@gval gT K)) (@coset_morphism gT (@gval gT K)) x)) (@fun_of_cfun (@coset_groupType gT (@gval gT K)) (@gval (@coset_groupType gT (@gval gT K)) (@quotient_group gT H (@gval gT K))) (@cfQuo gT H (@gval gT K) (@cfConjg gT (@gval gT H) y phi)) (@mfun gT (@coset_groupType gT (@gval gT K)) (@normaliser gT (@gval gT K)) (@coset_morphism gT (@gval gT K)) x)) *) rewrite !(cfConjgE, cfQuoEnorm) ?keryK // ?in_setI ?Hx //. (* Goal: @eq Algebraics.Implementation.type (@fun_of_cfun (@coset_groupType gT (@gval gT K)) (@gval (@coset_groupType gT (@gval gT K)) (@quotient_group gT H (@gval gT K))) (@cfQuo gT H (@gval gT K) phi) (@conjg (@coset_groupType gT (@gval gT K)) (@mfun gT (@coset_groupType gT (@gval gT K)) (@normaliser gT (@gval gT K)) (@coset_morphism gT (@gval gT K)) x) (@invg (FinGroup.base (@coset_groupType gT (@gval gT K))) (@coset gT (@gval gT K) y)))) (@fun_of_cfun gT (@gval gT H) phi (@conjg gT x (@invg (FinGroup.base gT) y))) *) rewrite -morphV -?morphJ ?groupV // cfQuoEnorm //. (* Goal: is_true (@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)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@normaliser gT (@gval gT K)))))) *) by rewrite inE memJ_norm ?Hx ?groupJ ?groupV. Qed. Lemma cfConjgQuo G H K (phi : 'CF(H)) y : H <| G -> K <| G -> y \in G -> ((phi / K) ^ coset K y)%CF = (phi ^ y / K)%CF. Proof. (* Goal: forall (_ : is_true (@normal gT (@gval gT H) (@gval gT G))) (_ : is_true (@normal gT (@gval gT K) (@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))))), @eq (@classfun (@coset_groupType gT (@gval gT K)) (@quotient gT (@gval gT H) (@gval gT K))) (@cfConjg (@coset_groupType gT (@gval gT K)) (@quotient gT (@gval gT H) (@gval gT K)) (@coset gT (@gval gT K) y) (@cfQuo gT H (@gval gT K) phi)) (@cfQuo gT H (@gval gT K) (@cfConjg gT (@gval gT H) y phi)) *) move=> /andP[_ nHG] /andP[_ nKG] Gy. (* Goal: @eq (@classfun (@coset_groupType gT (@gval gT K)) (@quotient gT (@gval gT H) (@gval gT K))) (@cfConjg (@coset_groupType gT (@gval gT K)) (@quotient gT (@gval gT H) (@gval gT K)) (@coset gT (@gval gT K) y) (@cfQuo gT H (@gval gT K) phi)) (@cfQuo gT H (@gval gT K) (@cfConjg gT (@gval gT H) y phi)) *) by rewrite cfConjgQuo_norm ?(subsetP nHG) ?(subsetP nKG). Qed. Lemma inertia_mod_pre G H K (phi : 'CF(H / K)) : H <| G -> K <| G -> 'I_G[phi %% K] = G :&: coset K @*^-1 'I_(G / K)[phi]. Proof. (* Goal: forall (_ : is_true (@normal gT (@gval gT H) (@gval gT G))) (_ : is_true (@normal gT (@gval gT K) (@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 G) (@inertia gT (@gval gT H) (@cfMod gT H (@gval gT K) phi))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@morphpre gT (@coset_groupType gT (@gval gT K)) (@normaliser gT (@gval gT K)) (@coset_morphism gT (@gval gT K)) (@MorPhantom gT (@coset_groupType gT (@gval gT K)) (@coset gT (@gval gT K))) (@setI (@coset_finType gT (@gval gT K)) (@quotient gT (@gval gT G) (@gval gT K)) (@inertia (@coset_groupType gT (@gval gT K)) (@quotient gT (@gval gT H) (@gval gT K)) phi)))) *) by move=> nsHG /andP[_]; apply: inertia_morph_pre. Qed. Lemma inertia_mod_quo G H K (phi : 'CF(H / K)) : H <| G -> K <| G -> ('I_G[phi %% K] / K)%g = 'I_(G / K)[phi]. Proof. (* Goal: forall (_ : is_true (@normal gT (@gval gT H) (@gval gT G))) (_ : is_true (@normal gT (@gval gT K) (@gval gT G))), @eq (@set_of (@coset_finType gT (@gval gT K)) (Phant (@coset_of gT (@gval gT K)))) (@quotient gT (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@inertia gT (@gval gT H) (@cfMod gT H (@gval gT K) phi))) (@gval gT K)) (@setI (@coset_finType gT (@gval gT K)) (@quotient gT (@gval gT G) (@gval gT K)) (@inertia (@coset_groupType gT (@gval gT K)) (@quotient gT (@gval gT H) (@gval gT K)) phi)) *) by move=> nsHG /andP[_]; apply: inertia_morph_im. Qed. Lemma inertia_quo G H K (phi : 'CF(H)) : H <| G -> K <| G -> K \subset cfker phi -> 'I_(G / K)[phi / K] = ('I_G[phi] / K)%g. Proof. (* Goal: forall (_ : is_true (@normal gT (@gval gT H) (@gval gT G))) (_ : is_true (@normal gT (@gval gT K) (@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 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 H) phi))))), @eq (@set_of (@coset_finType gT (@gval gT K)) (Phant (Finite.sort (@coset_finType gT (@gval gT K))))) (@setI (@coset_finType gT (@gval gT K)) (@quotient gT (@gval gT G) (@gval gT K)) (@inertia (@coset_groupType gT (@gval gT K)) (@quotient gT (@gval gT H) (@gval gT K)) (@cfQuo gT H (@gval gT K) phi))) (@quotient gT (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@inertia gT (@gval gT H) phi)) (@gval gT K)) *) move=> nsHG nsKG kerK; rewrite -inertia_mod_quo ?cfQuoK //. (* Goal: is_true (@normal gT (@gval gT K) (@gval gT H)) *) by rewrite (normalS _ (normal_sub nsHG)) // (subset_trans _ (cfker_sub phi)). Qed. End ConjQuotient. Section InertiaSdprod. Variables (gT : finGroupType) (K H G : {group gT}). Hypothesis defG : K ><| H = G. Lemma cfConjgSdprod phi y : y \in 'N(K) -> y \in 'N(H) -> (cfSdprod defG phi ^ y = cfSdprod defG (phi ^ y))%CF. 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)) (@normaliser gT (@gval gT K)))))) (_ : 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)) (@normaliser gT (@gval gT H)))))), @eq (@classfun gT (@gval gT G)) (@cfConjg gT (@gval gT G) y (@cfSdprod gT G K H defG phi)) (@cfSdprod gT G K H defG (@cfConjg gT (@gval gT H) y phi)) *) move=> nKy nHy. (* Goal: @eq (@classfun gT (@gval gT G)) (@cfConjg gT (@gval gT G) y (@cfSdprod gT G K H defG phi)) (@cfSdprod gT G K H defG (@cfConjg gT (@gval gT H) y phi)) *) have nGy: y \in 'N(G) by rewrite -sub1set -(sdprodW defG) normsM ?sub1set. (* Goal: @eq (@classfun gT (@gval gT G)) (@cfConjg gT (@gval gT G) y (@cfSdprod gT G K H defG phi)) (@cfSdprod gT G K H defG (@cfConjg gT (@gval gT H) y phi)) *) rewrite -{2}[phi](cfSdprodK defG) cfConjgRes_norm // cfRes_sdprodK //. (* 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 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) (@cfConjg gT (@gval gT G) y (@cfSdprod gT G K H defG phi)))))) *) by rewrite cfker_conjg // -{1}(normP nKy) conjSg cfker_sdprod. Qed. Lemma inertia_sdprod (L : {group gT}) phi : L \subset 'N(K) -> L \subset 'N(H) -> 'I_L[cfSdprod defG phi] = 'I_L[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 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 (@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)) (@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 (@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 L) (@inertia gT (@gval gT G) (@cfSdprod gT G K H defG phi))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT L) (@inertia gT (@gval gT H) phi)) *) move=> nKL nHL; have nGL: L \subset 'N(G) by rewrite -(sdprodW defG) normsM. (* 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 L) (@inertia gT (@gval gT G) (@cfSdprod gT G K H defG phi))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT L) (@inertia gT (@gval gT H) phi)) *) apply/setP=> z; rewrite !in_setI ![z \in 'I[_]]inE; apply: andb_id2l => Lz. (* Goal: @eq bool (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)) (@normaliser gT (@gval gT G))))) (@eq_op (@cfun_eqType gT (@gval gT G)) (@cfConjg gT (@gval gT G) z (@cfSdprod gT G K H defG phi)) (@cfSdprod gT G K H defG phi))) (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)) (@normaliser gT (@gval gT H))))) (@eq_op (@cfun_eqType gT (@gval gT H)) (@cfConjg gT (@gval gT H) z phi) phi)) *) rewrite cfConjgSdprod ?(subsetP nKL) ?(subsetP nHL) ?(subsetP nGL) //=. (* Goal: @eq bool (@eq_op (@cfun_eqType gT (@gval gT G)) (@cfSdprod gT G K H defG (@cfConjg gT (@gval gT H) z phi)) (@cfSdprod gT G K H defG phi)) (@eq_op (@cfun_eqType gT (@gval gT H)) (@cfConjg gT (@gval gT H) z phi) phi) *) by rewrite (can_eq (cfSdprodK defG)). Qed. End InertiaSdprod. Section InertiaDprod. Variables (gT : finGroupType) (G K H : {group gT}). Implicit Type L : {group gT}. Hypothesis KxH : K \x H = G. Lemma cfConjgDprodl phi y : y \in 'N(K) -> y \in 'N(H) -> (cfDprodl KxH phi ^ y = cfDprodl KxH (phi ^ y))%CF. 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)) (@normaliser gT (@gval gT K)))))) (_ : 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)) (@normaliser gT (@gval gT H)))))), @eq (@classfun gT (@gval gT G)) (@cfConjg gT (@gval gT G) y (@cfDprodl gT G K H KxH phi)) (@cfDprodl gT G K H KxH (@cfConjg gT (@gval gT K) y phi)) *) by move=> nKy nHy; apply: cfConjgSdprod. Qed. Lemma cfConjgDprodr psi y : y \in 'N(K) -> y \in 'N(H) -> (cfDprodr KxH psi ^ y = cfDprodr KxH (psi ^ y))%CF. 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)) (@normaliser gT (@gval gT K)))))) (_ : 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)) (@normaliser gT (@gval gT H)))))), @eq (@classfun gT (@gval gT G)) (@cfConjg gT (@gval gT G) y (@cfDprodr gT G K H KxH psi)) (@cfDprodr gT G K H KxH (@cfConjg gT (@gval gT H) y psi)) *) by move=> nKy nHy; apply: cfConjgSdprod. Qed. Lemma cfConjgDprod phi psi y : y \in 'N(K) -> y \in 'N(H) -> (cfDprod KxH phi psi ^ y = cfDprod KxH (phi ^ y) (psi ^ y))%CF. 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)) (@normaliser gT (@gval gT K)))))) (_ : 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)) (@normaliser gT (@gval gT H)))))), @eq (@classfun gT (@gval gT G)) (@cfConjg gT (@gval gT G) y (@cfDprod gT G K H KxH phi psi)) (@cfDprod gT G K H KxH (@cfConjg gT (@gval gT K) y phi) (@cfConjg gT (@gval gT H) y psi)) *) by move=> nKy nHy; rewrite rmorphM /= cfConjgDprodl ?cfConjgDprodr. Qed. Lemma inertia_dprodl L phi : L \subset 'N(K) -> L \subset 'N(H) -> 'I_L[cfDprodl KxH phi] = 'I_L[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 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 (@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)) (@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 (@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 L) (@inertia gT (@gval gT G) (@cfDprodl gT G K H KxH phi))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT L) (@inertia gT (@gval gT K) phi)) *) by move=> nKL nHL; apply: inertia_sdprod. Qed. Lemma inertia_dprodr L psi : L \subset 'N(K) -> L \subset 'N(H) -> 'I_L[cfDprodr KxH psi] = 'I_L[psi]. 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 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 (@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)) (@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 (@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 L) (@inertia gT (@gval gT G) (@cfDprodr gT G K H KxH psi))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT L) (@inertia gT (@gval gT H) psi)) *) by move=> nKL nHL; apply: inertia_sdprod. Qed. Lemma inertia_dprod L (phi : 'CF(K)) (psi : 'CF(H)) : L \subset 'N(K) -> L \subset 'N(H) -> phi 1%g != 0 -> psi 1%g != 0 -> 'I_L[cfDprod KxH phi psi] = 'I_L[phi] :&: 'I_L[psi]. 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 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 (@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)) (@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 (@gval gT H)))))) (_ : is_true (negb (@eq_op Algebraics.Implementation.eqType (@fun_of_cfun gT (@gval gT K) phi (oneg (FinGroup.base gT))) (GRing.zero Algebraics.Implementation.zmodType)))) (_ : is_true (negb (@eq_op Algebraics.Implementation.eqType (@fun_of_cfun gT (@gval gT H) psi (oneg (FinGroup.base gT))) (GRing.zero Algebraics.Implementation.zmodType)))), @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 L) (@inertia gT (@gval gT G) (@cfDprod gT G K H KxH phi psi))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT L) (@inertia gT (@gval gT K) phi)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT L) (@inertia gT (@gval gT H) psi))) *) move=> nKL nHL nz_phi nz_psi; apply/eqP; rewrite eqEsubset subsetI. (* Goal: is_true (andb (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)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT L) (@inertia gT (@gval gT G) (@cfDprod gT G K H KxH phi psi))))) (@mem (Finite.sort (FinGroup.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 L) (@inertia gT (@gval gT K) phi))))) (@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 L) (@inertia gT (@gval gT G) (@cfDprod gT G K H KxH phi psi))))) (@mem (Finite.sort (FinGroup.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 L) (@inertia gT (@gval gT H) psi)))))) (@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)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT L) (@inertia gT (@gval gT K) phi)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT L) (@inertia gT (@gval gT H) psi))))) (@mem (Finite.sort (FinGroup.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 L) (@inertia gT (@gval gT G) (@cfDprod gT G K H KxH phi psi))))))) *) rewrite -{1}(inertia_scale_nz psi nz_phi) -{1}(inertia_scale_nz phi nz_psi). (* Goal: is_true (andb (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)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT L) (@inertia gT (@gval gT G) (@cfDprod gT G K H KxH phi psi))))) (@mem (Finite.sort (FinGroup.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 L) (@inertia gT (@gval gT K) (@GRing.scale Algebraics.Implementation.ringType (@cfun_lmodType gT (@gval gT K)) (@fun_of_cfun gT (@gval gT H) psi (oneg (FinGroup.base gT))) phi)))))) (@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 L) (@inertia gT (@gval gT G) (@cfDprod gT G K H KxH phi psi))))) (@mem (Finite.sort (FinGroup.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 L) (@inertia gT (@gval gT H) (@GRing.scale Algebraics.Implementation.ringType (@cfun_lmodType gT (@gval gT H)) (@fun_of_cfun gT (@gval gT K) phi (oneg (FinGroup.base gT))) psi))))))) (@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)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT L) (@inertia gT (@gval gT K) phi)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT L) (@inertia gT (@gval gT H) psi))))) (@mem (Finite.sort (FinGroup.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 L) (@inertia gT (@gval gT G) (@cfDprod gT G K H KxH phi psi))))))) *) rewrite -(cfDprod_Resl KxH) -(cfDprod_Resr KxH) !sub_inertia_Res //=. (* 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)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT L) (@inertia gT (@gval gT K) phi)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT L) (@inertia gT (@gval gT H) psi))))) (@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 L) (@inertia gT (@gval gT G) (@cfDprod gT G K H KxH phi psi)))))) *) by rewrite -inertia_dprodl -?inertia_dprodr // -setIIr setIS ?inertia_mul. Qed. Lemma inertia_dprod_irr L i j : L \subset 'N(K) -> L \subset 'N(H) -> 'I_L[cfDprod KxH 'chi_i 'chi_j] = 'I_L['chi_i] :&: 'I_L['chi_j]. 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 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 (@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)) (@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 (@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 L) (@inertia 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)))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT L) (@inertia gT (@gval gT K) (@tnth (S (@pred_Nirr gT (@gval gT K))) (@classfun gT (@gval gT K)) (@irr gT (@gval gT K)) i))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT L) (@inertia gT (@gval gT H) (@tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) j)))) *) by move=> nKL nHL; rewrite inertia_dprod ?irr1_neq0. Qed. End InertiaDprod. Section InertiaBigdprod. Variables (gT : finGroupType) (I : finType) (P : pred I). Variables (A : I -> {group gT}) (G : {group gT}). Implicit Type L : {group gT}. Hypothesis defG : \big[dprod/1%g]_(i | P i) A i = G. Section ConjBig. Variable y : gT. Hypothesis nAy: forall i, P i -> y \in 'N(A i). Lemma cfConjgBigdprodi i (phi : 'CF(A i)) : (cfBigdprodi defG phi ^ y = cfBigdprodi defG (phi ^ y))%CF. Proof. (* Goal: @eq (@classfun gT (@gval gT G)) (@cfConjg gT (@gval gT G) y (@cfBigdprodi gT I P A G defG i phi)) (@cfBigdprodi gT I P A G defG i (@cfConjg gT (@gval gT (A i)) y phi)) *) rewrite cfConjgDprodl; try by case: ifP => [/nAy// | _]; rewrite norm1 inE. (* 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)) (@normaliser gT (@gval gT (@generated_group gT (@BigOp.bigop (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (Finite.sort I) (@set0 (FinGroup.arg_finType (FinGroup.base gT))) (index_enum I) (fun j : Finite.sort I => @BigBody (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (Finite.sort I) j (@setU (FinGroup.arg_finType (FinGroup.base gT))) (andb (P j) (negb (@eq_op (Finite.eqType I) j i))) (@gval gT (A j)))))))))) *) (* Goal: @eq (@classfun gT (@gval gT G)) (@cfDprodl gT G (if P i then A i else one_group gT) (@generated_group gT (@BigOp.bigop (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (Finite.sort I) (@set0 (FinGroup.arg_finType (FinGroup.base gT))) (index_enum I) (fun j : Finite.sort I => @BigBody (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (Finite.sort I) j (@setU (FinGroup.arg_finType (FinGroup.base gT))) (andb (P j) (negb (@eq_op (Finite.eqType I) j i))) (@gval gT (A j))))) (@cfBigdprodi_subproof gT I P A G defG i) (@cfConjg gT (@gval gT (if P i then A i else one_group gT)) y (@cfRes gT (@gval gT (if P i then A i else one_group gT)) (@gval gT (A i)) phi))) (@cfBigdprodi gT I P A G defG i (@cfConjg gT (@gval gT (A i)) y phi)) *) congr (cfDprodl _ _); case: ifP => [Pi | _]. (* 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)) (@normaliser gT (@gval gT (@generated_group gT (@BigOp.bigop (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (Finite.sort I) (@set0 (FinGroup.arg_finType (FinGroup.base gT))) (index_enum I) (fun j : Finite.sort I => @BigBody (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (Finite.sort I) j (@setU (FinGroup.arg_finType (FinGroup.base gT))) (andb (P j) (negb (@eq_op (Finite.eqType I) j i))) (@gval gT (A j)))))))))) *) (* Goal: @eq (@classfun gT (@gval gT (one_group gT))) (@cfConjg gT (@gval gT (one_group gT)) y (@cfRes gT (@gval gT (one_group gT)) (@gval gT (A i)) phi)) (@cfRes gT (@gval gT (one_group gT)) (@gval gT (A i)) (@cfConjg gT (@gval gT (A i)) y phi)) *) (* Goal: @eq (@classfun gT (@gval gT (A i))) (@cfConjg gT (@gval gT (A i)) y (@cfRes gT (@gval gT (A i)) (@gval gT (A i)) phi)) (@cfRes gT (@gval gT (A i)) (@gval gT (A i)) (@cfConjg gT (@gval gT (A i)) y phi)) *) by rewrite cfConjgRes_norm ?nAy. (* 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)) (@normaliser gT (@gval gT (@generated_group gT (@BigOp.bigop (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (Finite.sort I) (@set0 (FinGroup.arg_finType (FinGroup.base gT))) (index_enum I) (fun j : Finite.sort I => @BigBody (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (Finite.sort I) j (@setU (FinGroup.arg_finType (FinGroup.base gT))) (andb (P j) (negb (@eq_op (Finite.eqType I) j i))) (@gval gT (A j)))))))))) *) (* Goal: @eq (@classfun gT (@gval gT (one_group gT))) (@cfConjg gT (@gval gT (one_group gT)) y (@cfRes gT (@gval gT (one_group gT)) (@gval gT (A i)) phi)) (@cfRes gT (@gval gT (one_group gT)) (@gval gT (A i)) (@cfConjg gT (@gval gT (A i)) y phi)) *) by apply/cfun_inP=> _ /set1P->; rewrite !(cfRes1, cfConjg1). (* 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)) (@normaliser gT (@gval gT (@generated_group gT (@BigOp.bigop (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (Finite.sort I) (@set0 (FinGroup.arg_finType (FinGroup.base gT))) (index_enum I) (fun j : Finite.sort I => @BigBody (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (Finite.sort I) j (@setU (FinGroup.arg_finType (FinGroup.base gT))) (andb (P j) (negb (@eq_op (Finite.eqType I) j i))) (@gval gT (A j)))))))))) *) rewrite -sub1set norms_gen ?norms_bigcup // sub1set. (* 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)) (@BigOp.bigop (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (Finite.sort I) (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (index_enum I) (fun i0 : Finite.sort I => @BigBody (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (Finite.sort I) i0 (@setI (FinGroup.arg_finType (FinGroup.base gT))) (andb (P i0) (negb (@eq_op (Finite.eqType I) i0 i))) (@normaliser gT (@gval gT (A i0)))))))) *) by apply/bigcapP=> j /andP[/nAy]. Qed. Lemma cfConjgBigdprod phi : (cfBigdprod defG phi ^ y = cfBigdprod defG (fun i => phi i ^ y))%CF. Proof. (* Goal: @eq (@classfun gT (@gval gT G)) (@cfConjg gT (@gval gT G) y (@cfBigdprod gT I P A G defG phi)) (@cfBigdprod gT I P A G defG (fun i : Finite.sort I => @cfConjg gT (@gval gT (A i)) y (phi i))) *) by rewrite rmorph_prod /=; apply: eq_bigr => i _; apply: cfConjgBigdprodi. Qed. End ConjBig. Section InertiaBig. Variable L : {group gT}. Hypothesis nAL : forall i, P i -> L \subset 'N(A i). Lemma inertia_bigdprodi i (phi : 'CF(A i)) : P i -> 'I_L[cfBigdprodi defG phi] = 'I_L[phi]. Proof. (* Goal: forall _ : is_true (P i), @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 L) (@inertia gT (@gval gT G) (@cfBigdprodi gT I P A G defG i phi))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT L) (@inertia gT (@gval gT (A i)) phi)) *) move=> Pi; rewrite inertia_dprodl ?Pi ?cfRes_id ?nAL //. (* 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)) (@normaliser gT (@gval gT (@generated_group gT (@BigOp.bigop (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (Finite.sort I) (@set0 (FinGroup.arg_finType (FinGroup.base gT))) (index_enum I) (fun j : Finite.sort I => @BigBody (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (Finite.sort I) j (@setU (FinGroup.arg_finType (FinGroup.base gT))) (andb (P j) (negb (@eq_op (Finite.eqType I) j i))) (@gval gT (A j)))))))))) *) by apply/norms_gen/norms_bigcup/bigcapsP=> j /andP[/nAL]. Qed. Lemma inertia_bigdprod phi (Phi := cfBigdprod defG phi) : Phi 1%g != 0 -> 'I_L[Phi] = L :&: \bigcap_(i | P i) 'I_L[phi i]. Lemma inertia_bigdprod_irr Iphi (phi := fun i => 'chi_(Iphi i)) : 'I_L[cfBigdprod defG phi] = L :&: \bigcap_(i | P i) 'I_L[phi i]. 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 L) (@inertia gT (@gval gT G) (@cfBigdprod gT I P A G defG phi))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT L) (@BigOp.bigop (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (Finite.sort I) (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (index_enum I) (fun i : Finite.sort I => @BigBody (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (Finite.sort I) i (@setI (FinGroup.arg_finType (FinGroup.base gT))) (P i) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT L) (@inertia gT (@gval gT (A i)) (phi i)))))) *) rewrite inertia_bigdprod // -[cfBigdprod _ _]cfIirrE ?irr1_neq0 //. (* Goal: is_true (@in_mem (Equality.sort (@cfun_eqType gT (@gval gT G))) (@cfBigdprod gT I P A G defG 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)))) *) by apply: cfBigdprod_irr => i _; apply: mem_irr. Qed. End InertiaBig. End InertiaBigdprod. Section ConsttInertiaBijection. Variables (gT : finGroupType) (H G : {group gT}) (t : Iirr H). Hypothesis nsHG : H <| G. Local Notation theta := 'chi_t. Local Notation T := 'I_G[theta]%G. Local Notation "` 'T'" := 'I_(gval G)[theta] (at level 0, format "` 'T'") : group_scope. Let calA := irr_constt ('Ind[T] theta). Let calB := irr_constt ('Ind[G] theta). Local Notation AtoB := (Ind_Iirr G). Theorem constt_Inertia_bijection : [/\ {in calA, forall s, 'Ind[G] 'chi_s \in irr G}, {in calA &, injective (Ind_Iirr G)}, Ind_Iirr G @: calA =i calB, {in calA, forall s (psi := 'chi_s) (chi := 'Ind[G] psi), [predI irr_constt ('Res chi) & calA] =i pred1 s} & {in calA, forall s (psi := 'chi_s) (chi := 'Ind[G] psi), '['Res psi, theta] = '['Res chi, theta]}]. End ConsttInertiaBijection. Section ExtendInvariantIrr. Variable gT : finGroupType. Implicit Types G H K L M N : {group gT}. Section ConsttIndExtendible. Variables (G N : {group gT}) (t : Iirr N) (c : Iirr G). Let theta := 'chi_t. Let chi := 'chi_c. Definition mul_Iirr b := cfIirr ('chi_b * chi). Definition mul_mod_Iirr (b : Iirr (G / N)) := mul_Iirr (mod_Iirr b). Hypotheses (nsNG : N <| G) (cNt : 'Res[N] chi = theta). Let sNG : N \subset G. Proof. exact: normal_sub. Qed. 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 N))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.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: normal_sub. Qed. Lemma extendible_irr_invariant : G \subset 'I[theta]. 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)) (@inertia gT (@gval gT N) theta)))) *) apply/subsetP=> y Gy; have nNy := subsetP nNG y Gy. (* 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)) (@inertia gT (@gval gT N) theta)))) *) rewrite inE nNy; apply/eqP/cfun_inP=> x Nx; rewrite cfConjgE // -cNt. (* Goal: @eq Algebraics.Implementation.type (@fun_of_cfun gT (@gval gT N) (@cfRes gT (@gval gT N) (@gval gT G) chi) (@conjg gT x (@invg (FinGroup.base gT) y))) (@fun_of_cfun gT (@gval gT N) (@cfRes gT (@gval gT N) (@gval gT G) chi) x) *) by rewrite !cfResE ?memJ_norm ?cfunJ ?groupV. Qed. Let IGtheta := extendible_irr_invariant. Theorem constt_Ind_mul_ext f (phi := 'chi_f) (psi := phi * theta) : G \subset 'I[phi] -> psi \in irr N -> let calS := irr_constt ('Ind phi) in [/\ {in calS, forall b, 'chi_b * chi \in irr G}, {in calS &, injective mul_Iirr}, irr_constt ('Ind psi) =i [seq mul_Iirr b | b in calS] & 'Ind psi = \sum_(b in calS) '['Ind phi, 'chi_b] *: 'chi_(mul_Iirr b)]. Corollary constt_Ind_ext : [/\ forall b : Iirr (G / N), 'chi_(mod_Iirr b) * chi \in irr G, injective mul_mod_Iirr, irr_constt ('Ind theta) =i codom mul_mod_Iirr & 'Ind theta = \sum_b 'chi_b 1%g *: 'chi_(mul_mod_Iirr b)]. Proof. (* Goal: and4 (forall b : ordinal (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))), is_true (@in_mem (GRing.Ring.sort (@cfun_ringType gT (@gval gT G))) (@GRing.mul (@cfun_ringType gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (@mod_Iirr gT G N b)) 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))))) (@injective (ordinal (S (@pred_Nirr gT (@gval gT G)))) (ordinal (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))))) mul_mod_Iirr) (@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 gT (@gval gT G) (@cfInd gT (@gval gT G) (@gval gT N) theta))) (@mem (Equality.sort (ordinal_eqType (S (@pred_Nirr gT (@gval gT G))))) (seq_predType (ordinal_eqType (S (@pred_Nirr gT (@gval gT G))))) (@codom (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))))) (ordinal (S (@pred_Nirr gT (@gval gT G)))) mul_mod_Iirr))) (@eq (@classfun gT (@gval gT G)) (@cfInd gT (@gval gT G) (@gval gT N) theta) (@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 (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))))) (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 (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))))) (fun b : Finite.sort (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))))) => @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 (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))))) b (@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 (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)) (@tnth (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))) (@classfun (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))) (@irr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))) b) (oneg (FinGroup.base (@coset_groupType gT (@gval gT N))))) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (mul_mod_Iirr b)))))) *) have IHchi0: G \subset 'I['chi[N]_0] by rewrite inertia_irr0. (* Goal: and4 (forall b : ordinal (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))), is_true (@in_mem (GRing.Ring.sort (@cfun_ringType gT (@gval gT G))) (@GRing.mul (@cfun_ringType gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (@mod_Iirr gT G N b)) 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))))) (@injective (ordinal (S (@pred_Nirr gT (@gval gT G)))) (ordinal (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))))) mul_mod_Iirr) (@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 gT (@gval gT G) (@cfInd gT (@gval gT G) (@gval gT N) theta))) (@mem (Equality.sort (ordinal_eqType (S (@pred_Nirr gT (@gval gT G))))) (seq_predType (ordinal_eqType (S (@pred_Nirr gT (@gval gT G))))) (@codom (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))))) (ordinal (S (@pred_Nirr gT (@gval gT G)))) mul_mod_Iirr))) (@eq (@classfun gT (@gval gT G)) (@cfInd gT (@gval gT G) (@gval gT N) theta) (@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 (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))))) (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 (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))))) (fun b : Finite.sort (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))))) => @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 (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))))) b (@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 (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)) (@tnth (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))) (@classfun (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))) (@irr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))) b) (oneg (FinGroup.base (@coset_groupType gT (@gval gT N))))) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (mul_mod_Iirr b)))))) *) have [] := constt_Ind_mul_ext IHchi0; rewrite irr0 ?mul1r ?mem_irr //. (* Goal: forall (_ : @prop_in1 (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 gT (@gval gT G) (@cfInd gT (@gval gT G) (@gval gT N) (GRing.one (@cfun_ringType gT (@gval gT N)))))) (fun b : ordinal (S (@pred_Nirr gT (@gval gT G))) => is_true (@in_mem (GRing.Ring.sort (@cfun_ringType gT (@gval gT G))) (@GRing.mul (@cfun_ringType gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) b) 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))))) (inPhantom (forall b : ordinal (S (@pred_Nirr gT (@gval gT G))), is_true (@in_mem (GRing.Ring.sort (@cfun_ringType gT (@gval gT G))) (@GRing.mul (@cfun_ringType gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) b) 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))))))) (_ : @prop_in2 (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 gT (@gval gT G) (@cfInd gT (@gval gT G) (@gval gT N) (GRing.one (@cfun_ringType gT (@gval gT N)))))) (fun x1 x2 : ordinal (S (@pred_Nirr gT (@gval gT G))) => forall _ : @eq (ordinal (S (@pred_Nirr gT (@gval gT G)))) (mul_Iirr x1) (mul_Iirr x2), @eq (ordinal (S (@pred_Nirr gT (@gval gT G)))) x1 x2) (inPhantom (@injective (ordinal (S (@pred_Nirr gT (@gval gT G)))) (ordinal (S (@pred_Nirr gT (@gval gT G)))) mul_Iirr))) (_ : @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 gT (@gval gT G) (@cfInd gT (@gval gT G) (@gval gT N) theta))) (@mem (Equality.sort (ordinal_eqType (S (@pred_Nirr gT (@gval gT G))))) (seq_predType (ordinal_eqType (S (@pred_Nirr gT (@gval gT G))))) (@image_mem (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) (ordinal (S (@pred_Nirr gT (@gval gT G)))) (fun b : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => mul_Iirr b) (@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 N) (GRing.one (@cfun_ringType gT (@gval gT N))))))))) (_ : @eq (@classfun gT (@gval gT G)) (@cfInd gT (@gval gT G) (@gval gT N) theta) (@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 b : 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))))) b (@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))))) b (@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 N) (GRing.one (@cfun_ringType gT (@gval gT N))))))) (@GRing.scale (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@cfun_lmodType gT (@gval gT G)) (@cfdot gT (@gval gT G) (@cfInd gT (@gval gT G) (@gval gT N) (GRing.one (@cfun_ringType gT (@gval gT N)))) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) b)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (mul_Iirr b)))))), and4 (forall b : ordinal (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))), is_true (@in_mem (GRing.Ring.sort (@cfun_ringType gT (@gval gT G))) (@GRing.mul (@cfun_ringType gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (@mod_Iirr gT G N b)) 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))))) (@injective (ordinal (S (@pred_Nirr gT (@gval gT G)))) (ordinal (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))))) mul_mod_Iirr) (@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 gT (@gval gT G) (@cfInd gT (@gval gT G) (@gval gT N) theta))) (@mem (Equality.sort (ordinal_eqType (S (@pred_Nirr gT (@gval gT G))))) (seq_predType (ordinal_eqType (S (@pred_Nirr gT (@gval gT G))))) (@codom (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))))) (ordinal (S (@pred_Nirr gT (@gval gT G)))) mul_mod_Iirr))) (@eq (@classfun gT (@gval gT G)) (@cfInd gT (@gval gT G) (@gval gT N) theta) (@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 (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))))) (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 (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))))) (fun b : Finite.sort (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))))) => @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 (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))))) b (@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 (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)) (@tnth (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))) (@classfun (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))) (@irr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))) b) (oneg (FinGroup.base (@coset_groupType gT (@gval gT N))))) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (mul_mod_Iirr b)))))) *) set psiG := 'Ind 1 => irrMchi injMchi constt_theta {2}->. (* Goal: and4 (forall b : ordinal (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))), is_true (@in_mem (GRing.Ring.sort (@cfun_ringType gT (@gval gT G))) (@GRing.mul (@cfun_ringType gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (@mod_Iirr gT G N b)) 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))))) (@injective (ordinal (S (@pred_Nirr gT (@gval gT G)))) (ordinal (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))))) mul_mod_Iirr) (@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 gT (@gval gT G) (@cfInd gT (@gval gT G) (@gval gT N) theta))) (@mem (Equality.sort (ordinal_eqType (S (@pred_Nirr gT (@gval gT G))))) (seq_predType (ordinal_eqType (S (@pred_Nirr gT (@gval gT G))))) (@codom (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))))) (ordinal (S (@pred_Nirr gT (@gval gT G)))) mul_mod_Iirr))) (@eq (@classfun gT (@gval gT G)) (@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 b : 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))))) b (@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))))) b (@mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) (simplPredType (ordinal (S (@pred_Nirr gT (@gval gT G))))) (@irr_constt gT (@gval gT G) psiG))) (@GRing.scale (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@cfun_lmodType gT (@gval gT G)) (@cfdot gT (@gval gT G) psiG (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) b)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (mul_Iirr b))))) (@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 (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))))) (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 (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))))) (fun b : Finite.sort (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))))) => @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 (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))))) b (@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 (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)) (@tnth (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))) (@classfun (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))) (@irr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))) b) (oneg (FinGroup.base (@coset_groupType gT (@gval gT N))))) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (mul_mod_Iirr b)))))) *) have dot_psiG b: '[psiG, 'chi_(mod_Iirr b)] = 'chi[G / N]_b 1%g. (* Goal: and4 (forall b : ordinal (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))), is_true (@in_mem (GRing.Ring.sort (@cfun_ringType gT (@gval gT G))) (@GRing.mul (@cfun_ringType gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (@mod_Iirr gT G N b)) 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))))) (@injective (ordinal (S (@pred_Nirr gT (@gval gT G)))) (ordinal (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))))) mul_mod_Iirr) (@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 gT (@gval gT G) (@cfInd gT (@gval gT G) (@gval gT N) theta))) (@mem (Equality.sort (ordinal_eqType (S (@pred_Nirr gT (@gval gT G))))) (seq_predType (ordinal_eqType (S (@pred_Nirr gT (@gval gT G))))) (@codom (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))))) (ordinal (S (@pred_Nirr gT (@gval gT G)))) mul_mod_Iirr))) (@eq (@classfun gT (@gval gT G)) (@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 b : 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))))) b (@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))))) b (@mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) (simplPredType (ordinal (S (@pred_Nirr gT (@gval gT G))))) (@irr_constt gT (@gval gT G) psiG))) (@GRing.scale (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@cfun_lmodType gT (@gval gT G)) (@cfdot gT (@gval gT G) psiG (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) b)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (mul_Iirr b))))) (@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 (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))))) (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 (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))))) (fun b : Finite.sort (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))))) => @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 (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))))) b (@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 (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)) (@tnth (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))) (@classfun (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))) (@irr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))) b) (oneg (FinGroup.base (@coset_groupType gT (@gval gT N))))) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (mul_mod_Iirr b)))))) *) (* Goal: @eq (GRing.Ring.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (@cfdot gT (@gval gT G) psiG (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (@mod_Iirr gT G N b))) (@fun_of_cfun (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)) (@tnth (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))) (@classfun (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))) (@irr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))) b) (oneg (FinGroup.base (@coset_groupType gT (@gval gT N))))) *) rewrite mod_IirrE // -cfdot_Res_r cfRes_sub_ker ?cfker_mod //. (* Goal: and4 (forall b : ordinal (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))), is_true (@in_mem (GRing.Ring.sort (@cfun_ringType gT (@gval gT G))) (@GRing.mul (@cfun_ringType gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (@mod_Iirr gT G N b)) 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))))) (@injective (ordinal (S (@pred_Nirr gT (@gval gT G)))) (ordinal (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))))) mul_mod_Iirr) (@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 gT (@gval gT G) (@cfInd gT (@gval gT G) (@gval gT N) theta))) (@mem (Equality.sort (ordinal_eqType (S (@pred_Nirr gT (@gval gT G))))) (seq_predType (ordinal_eqType (S (@pred_Nirr gT (@gval gT G))))) (@codom (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))))) (ordinal (S (@pred_Nirr gT (@gval gT G)))) mul_mod_Iirr))) (@eq (@classfun gT (@gval gT G)) (@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 b : 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))))) b (@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))))) b (@mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) (simplPredType (ordinal (S (@pred_Nirr gT (@gval gT G))))) (@irr_constt gT (@gval gT G) psiG))) (@GRing.scale (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@cfun_lmodType gT (@gval gT G)) (@cfdot gT (@gval gT G) psiG (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) b)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (mul_Iirr b))))) (@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 (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))))) (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 (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))))) (fun b : Finite.sort (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))))) => @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 (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))))) b (@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 (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)) (@tnth (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))) (@classfun (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))) (@irr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))) b) (oneg (FinGroup.base (@coset_groupType gT (@gval gT N))))) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (mul_mod_Iirr b)))))) *) (* Goal: @eq (GRing.Ring.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (@cfdot gT (@gval gT N) (GRing.one (@cfun_ringType gT (@gval gT N))) (@GRing.scale Algebraics.Implementation.ringType (@GRing.Lalgebra.lmod_ringType Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lalgType gT (@gval gT N))) (@fun_of_cfun gT (@gval gT G) (@cfMod gT G (@gval gT N) (@tnth (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))) (@classfun (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))) (@irr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))) b)) (oneg (FinGroup.base gT))) (GRing.one (@GRing.Lalgebra.ringType Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lalgType gT (@gval gT N)))))) (@fun_of_cfun (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)) (@tnth (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))) (@classfun (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))) (@irr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))) b) (oneg (FinGroup.base (@coset_groupType gT (@gval gT N))))) *) by rewrite cfdotZr cfnorm1 mulr1 conj_Cnat ?cfMod1 ?Cnat_irr1. (* Goal: and4 (forall b : ordinal (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))), is_true (@in_mem (GRing.Ring.sort (@cfun_ringType gT (@gval gT G))) (@GRing.mul (@cfun_ringType gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (@mod_Iirr gT G N b)) 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))))) (@injective (ordinal (S (@pred_Nirr gT (@gval gT G)))) (ordinal (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))))) mul_mod_Iirr) (@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 gT (@gval gT G) (@cfInd gT (@gval gT G) (@gval gT N) theta))) (@mem (Equality.sort (ordinal_eqType (S (@pred_Nirr gT (@gval gT G))))) (seq_predType (ordinal_eqType (S (@pred_Nirr gT (@gval gT G))))) (@codom (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))))) (ordinal (S (@pred_Nirr gT (@gval gT G)))) mul_mod_Iirr))) (@eq (@classfun gT (@gval gT G)) (@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 b : 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))))) b (@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))))) b (@mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) (simplPredType (ordinal (S (@pred_Nirr gT (@gval gT G))))) (@irr_constt gT (@gval gT G) psiG))) (@GRing.scale (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@cfun_lmodType gT (@gval gT G)) (@cfdot gT (@gval gT G) psiG (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) b)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (mul_Iirr b))))) (@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 (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))))) (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 (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))))) (fun b : Finite.sort (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))))) => @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 (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))))) b (@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 (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)) (@tnth (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))) (@classfun (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))) (@irr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))) b) (oneg (FinGroup.base (@coset_groupType gT (@gval gT N))))) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (mul_mod_Iirr b)))))) *) have mem_psiG (b : Iirr (G / N)): mod_Iirr b \in irr_constt psiG. (* Goal: and4 (forall b : ordinal (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))), is_true (@in_mem (GRing.Ring.sort (@cfun_ringType gT (@gval gT G))) (@GRing.mul (@cfun_ringType gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (@mod_Iirr gT G N b)) 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))))) (@injective (ordinal (S (@pred_Nirr gT (@gval gT G)))) (ordinal (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))))) mul_mod_Iirr) (@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 gT (@gval gT G) (@cfInd gT (@gval gT G) (@gval gT N) theta))) (@mem (Equality.sort (ordinal_eqType (S (@pred_Nirr gT (@gval gT G))))) (seq_predType (ordinal_eqType (S (@pred_Nirr gT (@gval gT G))))) (@codom (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))))) (ordinal (S (@pred_Nirr gT (@gval gT G)))) mul_mod_Iirr))) (@eq (@classfun gT (@gval gT G)) (@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 b : 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))))) b (@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))))) b (@mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) (simplPredType (ordinal (S (@pred_Nirr gT (@gval gT G))))) (@irr_constt gT (@gval gT G) psiG))) (@GRing.scale (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@cfun_lmodType gT (@gval gT G)) (@cfdot gT (@gval gT G) psiG (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) b)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (mul_Iirr b))))) (@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 (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))))) (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 (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))))) (fun b : Finite.sort (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))))) => @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 (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))))) b (@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 (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)) (@tnth (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))) (@classfun (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))) (@irr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))) b) (oneg (FinGroup.base (@coset_groupType gT (@gval gT N))))) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (mul_mod_Iirr b)))))) *) (* Goal: is_true (@in_mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) (@mod_Iirr gT G N b) (@mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) (simplPredType (ordinal (S (@pred_Nirr gT (@gval gT G))))) (@irr_constt gT (@gval gT G) psiG))) *) by rewrite irr_consttE dot_psiG irr1_neq0. (* Goal: and4 (forall b : ordinal (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))), is_true (@in_mem (GRing.Ring.sort (@cfun_ringType gT (@gval gT G))) (@GRing.mul (@cfun_ringType gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (@mod_Iirr gT G N b)) 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))))) (@injective (ordinal (S (@pred_Nirr gT (@gval gT G)))) (ordinal (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))))) mul_mod_Iirr) (@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 gT (@gval gT G) (@cfInd gT (@gval gT G) (@gval gT N) theta))) (@mem (Equality.sort (ordinal_eqType (S (@pred_Nirr gT (@gval gT G))))) (seq_predType (ordinal_eqType (S (@pred_Nirr gT (@gval gT G))))) (@codom (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))))) (ordinal (S (@pred_Nirr gT (@gval gT G)))) mul_mod_Iirr))) (@eq (@classfun gT (@gval gT G)) (@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 b : 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))))) b (@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))))) b (@mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) (simplPredType (ordinal (S (@pred_Nirr gT (@gval gT G))))) (@irr_constt gT (@gval gT G) psiG))) (@GRing.scale (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@cfun_lmodType gT (@gval gT G)) (@cfdot gT (@gval gT G) psiG (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) b)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (mul_Iirr b))))) (@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 (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))))) (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 (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))))) (fun b : Finite.sort (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))))) => @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 (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))))) b (@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 (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)) (@tnth (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))) (@classfun (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))) (@irr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))) b) (oneg (FinGroup.base (@coset_groupType gT (@gval gT N))))) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (mul_mod_Iirr b)))))) *) have constt_psiG b: (b \in irr_constt psiG) = (N \subset cfker 'chi_b). (* Goal: and4 (forall b : ordinal (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))), is_true (@in_mem (GRing.Ring.sort (@cfun_ringType gT (@gval gT G))) (@GRing.mul (@cfun_ringType gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (@mod_Iirr gT G N b)) 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))))) (@injective (ordinal (S (@pred_Nirr gT (@gval gT G)))) (ordinal (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))))) mul_mod_Iirr) (@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 gT (@gval gT G) (@cfInd gT (@gval gT G) (@gval gT N) theta))) (@mem (Equality.sort (ordinal_eqType (S (@pred_Nirr gT (@gval gT G))))) (seq_predType (ordinal_eqType (S (@pred_Nirr gT (@gval gT G))))) (@codom (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))))) (ordinal (S (@pred_Nirr gT (@gval gT G)))) mul_mod_Iirr))) (@eq (@classfun gT (@gval gT G)) (@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 b : 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))))) b (@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))))) b (@mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) (simplPredType (ordinal (S (@pred_Nirr gT (@gval gT G))))) (@irr_constt gT (@gval gT G) psiG))) (@GRing.scale (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@cfun_lmodType gT (@gval gT G)) (@cfdot gT (@gval gT G) psiG (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) b)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (mul_Iirr b))))) (@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 (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))))) (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 (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))))) (fun b : Finite.sort (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))))) => @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 (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))))) b (@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 (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)) (@tnth (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))) (@classfun (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))) (@irr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))) b) (oneg (FinGroup.base (@coset_groupType gT (@gval gT N))))) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (mul_mod_Iirr b)))))) *) (* Goal: @eq bool (@in_mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) b (@mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) (simplPredType (ordinal (S (@pred_Nirr gT (@gval gT G))))) (@irr_constt gT (@gval gT G) psiG))) (@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 N))) (@mem (Finite.sort (FinGroup.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)) b))))) *) apply/idP/idP=> [psiGb | /quo_IirrK <- //]. (* Goal: and4 (forall b : ordinal (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))), is_true (@in_mem (GRing.Ring.sort (@cfun_ringType gT (@gval gT G))) (@GRing.mul (@cfun_ringType gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (@mod_Iirr gT G N b)) 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))))) (@injective (ordinal (S (@pred_Nirr gT (@gval gT G)))) (ordinal (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))))) mul_mod_Iirr) (@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 gT (@gval gT G) (@cfInd gT (@gval gT G) (@gval gT N) theta))) (@mem (Equality.sort (ordinal_eqType (S (@pred_Nirr gT (@gval gT G))))) (seq_predType (ordinal_eqType (S (@pred_Nirr gT (@gval gT G))))) (@codom (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))))) (ordinal (S (@pred_Nirr gT (@gval gT G)))) mul_mod_Iirr))) (@eq (@classfun gT (@gval gT G)) (@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 b : 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))))) b (@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))))) b (@mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) (simplPredType (ordinal (S (@pred_Nirr gT (@gval gT G))))) (@irr_constt gT (@gval gT G) psiG))) (@GRing.scale (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@cfun_lmodType gT (@gval gT G)) (@cfdot gT (@gval gT G) psiG (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) b)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (mul_Iirr b))))) (@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 (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))))) (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 (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))))) (fun b : Finite.sort (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))))) => @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 (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))))) b (@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 (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)) (@tnth (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))) (@classfun (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))) (@irr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))) b) (oneg (FinGroup.base (@coset_groupType gT (@gval gT N))))) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (mul_mod_Iirr b)))))) *) (* 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 N))) (@mem (Finite.sort (FinGroup.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)) b))))) *) by rewrite constt0_Res_cfker // -constt_Ind_Res irr0. (* Goal: and4 (forall b : ordinal (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))), is_true (@in_mem (GRing.Ring.sort (@cfun_ringType gT (@gval gT G))) (@GRing.mul (@cfun_ringType gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (@mod_Iirr gT G N b)) 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))))) (@injective (ordinal (S (@pred_Nirr gT (@gval gT G)))) (ordinal (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))))) mul_mod_Iirr) (@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 gT (@gval gT G) (@cfInd gT (@gval gT G) (@gval gT N) theta))) (@mem (Equality.sort (ordinal_eqType (S (@pred_Nirr gT (@gval gT G))))) (seq_predType (ordinal_eqType (S (@pred_Nirr gT (@gval gT G))))) (@codom (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))))) (ordinal (S (@pred_Nirr gT (@gval gT G)))) mul_mod_Iirr))) (@eq (@classfun gT (@gval gT G)) (@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 b : 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))))) b (@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))))) b (@mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) (simplPredType (ordinal (S (@pred_Nirr gT (@gval gT G))))) (@irr_constt gT (@gval gT G) psiG))) (@GRing.scale (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@cfun_lmodType gT (@gval gT G)) (@cfdot gT (@gval gT G) psiG (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) b)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (mul_Iirr b))))) (@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 (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))))) (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 (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))))) (fun b : Finite.sort (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))))) => @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 (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))))) b (@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 (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)) (@tnth (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))) (@classfun (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))) (@irr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))) b) (oneg (FinGroup.base (@coset_groupType gT (@gval gT N))))) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (mul_mod_Iirr b)))))) *) split=> [b | b g /injMchi/(can_inj (mod_IirrK nsNG))-> // | b0 | ]. (* Goal: @eq (@classfun gT (@gval gT G)) (@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 b : 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))))) b (@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))))) b (@mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) (simplPredType (ordinal (S (@pred_Nirr gT (@gval gT G))))) (@irr_constt gT (@gval gT G) psiG))) (@GRing.scale (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@cfun_lmodType gT (@gval gT G)) (@cfdot gT (@gval gT G) psiG (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) b)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (mul_Iirr b))))) (@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 (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))))) (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 (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))))) (fun b : Finite.sort (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))))) => @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 (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))))) b (@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 (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)) (@tnth (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))) (@classfun (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))) (@irr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))) b) (oneg (FinGroup.base (@coset_groupType gT (@gval gT N))))) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (mul_mod_Iirr b))))) *) (* Goal: @eq bool (@in_mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) b0 (@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 N) theta)))) (@in_mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) b0 (@mem (Equality.sort (ordinal_eqType (S (@pred_Nirr gT (@gval gT G))))) (seq_predType (ordinal_eqType (S (@pred_Nirr gT (@gval gT G))))) (@codom (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))))) (ordinal (S (@pred_Nirr gT (@gval gT G)))) mul_mod_Iirr))) *) (* Goal: is_true (@in_mem (GRing.Ring.sort (@cfun_ringType gT (@gval gT G))) (@GRing.mul (@cfun_ringType gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (@mod_Iirr gT G N b)) 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)))) *) - (* Goal: @eq (@classfun gT (@gval gT G)) (@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 b : 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))))) b (@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))))) b (@mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) (simplPredType (ordinal (S (@pred_Nirr gT (@gval gT G))))) (@irr_constt gT (@gval gT G) psiG))) (@GRing.scale (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@cfun_lmodType gT (@gval gT G)) (@cfdot gT (@gval gT G) psiG (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) b)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (mul_Iirr b))))) (@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 (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))))) (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 (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))))) (fun b : Finite.sort (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))))) => @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 (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))))) b (@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 (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)) (@tnth (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))) (@classfun (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))) (@irr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))) b) (oneg (FinGroup.base (@coset_groupType gT (@gval gT N))))) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (mul_mod_Iirr b))))) *) (* Goal: @eq bool (@in_mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) b0 (@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 N) theta)))) (@in_mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) b0 (@mem (Equality.sort (ordinal_eqType (S (@pred_Nirr gT (@gval gT G))))) (seq_predType (ordinal_eqType (S (@pred_Nirr gT (@gval gT G))))) (@codom (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))))) (ordinal (S (@pred_Nirr gT (@gval gT G)))) mul_mod_Iirr))) *) (* Goal: is_true (@in_mem (GRing.Ring.sort (@cfun_ringType gT (@gval gT G))) (@GRing.mul (@cfun_ringType gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (@mod_Iirr gT G N b)) 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)))) *) exact: irrMchi. (* Goal: @eq (@classfun gT (@gval gT G)) (@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 b : 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))))) b (@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))))) b (@mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) (simplPredType (ordinal (S (@pred_Nirr gT (@gval gT G))))) (@irr_constt gT (@gval gT G) psiG))) (@GRing.scale (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@cfun_lmodType gT (@gval gT G)) (@cfdot gT (@gval gT G) psiG (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) b)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (mul_Iirr b))))) (@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 (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))))) (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 (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))))) (fun b : Finite.sort (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))))) => @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 (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))))) b (@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 (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)) (@tnth (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))) (@classfun (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))) (@irr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))) b) (oneg (FinGroup.base (@coset_groupType gT (@gval gT N))))) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (mul_mod_Iirr b))))) *) (* Goal: @eq bool (@in_mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) b0 (@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 N) theta)))) (@in_mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) b0 (@mem (Equality.sort (ordinal_eqType (S (@pred_Nirr gT (@gval gT G))))) (seq_predType (ordinal_eqType (S (@pred_Nirr gT (@gval gT G))))) (@codom (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))))) (ordinal (S (@pred_Nirr gT (@gval gT G)))) mul_mod_Iirr))) *) - (* Goal: @eq (@classfun gT (@gval gT G)) (@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 b : 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))))) b (@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))))) b (@mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) (simplPredType (ordinal (S (@pred_Nirr gT (@gval gT G))))) (@irr_constt gT (@gval gT G) psiG))) (@GRing.scale (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@cfun_lmodType gT (@gval gT G)) (@cfdot gT (@gval gT G) psiG (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) b)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (mul_Iirr b))))) (@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 (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))))) (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 (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))))) (fun b : Finite.sort (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))))) => @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 (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))))) b (@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 (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)) (@tnth (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))) (@classfun (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))) (@irr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))) b) (oneg (FinGroup.base (@coset_groupType gT (@gval gT N))))) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (mul_mod_Iirr b))))) *) (* Goal: @eq bool (@in_mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) b0 (@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 N) theta)))) (@in_mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) b0 (@mem (Equality.sort (ordinal_eqType (S (@pred_Nirr gT (@gval gT G))))) (seq_predType (ordinal_eqType (S (@pred_Nirr gT (@gval gT G))))) (@codom (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))))) (ordinal (S (@pred_Nirr gT (@gval gT G)))) mul_mod_Iirr))) *) rewrite constt_theta. (* Goal: @eq (@classfun gT (@gval gT G)) (@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 b : 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))))) b (@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))))) b (@mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) (simplPredType (ordinal (S (@pred_Nirr gT (@gval gT G))))) (@irr_constt gT (@gval gT G) psiG))) (@GRing.scale (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@cfun_lmodType gT (@gval gT G)) (@cfdot gT (@gval gT G) psiG (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) b)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (mul_Iirr b))))) (@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 (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))))) (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 (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))))) (fun b : Finite.sort (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))))) => @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 (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))))) b (@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 (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)) (@tnth (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))) (@classfun (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))) (@irr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))) b) (oneg (FinGroup.base (@coset_groupType gT (@gval gT N))))) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (mul_mod_Iirr b))))) *) (* Goal: @eq bool (@in_mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) b0 (@mem (Equality.sort (ordinal_eqType (S (@pred_Nirr gT (@gval gT G))))) (seq_predType (ordinal_eqType (S (@pred_Nirr gT (@gval gT G))))) (@image_mem (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) (ordinal (S (@pred_Nirr gT (@gval gT G)))) (fun b : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => mul_Iirr b) (@mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) (simplPredType (ordinal (S (@pred_Nirr gT (@gval gT G))))) (@irr_constt gT (@gval gT G) psiG))))) (@in_mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) b0 (@mem (Equality.sort (ordinal_eqType (S (@pred_Nirr gT (@gval gT G))))) (seq_predType (ordinal_eqType (S (@pred_Nirr gT (@gval gT G))))) (@codom (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))))) (ordinal (S (@pred_Nirr gT (@gval gT G)))) mul_mod_Iirr))) *) apply/imageP/imageP=> [][b psiGb ->]; last by exists (mod_Iirr b). (* Goal: @eq (@classfun gT (@gval gT G)) (@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 b : 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))))) b (@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))))) b (@mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) (simplPredType (ordinal (S (@pred_Nirr gT (@gval gT G))))) (@irr_constt gT (@gval gT G) psiG))) (@GRing.scale (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@cfun_lmodType gT (@gval gT G)) (@cfdot gT (@gval gT G) psiG (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) b)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (mul_Iirr b))))) (@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 (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))))) (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 (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))))) (fun b : Finite.sort (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))))) => @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 (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))))) b (@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 (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)) (@tnth (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))) (@classfun (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))) (@irr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))) b) (oneg (FinGroup.base (@coset_groupType gT (@gval gT N))))) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (mul_mod_Iirr b))))) *) (* Goal: @ex2 (Finite.sort (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))))) (fun x : Finite.sort (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))))) => is_true (@in_mem (Finite.sort (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))))) x (@mem (Finite.sort (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))))) (predPredType (Finite.sort (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))))))) (@sort_of_simpl_pred (Equality.sort (Finite.eqType (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))))))) (pred_of_argType (Equality.sort (Finite.eqType (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))))))))))) (fun x : Finite.sort (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))))) => @eq (Equality.sort (ordinal_eqType (S (@pred_Nirr gT (@gval gT G))))) (mul_Iirr b) (mul_mod_Iirr x)) *) by exists (quo_Iirr N b) => //; rewrite /mul_mod_Iirr quo_IirrK -?constt_psiG. (* Goal: @eq (@classfun gT (@gval gT G)) (@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 b : 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))))) b (@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))))) b (@mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) (simplPredType (ordinal (S (@pred_Nirr gT (@gval gT G))))) (@irr_constt gT (@gval gT G) psiG))) (@GRing.scale (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@cfun_lmodType gT (@gval gT G)) (@cfdot gT (@gval gT G) psiG (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) b)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (mul_Iirr b))))) (@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 (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))))) (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 (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))))) (fun b : Finite.sort (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))))) => @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 (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))))) b (@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 (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)) (@tnth (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))) (@classfun (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))) (@irr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))) b) (oneg (FinGroup.base (@coset_groupType gT (@gval gT N))))) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (mul_mod_Iirr b))))) *) rewrite (reindex_onto _ _ (in1W (mod_IirrK nsNG))) /=. (* Goal: @eq (@classfun 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 b : ordinal (S (@pred_Nirr gT (@gval gT G))) => @BigBody (@classfun gT (@gval gT G)) (ordinal (S (@pred_Nirr gT (@gval gT G)))) b (@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)))) b (@mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) (simplPredType (ordinal (S (@pred_Nirr gT (@gval gT G))))) (@irr_constt gT (@gval gT G) psiG))) (@GRing.scale (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@cfun_lmodType gT (@gval gT G)) (@cfdot gT (@gval gT G) psiG (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) b)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (mul_Iirr b))))) (@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 j : ordinal (S (@pred_Nirr gT (@gval gT G))) => @BigBody (@classfun gT (@gval gT G)) (ordinal (S (@pred_Nirr gT (@gval gT G)))) j (@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 (Finite.eqType (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (@mod_Iirr gT G N (@quo_Iirr gT G N j)) j) (@GRing.scale Algebraics.Implementation.ringType (@cfun_lmodType gT (@gval gT G)) (@fun_of_cfun (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)) (@tnth (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))) (@classfun (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))) (@irr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))) (@quo_Iirr gT G N j)) (oneg (@coset_baseGroupType gT (@gval gT N)))) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (mul_mod_Iirr (@quo_Iirr gT G N j)))))) *) apply/esym/eq_big => b; first by rewrite constt_psiG quo_IirrKeq. (* Goal: forall _ : is_true (@eq_op (Finite.eqType (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (@mod_Iirr gT G N (@quo_Iirr gT G N b)) b), @eq (@classfun gT (@gval gT G)) (@GRing.scale Algebraics.Implementation.ringType (@cfun_lmodType gT (@gval gT G)) (@fun_of_cfun (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)) (@tnth (S (@pred_Nirr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))) (@classfun (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))) (@irr (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N))) (@quo_Iirr gT G N b)) (oneg (@coset_baseGroupType gT (@gval gT N)))) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (mul_mod_Iirr (@quo_Iirr gT G N b)))) (@GRing.scale (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@cfun_lmodType gT (@gval gT G)) (@cfdot gT (@gval gT G) psiG (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) b)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (mul_Iirr b))) *) by rewrite -dot_psiG /mul_mod_Iirr => /eqP->. Qed. End ConsttIndExtendible. Theorem invariant_chief_irr_cases G K L s (theta := 'chi[K]_s) : chief_factor G L K -> abelian (K / L) -> G \subset 'I[theta] -> let t := #|K : L| in [\/ 'Res[L] theta \in irr L, exists2 e, exists p, 'Res[L] theta = e%:R *: 'chi_p & (e ^ 2)%N = t | exists2 p, injective p & 'Res[L] theta = \sum_(i < t) 'chi_(p i)]. Corollary cfRes_prime_irr_cases G N s p (chi := 'chi[G]_s) : N <| G -> #|G : N| = p -> prime p -> [\/ 'Res[N] chi \in irr N | exists2 c, injective c & 'Res[N] chi = \sum_(i < p) 'chi_(c i)]. Corollary prime_invariant_irr_extendible G N s p : N <| G -> #|G : N| = p -> prime p -> G \subset 'I['chi_s] -> {t | 'Res[N, G] 'chi_t = 'chi_s}. Proof. (* Goal: forall (_ : is_true (@normal gT (@gval gT N) (@gval gT G))) (_ : @eq nat (@indexg gT (@gval gT G) (@gval gT N)) p) (_ : is_true (prime p)) (_ : 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)) (@inertia gT (@gval gT N) (@tnth (S (@pred_Nirr gT (@gval gT N))) (@classfun gT (@gval gT N)) (@irr gT (@gval gT N)) s)))))), @sig (ordinal (S (@pred_Nirr gT (@gval gT G)))) (fun t : ordinal (S (@pred_Nirr gT (@gval gT G))) => @eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) t)) (@tnth (S (@pred_Nirr gT (@gval gT N))) (@classfun gT (@gval gT N)) (@irr gT (@gval gT N)) s)) *) move=> nsNG iGN pr_p IGchi. (* Goal: @sig (ordinal (S (@pred_Nirr gT (@gval gT G)))) (fun t : ordinal (S (@pred_Nirr gT (@gval gT G))) => @eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) t)) (@tnth (S (@pred_Nirr gT (@gval gT N))) (@classfun gT (@gval gT N)) (@irr gT (@gval gT N)) s)) *) have [t sGt] := constt_cfInd_irr s (normal_sub nsNG); exists t. (* Goal: @eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) t)) (@tnth (S (@pred_Nirr gT (@gval gT N))) (@classfun gT (@gval gT N)) (@irr gT (@gval gT N)) s) *) have [e DtN]: exists e, 'Res 'chi_t = e%:R *: 'chi_s. (* Goal: @eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) t)) (@tnth (S (@pred_Nirr gT (@gval gT N))) (@classfun gT (@gval gT N)) (@irr gT (@gval gT N)) s) *) (* Goal: @ex nat (fun e : nat => @eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) t)) (@GRing.scale Algebraics.Implementation.ringType (@cfun_lmodType gT (@gval gT N)) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) e) (@tnth (S (@pred_Nirr gT (@gval gT N))) (@classfun gT (@gval gT N)) (@irr gT (@gval gT N)) s))) *) rewrite constt_Ind_Res in sGt. (* Goal: @eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) t)) (@tnth (S (@pred_Nirr gT (@gval gT N))) (@classfun gT (@gval gT N)) (@irr gT (@gval gT N)) s) *) (* Goal: @ex nat (fun e : nat => @eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) t)) (@GRing.scale Algebraics.Implementation.ringType (@cfun_lmodType gT (@gval gT N)) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) e) (@tnth (S (@pred_Nirr gT (@gval gT N))) (@classfun gT (@gval gT N)) (@irr gT (@gval gT N)) s))) *) rewrite (Clifford_Res_sum_cfclass nsNG sGt); set e := '[_, _]. (* Goal: @eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) t)) (@tnth (S (@pred_Nirr gT (@gval gT N))) (@classfun gT (@gval gT N)) (@irr gT (@gval gT N)) s) *) (* Goal: @ex nat (fun e0 : nat => @eq (@classfun gT (@gval gT N)) (@GRing.scale (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@cfun_lmodType gT (@gval gT N)) e (@BigOp.bigop (GRing.Zmodule.sort (@cfun_zmodType gT (@gval gT N))) (@classfun gT (@gval gT N)) (GRing.zero (@cfun_zmodType gT (@gval gT N))) (@cfclass gT (@gval gT N) (@tnth (S (@pred_Nirr gT (@gval gT N))) (@classfun gT (@gval gT N)) (@irr gT (@gval gT N)) s) (@gval gT G)) (fun chi : @classfun gT (@gval gT N) => @BigBody (GRing.Zmodule.sort (@cfun_zmodType gT (@gval gT N))) (@classfun gT (@gval gT N)) chi (@GRing.add (@cfun_zmodType gT (@gval gT N))) true chi))) (@GRing.scale Algebraics.Implementation.ringType (@cfun_lmodType gT (@gval gT N)) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) e0) (@tnth (S (@pred_Nirr gT (@gval gT N))) (@classfun gT (@gval gT N)) (@irr gT (@gval gT N)) s))) *) rewrite cfclass_invariant // big_seq1. (* Goal: @eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) t)) (@tnth (S (@pred_Nirr gT (@gval gT N))) (@classfun gT (@gval gT N)) (@irr gT (@gval gT N)) s) *) (* Goal: @ex nat (fun e0 : nat => @eq (@classfun gT (@gval gT N)) (@GRing.scale (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@cfun_lmodType gT (@gval gT N)) e (@tnth (S (@pred_Nirr gT (@gval gT N))) (@classfun gT (@gval gT N)) (@irr gT (@gval gT N)) s)) (@GRing.scale Algebraics.Implementation.ringType (@cfun_lmodType gT (@gval gT N)) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) e0) (@tnth (S (@pred_Nirr gT (@gval gT N))) (@classfun gT (@gval gT N)) (@irr gT (@gval gT N)) s))) *) by exists (truncC e); rewrite truncCK ?Cnat_cfdot_char ?cfRes_char ?irr_char. (* Goal: @eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) t)) (@tnth (S (@pred_Nirr gT (@gval gT N))) (@classfun gT (@gval gT N)) (@irr gT (@gval gT N)) s) *) have [/irrWnorm/eqP | [c injc DtNc]] := cfRes_prime_irr_cases t nsNG iGN pr_p. (* Goal: @eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) t)) (@tnth (S (@pred_Nirr gT (@gval gT N))) (@classfun gT (@gval gT N)) (@irr gT (@gval gT N)) s) *) (* Goal: forall _ : is_true (@eq_op (GRing.Ring.eqType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (@cfdot gT (@gval gT N) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) t)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) t))) (GRing.one (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType))), @eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) t)) (@tnth (S (@pred_Nirr gT (@gval gT N))) (@classfun gT (@gval gT N)) (@irr gT (@gval gT N)) s) *) rewrite DtN cfnormZ cfnorm_irr normr_nat mulr1 -natrX pnatr_eq1. (* Goal: @eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) t)) (@tnth (S (@pred_Nirr gT (@gval gT N))) (@classfun gT (@gval gT N)) (@irr gT (@gval gT N)) s) *) (* Goal: forall _ : is_true (@eq_op nat_eqType (expn e (S (S O))) (S O)), @eq (@classfun gT (@gval gT N)) (@GRing.scale Algebraics.Implementation.ringType (@cfun_lmodType gT (@gval gT N)) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) e) (@tnth (S (@pred_Nirr gT (@gval gT N))) (@classfun gT (@gval gT N)) (@irr gT (@gval gT N)) s)) (@tnth (S (@pred_Nirr gT (@gval gT N))) (@classfun gT (@gval gT N)) (@irr gT (@gval gT N)) s) *) by rewrite muln_eq1 andbb => /eqP->; rewrite scale1r. (* Goal: @eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) t)) (@tnth (S (@pred_Nirr gT (@gval gT N))) (@classfun gT (@gval gT N)) (@irr gT (@gval gT N)) s) *) have nz_e: e != 0%N. (* Goal: @eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) t)) (@tnth (S (@pred_Nirr gT (@gval gT N))) (@classfun gT (@gval gT N)) (@irr gT (@gval gT N)) s) *) (* Goal: is_true (negb (@eq_op nat_eqType e O)) *) have: 'Res[N] 'chi_t != 0 by rewrite cfRes_eq0 // ?irr_char ?irr_neq0. (* Goal: @eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) t)) (@tnth (S (@pred_Nirr gT (@gval gT N))) (@classfun gT (@gval gT N)) (@irr gT (@gval gT N)) s) *) (* Goal: forall _ : is_true (negb (@eq_op (@cfun_eqType gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) t)) (GRing.zero (@cfun_zmodType gT (@gval gT N))))), is_true (negb (@eq_op nat_eqType e O)) *) by rewrite DtN; apply: contraNneq => ->; rewrite scale0r. (* Goal: @eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) t)) (@tnth (S (@pred_Nirr gT (@gval gT N))) (@classfun gT (@gval gT N)) (@irr gT (@gval gT N)) s) *) have [i s'ci]: exists i, c i != s. (* Goal: @eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) t)) (@tnth (S (@pred_Nirr gT (@gval gT N))) (@classfun gT (@gval gT N)) (@irr gT (@gval gT N)) s) *) (* Goal: @ex (ordinal p) (fun i : ordinal p => is_true (negb (@eq_op (ordinal_eqType (S (@pred_Nirr gT (@gval gT N)))) (c i) s))) *) pose i0 := Ordinal (prime_gt0 pr_p); pose i1 := Ordinal (prime_gt1 pr_p). (* Goal: @eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) t)) (@tnth (S (@pred_Nirr gT (@gval gT N))) (@classfun gT (@gval gT N)) (@irr gT (@gval gT N)) s) *) (* Goal: @ex (ordinal p) (fun i : ordinal p => is_true (negb (@eq_op (ordinal_eqType (S (@pred_Nirr gT (@gval gT N)))) (c i) s))) *) have [<- | ] := eqVneq (c i0) s; last by exists i0. (* Goal: @eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) t)) (@tnth (S (@pred_Nirr gT (@gval gT N))) (@classfun gT (@gval gT N)) (@irr gT (@gval gT N)) s) *) (* Goal: @ex (ordinal p) (fun i : ordinal p => is_true (negb (@eq_op (ordinal_eqType (S (@pred_Nirr gT (@gval gT N)))) (c i) (c i0)))) *) by exists i1; rewrite (inj_eq injc). (* Goal: @eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) t)) (@tnth (S (@pred_Nirr gT (@gval gT N))) (@classfun gT (@gval gT N)) (@irr gT (@gval gT N)) s) *) have /esym/eqP/idPn[] := congr1 (cfdotr 'chi_(c i)) DtNc; rewrite {1}DtN /=. (* Goal: is_true (negb (@eq_op (GRing.Ring.eqType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (@cfdot gT (@gval gT N) (@BigOp.bigop (@classfun gT (@gval gT N)) (ordinal p) (GRing.zero (@cfun_zmodType gT (@gval gT N))) (index_enum (ordinal_finType p)) (fun i : ordinal p => @BigBody (@classfun gT (@gval gT N)) (ordinal p) i (@GRing.add (@cfun_zmodType gT (@gval gT N))) true (@tnth (S (@pred_Nirr gT (@gval gT N))) (@classfun gT (@gval gT N)) (@irr gT (@gval gT N)) (c i)))) (@tnth (S (@pred_Nirr gT (@gval gT N))) (@classfun gT (@gval gT N)) (@irr gT (@gval gT N)) (c i))) (@cfdot gT (@gval gT N) (@GRing.scale Algebraics.Implementation.ringType (@cfun_lmodType gT (@gval gT N)) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) e) (@tnth (S (@pred_Nirr gT (@gval gT N))) (@classfun gT (@gval gT N)) (@irr gT (@gval gT N)) s)) (@tnth (S (@pred_Nirr gT (@gval gT N))) (@classfun gT (@gval gT N)) (@irr gT (@gval gT N)) (c i))))) *) rewrite cfdot_suml cfdotZl cfdot_irr mulrb ifN_eqC // mulr0. (* Goal: is_true (negb (@eq_op (GRing.Ring.eqType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType))) (ordinal p) (GRing.zero (GRing.Ring.zmodType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType))) (index_enum (ordinal_finType p)) (fun i0 : ordinal p => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType))) (ordinal p) i0 (@GRing.add (GRing.Ring.zmodType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType))) true (@cfdot gT (@gval gT N) (@tnth (S (@pred_Nirr gT (@gval gT N))) (@classfun gT (@gval gT N)) (@irr gT (@gval gT N)) (c i0)) (@tnth (S (@pred_Nirr gT (@gval gT N))) (@classfun gT (@gval gT N)) (@irr gT (@gval gT N)) (c i))))) (GRing.zero (GRing.Ring.zmodType Algebraics.Implementation.ringType)))) *) rewrite (bigD1 i) //= cfnorm_irr big1 ?addr0 ?oner_eq0 // => j i'j. (* Goal: @eq Algebraics.Implementation.type (@cfdot gT (@gval gT N) (@tnth (S (@pred_Nirr gT (@gval gT N))) (@classfun gT (@gval gT N)) (@irr gT (@gval gT N)) (c j)) (@tnth (S (@pred_Nirr gT (@gval gT N))) (@classfun gT (@gval gT N)) (@irr gT (@gval gT N)) (c i))) (GRing.zero (GRing.Ring.zmodType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType))) *) by rewrite cfdot_irr mulrb ifN_eq ?(inj_eq injc). Qed. Lemma extend_to_cfdet G N s c0 u : let theta := 'chi_s in let lambda := cfDet theta in let mu := 'chi_u in N <| G -> coprime #|G : N| (truncC (theta 1%g)) -> 'Res[N, G] 'chi_c0 = theta -> 'Res[N, G] mu = lambda -> exists2 c, 'Res 'chi_c = theta /\ cfDet 'chi_c = mu & forall c1, 'Res 'chi_c1 = theta -> cfDet 'chi_c1 = mu -> c1 = c. Theorem solvable_irr_extendible_from_det G N s (theta := 'chi[N]_s) : N <| G -> solvable (G / N) -> G \subset 'I[theta] -> coprime #|G : N| (truncC (theta 1%g)) -> [exists c, 'Res 'chi[G]_c == theta] = [exists u, 'Res 'chi[G]_u == cfDet theta]. Proof. (* Goal: forall (_ : is_true (@normal gT (@gval gT N) (@gval gT G))) (_ : is_true (@solvable (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))) (_ : 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)) (@inertia gT (@gval gT N) theta))))) (_ : is_true (coprime (@indexg gT (@gval gT G) (@gval gT N)) (truncC (@fun_of_cfun gT (@gval gT N) theta (oneg (FinGroup.base gT)))))), @eq bool (negb (@FiniteQuant.quant0b (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) (fun c : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @FiniteQuant.ex (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) (FiniteQuant.Quantified (@eq_op (@cfun_eqType gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) c)) theta)) c))) (negb (@FiniteQuant.quant0b (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) (fun u : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @FiniteQuant.ex (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) (FiniteQuant.Quantified (@eq_op (@cfun_eqType gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) u)) (@cfDet gT N theta))) u))) *) set e := #|G : N|; set f := truncC _ => nsNG solG IGtheta co_e_f. (* Goal: @eq bool (negb (@FiniteQuant.quant0b (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) (fun c : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @FiniteQuant.ex (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) (FiniteQuant.Quantified (@eq_op (@cfun_eqType gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) c)) theta)) c))) (negb (@FiniteQuant.quant0b (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) (fun u : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @FiniteQuant.ex (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) (FiniteQuant.Quantified (@eq_op (@cfun_eqType gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) u)) (@cfDet gT N theta))) u))) *) apply/exists_eqP/exists_eqP=> [[c cNth] | [u uNdth]]. (* Goal: @ex (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun x : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @eq (Equality.sort (@cfun_eqType gT (@gval gT N))) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) x)) theta) *) (* Goal: @ex (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun x : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @eq (Equality.sort (@cfun_eqType gT (@gval gT N))) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) x)) (@cfDet gT N theta)) *) have /lin_char_irr/irrP[u Du] := cfDet_lin_char 'chi_c. (* Goal: @ex (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun x : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @eq (Equality.sort (@cfun_eqType gT (@gval gT N))) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) x)) theta) *) (* Goal: @ex (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun x : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @eq (Equality.sort (@cfun_eqType gT (@gval gT N))) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) x)) (@cfDet gT N theta)) *) by exists u; rewrite -Du -cfDetRes ?irr_char ?cNth. (* Goal: @ex (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun x : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @eq (Equality.sort (@cfun_eqType gT (@gval gT N))) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) x)) theta) *) move: {2}e.+1 (ltnSn e) => m. (* Goal: forall _ : is_true (leq (S e) m), @ex (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun x : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @eq (Equality.sort (@cfun_eqType gT (@gval gT N))) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) x)) theta) *) elim: m => // m IHm in G u e nsNG solG IGtheta co_e_f uNdth *. rewrite ltnS => le_e; have [sNG nNG] := andP nsNG. have [<- | ltNG] := eqsVneq N G; first by exists s; rewrite cfRes_id. (* Goal: forall _ : is_true (leq (S e) m), @ex (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun x : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @eq (Equality.sort (@cfun_eqType gT (@gval gT N))) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) x)) theta) *) have [G0 maxG0 sNG0]: {G0 | maxnormal (gval G0) G G & N \subset G0}. (* Goal: forall _ : is_true (leq (S e) m), @ex (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun x : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @eq (Equality.sort (@cfun_eqType gT (@gval gT N))) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) x)) theta) *) (* Goal: @sig2 (group_type gT) (fun G0 : group_type gT => is_true (@maxnormal gT (@gval gT G0) (@gval gT G) (@gval gT G))) (fun G0 : group_type 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 N))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G0))))) *) by apply: maxgroup_exists; rewrite properEneq ltNG sNG. have [/andP[ltG0G nG0G] maxG0_P] := maxgroupP maxG0. set mu := 'chi_u in uNdth; have lin_mu: mu \is a linear_char. (* Goal: forall _ : is_true (leq (S e) m), @ex (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun x : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @eq (Equality.sort (@cfun_eqType gT (@gval gT N))) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) x)) theta) *) (* Goal: @sig2 (group_type gT) (fun G0 : group_type gT => is_true (@maxnormal gT (@gval gT G0) (@gval gT G) (@gval gT G))) (fun G0 : group_type 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 N))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G0))))) *) (* Goal: is_true (@in_mem (@classfun gT (@gval gT G)) mu (@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 -(cfRes1 N) uNdth /= lin_char1 ?cfDet_lin_char. (* Goal: forall _ : is_true (leq (S e) m), @ex (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun x : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @eq (Equality.sort (@cfun_eqType gT (@gval gT N))) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) x)) theta) *) (* Goal: @sig2 (group_type gT) (fun G0 : group_type gT => is_true (@maxnormal gT (@gval gT G0) (@gval gT G) (@gval gT G))) (fun G0 : group_type 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 N))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G0))))) *) have sG0G := proper_sub ltG0G; have nsNG0 := normalS sNG0 sG0G nsNG. have nsG0G: G0 <| G by apply/andP. have /lin_char_irr/irrP[u0 Du0] := cfRes_lin_char G0 lin_mu. have u0Ndth: 'Res 'chi_u0 = cfDet theta by rewrite -Du0 cfResRes. have IG0theta: G0 \subset 'I[theta]. by rewrite (subset_trans sG0G) // -IGtheta subsetIr. have coG0f: coprime #|G0 : N| f by rewrite (coprime_dvdl _ co_e_f) ?indexSg. have{m IHm le_e} [c0 c0Ns]: exists c0, 'Res 'chi[G0]_c0 = theta. have solG0: solvable (G0 / N) := solvableS (quotientS N sG0G) solG. apply: IHm nsNG0 solG0 IG0theta coG0f u0Ndth (leq_trans _ le_e). by rewrite -(ltn_pmul2l (cardG_gt0 N)) !Lagrange ?proper_card. have{c0 c0Ns} [c0 [c0Ns dc0_u0] Uc0] := extend_to_cfdet nsNG0 coG0f c0Ns u0Ndth. have IGc0: G \subset 'I['chi_c0]. apply/subsetP=> x Gx; rewrite inE (subsetP nG0G) //= -conjg_IirrE. apply/eqP; congr 'chi__; apply: Uc0; rewrite conjg_IirrE. by rewrite -(cfConjgRes _ nsG0G nsNG) // c0Ns inertiaJ ?(subsetP IGtheta). by rewrite cfDetConjg dc0_u0 -Du0 (cfConjgRes _ _ nsG0G) // cfConjg_id. have prG0G: prime #|G : G0|. have [h injh im_h] := third_isom sNG0 nsNG nsG0G. rewrite -card_quotient // -im_h // card_injm //. rewrite simple_sol_prime 1?quotient_sol //. by rewrite /simple -(injm_minnormal injh) // im_h // maxnormal_minnormal. have [t tG0c0] := prime_invariant_irr_extendible nsG0G (erefl _) prG0G IGc0. by exists t; rewrite /theta -c0Ns -tG0c0 cfResRes. Qed. Qed. Theorem extend_linear_char_from_Sylow G N (lambda : 'CF(N)) : N <| G -> lambda \is a linear_char -> G \subset 'I[lambda] -> (forall p, p \in \pi('o(lambda)%CF) -> exists2 Hp : {group gT}, [/\ N \subset Hp, Hp \subset G & p.-Sylow(G / N) (Hp / N)%g] Corollary extend_coprime_linear_char G N (lambda : 'CF(N)) : N <| G -> lambda \is a linear_char -> G \subset 'I[lambda] -> coprime #|G : N| 'o(lambda)%CF -> exists u, [/\ 'Res 'chi[G]_u = lambda, 'o('chi_u)%CF = 'o(lambda)%CF & forall v, 'Res 'chi_v = lambda -> coprime #|G : N| 'o('chi_v)%CF -> v = u]. Proof. (* Goal: forall (_ : is_true (@normal gT (@gval gT N) (@gval gT G))) (_ : is_true (@in_mem (@classfun gT (@gval gT N)) lambda (@mem (@classfun gT (@gval gT N)) (predPredType (@classfun gT (@gval gT N))) (@has_quality (S O) (@classfun gT (@gval gT N)) (@linear_char gT (@gval gT N)))))) (_ : 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)) (@inertia gT (@gval gT N) lambda))))) (_ : is_true (coprime (@indexg gT (@gval gT G) (@gval gT N)) (@cfDet_order gT N lambda))), @ex (ordinal (S (@pred_Nirr gT (@gval gT G)))) (fun u : ordinal (S (@pred_Nirr gT (@gval gT G))) => and3 (@eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) u)) lambda) (@eq nat (@cfDet_order gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) u)) (@cfDet_order gT N lambda)) (forall (v : ordinal (S (@pred_Nirr gT (@gval gT G)))) (_ : @eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) v)) lambda) (_ : is_true (coprime (@indexg gT (@gval gT G) (@gval gT N)) (@cfDet_order gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) v)))), @eq (ordinal (S (@pred_Nirr gT (@gval gT G)))) v u)) *) set e := #|G : N| => nsNG lam_lin IGlam co_e_lam; have [sNG nNG] := andP nsNG. (* Goal: @ex (ordinal (S (@pred_Nirr gT (@gval gT G)))) (fun u : ordinal (S (@pred_Nirr gT (@gval gT G))) => and3 (@eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) u)) lambda) (@eq nat (@cfDet_order gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) u)) (@cfDet_order gT N lambda)) (forall (v : ordinal (S (@pred_Nirr gT (@gval gT G)))) (_ : @eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) v)) lambda) (_ : is_true (coprime e (@cfDet_order gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) v)))), @eq (ordinal (S (@pred_Nirr gT (@gval gT G)))) v u)) *) have [p lam_p | v vNlam] := extend_linear_char_from_Sylow nsNG lam_lin IGlam. (* Goal: @ex (ordinal (S (@pred_Nirr gT (@gval gT G)))) (fun u : ordinal (S (@pred_Nirr gT (@gval gT G))) => and3 (@eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) u)) lambda) (@eq nat (@cfDet_order gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) u)) (@cfDet_order gT N lambda)) (forall (v : ordinal (S (@pred_Nirr gT (@gval gT G)))) (_ : @eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) v)) lambda) (_ : is_true (coprime e (@cfDet_order gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) v)))), @eq (ordinal (S (@pred_Nirr gT (@gval gT G)))) v u)) *) (* Goal: @ex2 (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun Hp : @group_of gT (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)) (@gval gT N))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT Hp))))) (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 Hp))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.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 (@pHall (@coset_groupType gT (@gval gT N)) (nat_pred_of_nat p) (@quotient gT (@gval gT G) (@gval gT N)) (@quotient gT (@gval gT Hp) (@gval gT N))))) (fun Hp : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => @ex (ordinal (S (@pred_Nirr gT (@gval gT Hp)))) (fun u : ordinal (S (@pred_Nirr gT (@gval gT Hp))) => @eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT Hp) (@tnth (S (@pred_Nirr gT (@gval gT Hp))) (@classfun gT (@gval gT Hp)) (@irr gT (@gval gT Hp)) u)) lambda)) *) exists N; last first. (* Goal: @ex (ordinal (S (@pred_Nirr gT (@gval gT G)))) (fun u : ordinal (S (@pred_Nirr gT (@gval gT G))) => and3 (@eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) u)) lambda) (@eq nat (@cfDet_order gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) u)) (@cfDet_order gT N lambda)) (forall (v : ordinal (S (@pred_Nirr gT (@gval gT G)))) (_ : @eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) v)) lambda) (_ : is_true (coprime e (@cfDet_order gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) v)))), @eq (ordinal (S (@pred_Nirr gT (@gval gT G)))) v u)) *) (* 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)) (@gval gT N))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT N))))) (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 N))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.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 (@pHall (@coset_groupType gT (@gval gT N)) (nat_pred_of_nat p) (@quotient gT (@gval gT G) (@gval gT N)) (@quotient gT (@gval gT N) (@gval gT N)))) *) (* Goal: @ex (ordinal (S (@pred_Nirr gT (@gval gT N)))) (fun u : ordinal (S (@pred_Nirr gT (@gval gT N))) => @eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT N) (@tnth (S (@pred_Nirr gT (@gval gT N))) (@classfun gT (@gval gT N)) (@irr gT (@gval gT N)) u)) lambda) *) by have /irrP[u ->] := lin_char_irr lam_lin; exists u; rewrite cfRes_id. (* Goal: @ex (ordinal (S (@pred_Nirr gT (@gval gT G)))) (fun u : ordinal (S (@pred_Nirr gT (@gval gT G))) => and3 (@eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) u)) lambda) (@eq nat (@cfDet_order gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) u)) (@cfDet_order gT N lambda)) (forall (v : ordinal (S (@pred_Nirr gT (@gval gT G)))) (_ : @eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) v)) lambda) (_ : is_true (coprime e (@cfDet_order gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) v)))), @eq (ordinal (S (@pred_Nirr gT (@gval gT G)))) v u)) *) (* 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)) (@gval gT N))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT N))))) (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 N))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.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 (@pHall (@coset_groupType gT (@gval gT N)) (nat_pred_of_nat p) (@quotient gT (@gval gT G) (@gval gT N)) (@quotient gT (@gval gT N) (@gval gT N)))) *) split=> //; rewrite trivg_quotient /pHall sub1G pgroup1 indexg1. (* Goal: @ex (ordinal (S (@pred_Nirr gT (@gval gT G)))) (fun u : ordinal (S (@pred_Nirr gT (@gval gT G))) => and3 (@eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) u)) lambda) (@eq nat (@cfDet_order gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) u)) (@cfDet_order gT N lambda)) (forall (v : ordinal (S (@pred_Nirr gT (@gval gT G)))) (_ : @eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) v)) lambda) (_ : is_true (coprime e (@cfDet_order gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) v)))), @eq (ordinal (S (@pred_Nirr gT (@gval gT G)))) v u)) *) (* Goal: is_true (andb true (andb true (pnat (negn (nat_pred_of_nat p)) (@card (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT N)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT N))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT N)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT N)))) (@gval (@coset_groupType gT (@gval gT N)) (@quotient_group gT G (@gval gT N))))))))) *) rewrite card_quotient //= -/e (pi'_p'nat _ lam_p) //. (* Goal: @ex (ordinal (S (@pred_Nirr gT (@gval gT G)))) (fun u : ordinal (S (@pred_Nirr gT (@gval gT G))) => and3 (@eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) u)) lambda) (@eq nat (@cfDet_order gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) u)) (@cfDet_order gT N lambda)) (forall (v : ordinal (S (@pred_Nirr gT (@gval gT G)))) (_ : @eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) v)) lambda) (_ : is_true (coprime e (@cfDet_order gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) v)))), @eq (ordinal (S (@pred_Nirr gT (@gval gT G)))) v u)) *) (* Goal: is_true (pnat (negn (pi_of (@cfDet_order gT N lambda))) e) *) rewrite -coprime_pi' ?indexg_gt0 1?coprime_sym //. (* Goal: @ex (ordinal (S (@pred_Nirr gT (@gval gT G)))) (fun u : ordinal (S (@pred_Nirr gT (@gval gT G))) => and3 (@eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) u)) lambda) (@eq nat (@cfDet_order gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) u)) (@cfDet_order gT N lambda)) (forall (v : ordinal (S (@pred_Nirr gT (@gval gT G)))) (_ : @eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) v)) lambda) (_ : is_true (coprime e (@cfDet_order gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) v)))), @eq (ordinal (S (@pred_Nirr gT (@gval gT G)))) v u)) *) (* Goal: is_true (leq (S O) (@cfDet_order gT N lambda)) *) by have:= lam_p; rewrite mem_primes => /and3P[]. (* Goal: @ex (ordinal (S (@pred_Nirr gT (@gval gT G)))) (fun u : ordinal (S (@pred_Nirr gT (@gval gT G))) => and3 (@eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) u)) lambda) (@eq nat (@cfDet_order gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) u)) (@cfDet_order gT N lambda)) (forall (v : ordinal (S (@pred_Nirr gT (@gval gT G)))) (_ : @eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) v)) lambda) (_ : is_true (coprime e (@cfDet_order gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) v)))), @eq (ordinal (S (@pred_Nirr gT (@gval gT G)))) v u)) *) set nu := 'chi_v in vNlam. (* Goal: @ex (ordinal (S (@pred_Nirr gT (@gval gT G)))) (fun u : ordinal (S (@pred_Nirr gT (@gval gT G))) => and3 (@eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) u)) lambda) (@eq nat (@cfDet_order gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) u)) (@cfDet_order gT N lambda)) (forall (v : ordinal (S (@pred_Nirr gT (@gval gT G)))) (_ : @eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) v)) lambda) (_ : is_true (coprime e (@cfDet_order gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) v)))), @eq (ordinal (S (@pred_Nirr gT (@gval gT G)))) v u)) *) have lin_nu: nu \is a linear_char. (* Goal: @ex (ordinal (S (@pred_Nirr gT (@gval gT G)))) (fun u : ordinal (S (@pred_Nirr gT (@gval gT G))) => and3 (@eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) u)) lambda) (@eq nat (@cfDet_order gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) u)) (@cfDet_order gT N lambda)) (forall (v : ordinal (S (@pred_Nirr gT (@gval gT G)))) (_ : @eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) v)) lambda) (_ : is_true (coprime e (@cfDet_order gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) v)))), @eq (ordinal (S (@pred_Nirr gT (@gval gT G)))) v u)) *) (* Goal: is_true (@in_mem (@classfun gT (@gval gT G)) nu (@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 (@cfRes_lin_lin _ _ N) ?vNlam ?irr_char. (* Goal: @ex (ordinal (S (@pred_Nirr gT (@gval gT G)))) (fun u : ordinal (S (@pred_Nirr gT (@gval gT G))) => and3 (@eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) u)) lambda) (@eq nat (@cfDet_order gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) u)) (@cfDet_order gT N lambda)) (forall (v : ordinal (S (@pred_Nirr gT (@gval gT G)))) (_ : @eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) v)) lambda) (_ : is_true (coprime e (@cfDet_order gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) v)))), @eq (ordinal (S (@pred_Nirr gT (@gval gT G)))) v u)) *) have [b be_mod_lam]: exists b, b * e = 1 %[mod 'o(lambda)%CF]. (* Goal: @ex (ordinal (S (@pred_Nirr gT (@gval gT G)))) (fun u : ordinal (S (@pred_Nirr gT (@gval gT G))) => and3 (@eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) u)) lambda) (@eq nat (@cfDet_order gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) u)) (@cfDet_order gT N lambda)) (forall (v : ordinal (S (@pred_Nirr gT (@gval gT G)))) (_ : @eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) v)) lambda) (_ : is_true (coprime e (@cfDet_order gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) v)))), @eq (ordinal (S (@pred_Nirr gT (@gval gT G)))) v u)) *) (* Goal: @ex nat (fun b : nat => @eq nat (modn (muln b e) (@cfDet_order gT N lambda)) (modn (S O) (@cfDet_order gT N lambda))) *) rewrite -(chinese_modr co_e_lam 0 1) /chinese !mul0n !mul1n mulnC. (* Goal: @ex (ordinal (S (@pred_Nirr gT (@gval gT G)))) (fun u : ordinal (S (@pred_Nirr gT (@gval gT G))) => and3 (@eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) u)) lambda) (@eq nat (@cfDet_order gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) u)) (@cfDet_order gT N lambda)) (forall (v : ordinal (S (@pred_Nirr gT (@gval gT G)))) (_ : @eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) v)) lambda) (_ : is_true (coprime e (@cfDet_order gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) v)))), @eq (ordinal (S (@pred_Nirr gT (@gval gT G)))) v u)) *) (* Goal: @ex nat (fun b : nat => @eq nat (modn (muln b e) (@cfDet_order gT N lambda)) (modn (addn O (muln (@fst nat nat (egcdn e (@cfDet_order gT N lambda))) e)) (@cfDet_order gT N lambda))) *) by set b := _.1; exists b. (* Goal: @ex (ordinal (S (@pred_Nirr gT (@gval gT G)))) (fun u : ordinal (S (@pred_Nirr gT (@gval gT G))) => and3 (@eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) u)) lambda) (@eq nat (@cfDet_order gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) u)) (@cfDet_order gT N lambda)) (forall (v : ordinal (S (@pred_Nirr gT (@gval gT G)))) (_ : @eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) v)) lambda) (_ : is_true (coprime e (@cfDet_order gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) v)))), @eq (ordinal (S (@pred_Nirr gT (@gval gT G)))) v u)) *) have /irrP[u Du]: nu ^+ (b * e) \in irr G by rewrite lin_char_irr ?rpredX. (* Goal: @ex (ordinal (S (@pred_Nirr gT (@gval gT G)))) (fun u : ordinal (S (@pred_Nirr gT (@gval gT G))) => and3 (@eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) u)) lambda) (@eq nat (@cfDet_order gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) u)) (@cfDet_order gT N lambda)) (forall (v : ordinal (S (@pred_Nirr gT (@gval gT G)))) (_ : @eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) v)) lambda) (_ : is_true (coprime e (@cfDet_order gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) v)))), @eq (ordinal (S (@pred_Nirr gT (@gval gT G)))) v u)) *) exists u; set mu := 'chi_u in Du *. have uNlam: 'Res mu = lambda. rewrite cfDet_order_lin // in be_mod_lam. (* Goal: @ex (ordinal (S (@pred_Nirr gT (@gval gT G)))) (fun u : ordinal (S (@pred_Nirr gT (@gval gT G))) => and3 (@eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) u)) lambda) (@eq nat (@cfDet_order gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) u)) (@cfDet_order gT N lambda)) (forall (v : ordinal (S (@pred_Nirr gT (@gval gT G)))) (_ : @eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) v)) lambda) (_ : is_true (coprime e (@cfDet_order gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) v)))), @eq (ordinal (S (@pred_Nirr gT (@gval gT G)))) v u)) *) rewrite -Du rmorphX /= vNlam -(expr_mod _ (exp_cforder _)) //. by rewrite be_mod_lam expr_mod ?exp_cforder. have lin_mu: mu \is a linear_char by rewrite -Du rpredX. have o_mu: ('o(mu) = 'o(lambda))%CF. have dv_o_lam_mu: 'o(lambda)%CF %| 'o(mu)%CF. by rewrite !cfDet_order_lin // -uNlam cforder_Res. have kerNnu_olam: N \subset cfker (nu ^+ 'o(lambda)%CF). (* Goal: @ex (ordinal (S (@pred_Nirr gT (@gval gT G)))) (fun u : ordinal (S (@pred_Nirr gT (@gval gT G))) => and3 (@eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) u)) lambda) (@eq nat (@cfDet_order gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) u)) (@cfDet_order gT N lambda)) (forall (v : ordinal (S (@pred_Nirr gT (@gval gT G)))) (_ : @eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) v)) lambda) (_ : is_true (coprime e (@cfDet_order gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) v)))), @eq (ordinal (S (@pred_Nirr gT (@gval gT G)))) v u)) *) (* 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 N))) (@mem (Finite.sort (FinGroup.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) (@GRing.exp (@cfun_ringType gT (@gval gT G)) nu (@cfDet_order gT N lambda)))))) *) rewrite -subsetIidl -cfker_Res ?rpredX ?irr_char //. (* Goal: @ex (ordinal (S (@pred_Nirr gT (@gval gT G)))) (fun u : ordinal (S (@pred_Nirr gT (@gval gT G))) => and3 (@eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) u)) lambda) (@eq nat (@cfDet_order gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) u)) (@cfDet_order gT N lambda)) (forall (v : ordinal (S (@pred_Nirr gT (@gval gT G)))) (_ : @eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) v)) lambda) (_ : is_true (coprime e (@cfDet_order gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) v)))), @eq (ordinal (S (@pred_Nirr gT (@gval gT G)))) v u)) *) (* 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 N))) (@mem (Finite.sort (FinGroup.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 N) (@cfRes gT (@gval gT N) (@gval gT G) (@GRing.exp (@cfun_ringType gT (@gval gT G)) nu (@cfDet_order gT N lambda))))))) *) by rewrite rmorphX /= vNlam cfDet_order_lin // exp_cforder cfker_cfun1. (* Goal: @ex (ordinal (S (@pred_Nirr gT (@gval gT G)))) (fun u : ordinal (S (@pred_Nirr gT (@gval gT G))) => and3 (@eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) u)) lambda) (@eq nat (@cfDet_order gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) u)) (@cfDet_order gT N lambda)) (forall (v : ordinal (S (@pred_Nirr gT (@gval gT G)))) (_ : @eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) v)) lambda) (_ : is_true (coprime e (@cfDet_order gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) v)))), @eq (ordinal (S (@pred_Nirr gT (@gval gT G)))) v u)) *) apply/eqP; rewrite eqn_dvd dv_o_lam_mu andbT cfDet_order_lin //. rewrite dvdn_cforder -Du exprAC -dvdn_cforder dvdn_mull //. rewrite -(cfQuoK nsNG kerNnu_olam) cforder_mod // /e -card_quotient //. by rewrite cforder_lin_char_dvdG ?cfQuo_lin_char ?rpredX. split=> // t tNlam co_e_t. have lin_t: 'chi_t \is a linear_char. by rewrite (@cfRes_lin_lin _ _ N) ?tNlam ?irr_char. have Ut := lin_char_unitr lin_t. have kerN_mu_t: N \subset cfker (mu / 'chi_t)%R. rewrite -subsetIidl -cfker_Res ?lin_charW ?rpred_div ?rmorph_div //. by rewrite /= uNlam tNlam divrr ?lin_char_unitr ?cfker_cfun1. have co_e_mu_t: coprime e #[(mu / 'chi_t)%R]%CF. suffices dv_o_mu_t: #[(mu / 'chi_t)%R]%CF %| 'o(mu)%CF * 'o('chi_t)%CF. by rewrite (coprime_dvdr dv_o_mu_t) // coprime_mulr o_mu co_e_lam. rewrite !cfDet_order_lin //; apply/dvdn_cforderP=> x Gx. rewrite invr_lin_char // !cfunE exprMn -rmorphX {2}mulnC. by rewrite !(dvdn_cforderP _) ?conjC1 ?mulr1 // dvdn_mulr. have /eqP mu_t_1: mu / 'chi_t == 1. rewrite -(dvdn_cforder (_ / _)%R 1) -(eqnP co_e_mu_t) dvdn_gcd dvdnn andbT. rewrite -(cfQuoK nsNG kerN_mu_t) cforder_mod // /e -card_quotient //. by rewrite cforder_lin_char_dvdG ?cfQuo_lin_char ?rpred_div. by apply: irr_inj; rewrite -['chi_t]mul1r -mu_t_1 divrK. Qed. Qed. Corollary extend_solvable_coprime_irr G N t (theta := 'chi[N]_t) : N <| G -> solvable (G / N) -> G \subset 'I[theta] -> coprime #|G : N| ('o(theta)%CF * truncC (theta 1%g)) -> exists c, [/\ 'Res 'chi[G]_c = theta, 'o('chi_c)%CF = 'o(theta)%CF & forall d, 'Res 'chi_d = theta -> coprime #|G : N| 'o('chi_d)%CF -> d = c]. Proof. (* Goal: forall (_ : is_true (@normal gT (@gval gT N) (@gval gT G))) (_ : is_true (@solvable (@coset_groupType gT (@gval gT N)) (@quotient gT (@gval gT G) (@gval gT N)))) (_ : 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)) (@inertia gT (@gval gT N) theta))))) (_ : is_true (coprime (@indexg gT (@gval gT G) (@gval gT N)) (muln (@cfDet_order gT N theta) (truncC (@fun_of_cfun gT (@gval gT N) theta (oneg (FinGroup.base gT))))))), @ex (ordinal (S (@pred_Nirr gT (@gval gT G)))) (fun c : ordinal (S (@pred_Nirr gT (@gval gT G))) => and3 (@eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) c)) theta) (@eq nat (@cfDet_order gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) c)) (@cfDet_order gT N theta)) (forall (d : ordinal (S (@pred_Nirr gT (@gval gT G)))) (_ : @eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) d)) theta) (_ : is_true (coprime (@indexg gT (@gval gT G) (@gval gT N)) (@cfDet_order gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) d)))), @eq (ordinal (S (@pred_Nirr gT (@gval gT G)))) d c)) *) set e := #|G : N|; set f := truncC _ => nsNG solG IGtheta. (* Goal: forall _ : is_true (coprime e (muln (@cfDet_order gT N theta) f)), @ex (ordinal (S (@pred_Nirr gT (@gval gT G)))) (fun c : ordinal (S (@pred_Nirr gT (@gval gT G))) => and3 (@eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) c)) theta) (@eq nat (@cfDet_order gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) c)) (@cfDet_order gT N theta)) (forall (d : ordinal (S (@pred_Nirr gT (@gval gT G)))) (_ : @eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) d)) theta) (_ : is_true (coprime e (@cfDet_order gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) d)))), @eq (ordinal (S (@pred_Nirr gT (@gval gT G)))) d c)) *) rewrite coprime_mulr => /andP[co_e_th co_e_f]. (* Goal: @ex (ordinal (S (@pred_Nirr gT (@gval gT G)))) (fun c : ordinal (S (@pred_Nirr gT (@gval gT G))) => and3 (@eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) c)) theta) (@eq nat (@cfDet_order gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) c)) (@cfDet_order gT N theta)) (forall (d : ordinal (S (@pred_Nirr gT (@gval gT G)))) (_ : @eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) d)) theta) (_ : is_true (coprime e (@cfDet_order gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) d)))), @eq (ordinal (S (@pred_Nirr gT (@gval gT G)))) d c)) *) have [sNG nNG] := andP nsNG; pose lambda := cfDet theta. (* Goal: @ex (ordinal (S (@pred_Nirr gT (@gval gT G)))) (fun c : ordinal (S (@pred_Nirr gT (@gval gT G))) => and3 (@eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) c)) theta) (@eq nat (@cfDet_order gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) c)) (@cfDet_order gT N theta)) (forall (d : ordinal (S (@pred_Nirr gT (@gval gT G)))) (_ : @eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) d)) theta) (_ : is_true (coprime e (@cfDet_order gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) d)))), @eq (ordinal (S (@pred_Nirr gT (@gval gT G)))) d c)) *) have lin_lam: lambda \is a linear_char := cfDet_lin_char theta. (* Goal: @ex (ordinal (S (@pred_Nirr gT (@gval gT G)))) (fun c : ordinal (S (@pred_Nirr gT (@gval gT G))) => and3 (@eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) c)) theta) (@eq nat (@cfDet_order gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) c)) (@cfDet_order gT N theta)) (forall (d : ordinal (S (@pred_Nirr gT (@gval gT G)))) (_ : @eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) d)) theta) (_ : is_true (coprime e (@cfDet_order gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) d)))), @eq (ordinal (S (@pred_Nirr gT (@gval gT G)))) d c)) *) have IGlam: G \subset 'I[lambda]. (* Goal: @ex (ordinal (S (@pred_Nirr gT (@gval gT G)))) (fun c : ordinal (S (@pred_Nirr gT (@gval gT G))) => and3 (@eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) c)) theta) (@eq nat (@cfDet_order gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) c)) (@cfDet_order gT N theta)) (forall (d : ordinal (S (@pred_Nirr gT (@gval gT G)))) (_ : @eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) d)) theta) (_ : is_true (coprime e (@cfDet_order gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) d)))), @eq (ordinal (S (@pred_Nirr gT (@gval gT G)))) d c)) *) (* 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)) (@inertia gT (@gval gT N) lambda)))) *) apply/subsetP=> y /(subsetP IGtheta)/setIdP[nNy /eqP th_y]. (* Goal: @ex (ordinal (S (@pred_Nirr gT (@gval gT G)))) (fun c : ordinal (S (@pred_Nirr gT (@gval gT G))) => and3 (@eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) c)) theta) (@eq nat (@cfDet_order gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) c)) (@cfDet_order gT N theta)) (forall (d : ordinal (S (@pred_Nirr gT (@gval gT G)))) (_ : @eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) d)) theta) (_ : is_true (coprime e (@cfDet_order gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) d)))), @eq (ordinal (S (@pred_Nirr gT (@gval gT G)))) d c)) *) (* 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)) (@inertia gT (@gval gT N) lambda)))) *) by rewrite inE nNy /= -cfDetConjg th_y. (* Goal: @ex (ordinal (S (@pred_Nirr gT (@gval gT G)))) (fun c : ordinal (S (@pred_Nirr gT (@gval gT G))) => and3 (@eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) c)) theta) (@eq nat (@cfDet_order gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) c)) (@cfDet_order gT N theta)) (forall (d : ordinal (S (@pred_Nirr gT (@gval gT G)))) (_ : @eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) d)) theta) (_ : is_true (coprime e (@cfDet_order gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) d)))), @eq (ordinal (S (@pred_Nirr gT (@gval gT G)))) d c)) *) have co_e_lam: coprime e 'o(lambda)%CF by rewrite cfDet_order_lin. (* Goal: @ex (ordinal (S (@pred_Nirr gT (@gval gT G)))) (fun c : ordinal (S (@pred_Nirr gT (@gval gT G))) => and3 (@eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) c)) theta) (@eq nat (@cfDet_order gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) c)) (@cfDet_order gT N theta)) (forall (d : ordinal (S (@pred_Nirr gT (@gval gT G)))) (_ : @eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) d)) theta) (_ : is_true (coprime e (@cfDet_order gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) d)))), @eq (ordinal (S (@pred_Nirr gT (@gval gT G)))) d c)) *) have [//|u [uNlam o_u Uu]] := extend_coprime_linear_char nsNG lin_lam IGlam. (* Goal: @ex (ordinal (S (@pred_Nirr gT (@gval gT G)))) (fun c : ordinal (S (@pred_Nirr gT (@gval gT G))) => and3 (@eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) c)) theta) (@eq nat (@cfDet_order gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) c)) (@cfDet_order gT N theta)) (forall (d : ordinal (S (@pred_Nirr gT (@gval gT G)))) (_ : @eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) d)) theta) (_ : is_true (coprime e (@cfDet_order gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) d)))), @eq (ordinal (S (@pred_Nirr gT (@gval gT G)))) d c)) *) have /exists_eqP[c cNth]: [exists c, 'Res 'chi[G]_c == theta]. (* Goal: @ex (ordinal (S (@pred_Nirr gT (@gval gT G)))) (fun c : ordinal (S (@pred_Nirr gT (@gval gT G))) => and3 (@eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) c)) theta) (@eq nat (@cfDet_order gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) c)) (@cfDet_order gT N theta)) (forall (d : ordinal (S (@pred_Nirr gT (@gval gT G)))) (_ : @eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) d)) theta) (_ : is_true (coprime e (@cfDet_order gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) d)))), @eq (ordinal (S (@pred_Nirr gT (@gval gT G)))) d c)) *) (* Goal: is_true (negb (@FiniteQuant.quant0b (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) (fun c : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @FiniteQuant.ex (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) (FiniteQuant.Quantified (@eq_op (@cfun_eqType gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) c)) theta)) c))) *) rewrite solvable_irr_extendible_from_det //. (* Goal: @ex (ordinal (S (@pred_Nirr gT (@gval gT G)))) (fun c : ordinal (S (@pred_Nirr gT (@gval gT G))) => and3 (@eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) c)) theta) (@eq nat (@cfDet_order gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) c)) (@cfDet_order gT N theta)) (forall (d : ordinal (S (@pred_Nirr gT (@gval gT G)))) (_ : @eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) d)) theta) (_ : is_true (coprime e (@cfDet_order gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) d)))), @eq (ordinal (S (@pred_Nirr gT (@gval gT G)))) d c)) *) (* Goal: is_true (negb (@FiniteQuant.quant0b (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) (fun u : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @FiniteQuant.ex (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) (FiniteQuant.Quantified (@eq_op (@cfun_eqType gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) u)) (@cfDet gT N (@tnth (S (@pred_Nirr gT (@gval gT N))) (@classfun gT (@gval gT N)) (@irr gT (@gval gT N)) t)))) u))) *) by apply/exists_eqP; exists u. (* Goal: @ex (ordinal (S (@pred_Nirr gT (@gval gT G)))) (fun c : ordinal (S (@pred_Nirr gT (@gval gT G))) => and3 (@eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) c)) theta) (@eq nat (@cfDet_order gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) c)) (@cfDet_order gT N theta)) (forall (d : ordinal (S (@pred_Nirr gT (@gval gT G)))) (_ : @eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) d)) theta) (_ : is_true (coprime e (@cfDet_order gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) d)))), @eq (ordinal (S (@pred_Nirr gT (@gval gT G)))) d c)) *) have{c cNth} [c [cNth det_c] Uc] := extend_to_cfdet nsNG co_e_f cNth uNlam. (* Goal: @ex (ordinal (S (@pred_Nirr gT (@gval gT G)))) (fun c : ordinal (S (@pred_Nirr gT (@gval gT G))) => and3 (@eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) c)) theta) (@eq nat (@cfDet_order gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) c)) (@cfDet_order gT N theta)) (forall (d : ordinal (S (@pred_Nirr gT (@gval gT G)))) (_ : @eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) d)) theta) (_ : is_true (coprime e (@cfDet_order gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) d)))), @eq (ordinal (S (@pred_Nirr gT (@gval gT G)))) d c)) *) have lin_u: 'chi_u \is a linear_char by rewrite -det_c cfDet_lin_char. (* Goal: @ex (ordinal (S (@pred_Nirr gT (@gval gT G)))) (fun c : ordinal (S (@pred_Nirr gT (@gval gT G))) => and3 (@eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) c)) theta) (@eq nat (@cfDet_order gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) c)) (@cfDet_order gT N theta)) (forall (d : ordinal (S (@pred_Nirr gT (@gval gT G)))) (_ : @eq (@classfun gT (@gval gT N)) (@cfRes gT (@gval gT N) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) d)) theta) (_ : is_true (coprime e (@cfDet_order gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) d)))), @eq (ordinal (S (@pred_Nirr gT (@gval gT G)))) d c)) *) exists c; split=> // [|c0 c0Nth co_e_c0]. (* Goal: @eq (ordinal (S (@pred_Nirr gT (@gval gT G)))) c0 c *) (* Goal: @eq nat (@cfDet_order gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) c)) (@cfDet_order gT N theta) *) by rewrite !cfDet_order_lin // -det_c in o_u. (* Goal: @eq (ordinal (S (@pred_Nirr gT (@gval gT G)))) c0 c *) have lin_u0: cfDet 'chi_c0 \is a linear_char := cfDet_lin_char 'chi_c0. (* Goal: @eq (ordinal (S (@pred_Nirr gT (@gval gT G)))) c0 c *) have /irrP[u0 Du0] := lin_char_irr lin_u0. (* Goal: @eq (ordinal (S (@pred_Nirr gT (@gval gT G)))) c0 c *) have co_e_u0: coprime e 'o('chi_u0)%CF by rewrite -Du0 cfDet_order_lin. (* Goal: @eq (ordinal (S (@pred_Nirr gT (@gval gT G)))) c0 c *) have eq_u0u: u0 = u by apply: Uu; rewrite // -Du0 -cfDetRes ?irr_char ?c0Nth. (* Goal: @eq (ordinal (S (@pred_Nirr gT (@gval gT G)))) c0 c *) by apply: Uc; rewrite // Du0 eq_u0u. Qed. End ExtendInvariantIrr. Section Frobenius. Variables (gT : finGroupType) (G K : {group gT}). Hypothesis frobGK : [Frobenius G with kernel K]. Theorem inertia_Frobenius_ker i : i != 0 -> 'I_G['chi[K]_i] = K. Theorem irr_induced_Frobenius_ker i : i != 0 -> 'Ind[G, K] 'chi_i \in irr G. Proof. (* Goal: forall _ : is_true (negb (@eq_op (GRing.Zmodule.eqType (Zp_zmodType (@pred_Nirr gT (@gval gT K)))) i (GRing.zero (Zp_zmodType (@pred_Nirr gT (@gval gT K)))))), is_true (@in_mem (@classfun gT (@gval gT G)) (@cfInd gT (@gval gT G) (@gval gT K) (@tnth (S (@pred_Nirr gT (@gval gT K))) (@classfun gT (@gval gT K)) (@irr gT (@gval gT K)) 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)))) *) move/inertia_Frobenius_ker/group_inj=> defK. (* Goal: is_true (@in_mem (@classfun gT (@gval gT G)) (@cfInd gT (@gval gT G) (@gval gT K) (@tnth (S (@pred_Nirr gT (@gval gT K))) (@classfun gT (@gval gT K)) (@irr gT (@gval gT K)) 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)))) *) have [_ _ nsKG _] := Frobenius_kerP frobGK. (* Goal: is_true (@in_mem (@classfun gT (@gval gT G)) (@cfInd gT (@gval gT G) (@gval gT K) (@tnth (S (@pred_Nirr gT (@gval gT K))) (@classfun gT (@gval gT K)) (@irr gT (@gval gT K)) 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)))) *) have [] := constt_Inertia_bijection i nsKG; rewrite defK cfInd_id => -> //. (* Goal: is_true (@in_mem (ordinal (S (@pred_Nirr gT (@gval gT K)))) i (@mem (ordinal (S (@pred_Nirr gT (@gval gT K)))) (simplPredType (ordinal (S (@pred_Nirr gT (@gval gT K))))) (@irr_constt gT (@gval gT K) (@tnth (S (@pred_Nirr gT (@gval gT K))) (@classfun gT (@gval gT K)) (@irr gT (@gval gT K)) i)))) *) by rewrite constt_irr !inE. Qed. Theorem Frobenius_Ind_irrP j : reflect (exists2 i, i != 0 & 'chi_j = 'Ind[G, K] 'chi_i) (~~ (K \subset cfker 'chi_j)). Proof. (* Goal: Bool.reflect (@ex2 (Equality.sort (GRing.Zmodule.eqType (Zp_zmodType (@pred_Nirr gT (@gval gT K))))) (fun i : Equality.sort (GRing.Zmodule.eqType (Zp_zmodType (@pred_Nirr gT (@gval gT K)))) => is_true (negb (@eq_op (GRing.Zmodule.eqType (Zp_zmodType (@pred_Nirr gT (@gval gT K)))) i (GRing.zero (Zp_zmodType (@pred_Nirr gT (@gval gT K))))))) (fun i : Equality.sort (GRing.Zmodule.eqType (Zp_zmodType (@pred_Nirr gT (@gval gT K)))) => @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) (@cfInd gT (@gval gT G) (@gval gT K) (@tnth (S (@pred_Nirr gT (@gval gT K))) (@classfun gT (@gval gT K)) (@irr gT (@gval gT K)) i)))) (negb (@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)) j)))))) *) have [_ _ nsKG _] := Frobenius_kerP frobGK; have [sKG nKG] := andP nsKG. (* Goal: Bool.reflect (@ex2 (Equality.sort (GRing.Zmodule.eqType (Zp_zmodType (@pred_Nirr gT (@gval gT K))))) (fun i : Equality.sort (GRing.Zmodule.eqType (Zp_zmodType (@pred_Nirr gT (@gval gT K)))) => is_true (negb (@eq_op (GRing.Zmodule.eqType (Zp_zmodType (@pred_Nirr gT (@gval gT K)))) i (GRing.zero (Zp_zmodType (@pred_Nirr gT (@gval gT K))))))) (fun i : Equality.sort (GRing.Zmodule.eqType (Zp_zmodType (@pred_Nirr gT (@gval gT K)))) => @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) (@cfInd gT (@gval gT G) (@gval gT K) (@tnth (S (@pred_Nirr gT (@gval gT K))) (@classfun gT (@gval gT K)) (@irr gT (@gval gT K)) i)))) (negb (@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)) j)))))) *) apply: (iffP idP) => [not_chijK1 | [i nzi ->]]; last first. (* Goal: @ex2 (Equality.sort (GRing.Zmodule.eqType (Zp_zmodType (@pred_Nirr gT (@gval gT K))))) (fun i : Equality.sort (GRing.Zmodule.eqType (Zp_zmodType (@pred_Nirr gT (@gval gT K)))) => is_true (negb (@eq_op (GRing.Zmodule.eqType (Zp_zmodType (@pred_Nirr gT (@gval gT K)))) i (GRing.zero (Zp_zmodType (@pred_Nirr gT (@gval gT K))))))) (fun i : Equality.sort (GRing.Zmodule.eqType (Zp_zmodType (@pred_Nirr gT (@gval gT K)))) => @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) (@cfInd gT (@gval gT G) (@gval gT K) (@tnth (S (@pred_Nirr gT (@gval gT K))) (@classfun gT (@gval gT K)) (@irr gT (@gval gT K)) i))) *) (* Goal: is_true (negb (@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) (@cfInd gT (@gval gT G) (@gval gT K) (@tnth (S (@pred_Nirr gT (@gval gT K))) (@classfun gT (@gval gT K)) (@irr gT (@gval gT K)) i))))))) *) by rewrite cfker_Ind_irr ?sub_gcore // subGcfker. (* Goal: @ex2 (Equality.sort (GRing.Zmodule.eqType (Zp_zmodType (@pred_Nirr gT (@gval gT K))))) (fun i : Equality.sort (GRing.Zmodule.eqType (Zp_zmodType (@pred_Nirr gT (@gval gT K)))) => is_true (negb (@eq_op (GRing.Zmodule.eqType (Zp_zmodType (@pred_Nirr gT (@gval gT K)))) i (GRing.zero (Zp_zmodType (@pred_Nirr gT (@gval gT K))))))) (fun i : Equality.sort (GRing.Zmodule.eqType (Zp_zmodType (@pred_Nirr gT (@gval gT K)))) => @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) (@cfInd gT (@gval gT G) (@gval gT K) (@tnth (S (@pred_Nirr gT (@gval gT K))) (@classfun gT (@gval gT K)) (@irr gT (@gval gT K)) i))) *) have /neq0_has_constt[i chijKi]: 'Res[K] 'chi_j != 0 by apply: Res_irr_neq0. (* Goal: @ex2 (Equality.sort (GRing.Zmodule.eqType (Zp_zmodType (@pred_Nirr gT (@gval gT K))))) (fun i : Equality.sort (GRing.Zmodule.eqType (Zp_zmodType (@pred_Nirr gT (@gval gT K)))) => is_true (negb (@eq_op (GRing.Zmodule.eqType (Zp_zmodType (@pred_Nirr gT (@gval gT K)))) i (GRing.zero (Zp_zmodType (@pred_Nirr gT (@gval gT K))))))) (fun i : Equality.sort (GRing.Zmodule.eqType (Zp_zmodType (@pred_Nirr gT (@gval gT K)))) => @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) (@cfInd gT (@gval gT G) (@gval gT K) (@tnth (S (@pred_Nirr gT (@gval gT K))) (@classfun gT (@gval gT K)) (@irr gT (@gval gT K)) i))) *) have nz_i: i != 0. (* Goal: @ex2 (Equality.sort (GRing.Zmodule.eqType (Zp_zmodType (@pred_Nirr gT (@gval gT K))))) (fun i : Equality.sort (GRing.Zmodule.eqType (Zp_zmodType (@pred_Nirr gT (@gval gT K)))) => is_true (negb (@eq_op (GRing.Zmodule.eqType (Zp_zmodType (@pred_Nirr gT (@gval gT K)))) i (GRing.zero (Zp_zmodType (@pred_Nirr gT (@gval gT K))))))) (fun i : Equality.sort (GRing.Zmodule.eqType (Zp_zmodType (@pred_Nirr gT (@gval gT K)))) => @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) (@cfInd gT (@gval gT G) (@gval gT K) (@tnth (S (@pred_Nirr gT (@gval gT K))) (@classfun gT (@gval gT K)) (@irr gT (@gval gT K)) i))) *) (* Goal: is_true (negb (@eq_op (ordinal_eqType (S (@pred_Nirr gT (@gval gT K)))) i (GRing.zero (Zp_zmodType (@pred_Nirr gT (@gval gT K)))))) *) by apply: contraNneq not_chijK1 => i0; rewrite constt0_Res_cfker // -i0. (* Goal: @ex2 (Equality.sort (GRing.Zmodule.eqType (Zp_zmodType (@pred_Nirr gT (@gval gT K))))) (fun i : Equality.sort (GRing.Zmodule.eqType (Zp_zmodType (@pred_Nirr gT (@gval gT K)))) => is_true (negb (@eq_op (GRing.Zmodule.eqType (Zp_zmodType (@pred_Nirr gT (@gval gT K)))) i (GRing.zero (Zp_zmodType (@pred_Nirr gT (@gval gT K))))))) (fun i : Equality.sort (GRing.Zmodule.eqType (Zp_zmodType (@pred_Nirr gT (@gval gT K)))) => @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) (@cfInd gT (@gval gT G) (@gval gT K) (@tnth (S (@pred_Nirr gT (@gval gT K))) (@classfun gT (@gval gT K)) (@irr gT (@gval gT K)) i))) *) have /irrP[k def_chik] := irr_induced_Frobenius_ker nz_i. (* Goal: @ex2 (Equality.sort (GRing.Zmodule.eqType (Zp_zmodType (@pred_Nirr gT (@gval gT K))))) (fun i : Equality.sort (GRing.Zmodule.eqType (Zp_zmodType (@pred_Nirr gT (@gval gT K)))) => is_true (negb (@eq_op (GRing.Zmodule.eqType (Zp_zmodType (@pred_Nirr gT (@gval gT K)))) i (GRing.zero (Zp_zmodType (@pred_Nirr gT (@gval gT K))))))) (fun i : Equality.sort (GRing.Zmodule.eqType (Zp_zmodType (@pred_Nirr gT (@gval gT K)))) => @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) (@cfInd gT (@gval gT G) (@gval gT K) (@tnth (S (@pred_Nirr gT (@gval gT K))) (@classfun gT (@gval gT K)) (@irr gT (@gval gT K)) i))) *) have: '['chi_j, 'chi_k] != 0 by rewrite -def_chik -cfdot_Res_l. (* Goal: forall _ : is_true (negb (@eq_op (GRing.Ring.eqType (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) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) k)) (GRing.zero (GRing.Ring.zmodType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType))))), @ex2 (Equality.sort (GRing.Zmodule.eqType (Zp_zmodType (@pred_Nirr gT (@gval gT K))))) (fun i : Equality.sort (GRing.Zmodule.eqType (Zp_zmodType (@pred_Nirr gT (@gval gT K)))) => is_true (negb (@eq_op (GRing.Zmodule.eqType (Zp_zmodType (@pred_Nirr gT (@gval gT K)))) i (GRing.zero (Zp_zmodType (@pred_Nirr gT (@gval gT K))))))) (fun i : Equality.sort (GRing.Zmodule.eqType (Zp_zmodType (@pred_Nirr gT (@gval gT K)))) => @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) (@cfInd gT (@gval gT G) (@gval gT K) (@tnth (S (@pred_Nirr gT (@gval gT K))) (@classfun gT (@gval gT K)) (@irr gT (@gval gT K)) i))) *) by rewrite cfdot_irr pnatr_eq0; case: (j =P k) => // ->; exists i. Qed. End Frobenius.
Require Export GeoCoq.Tarski_dev.Ch11_angles. Section T12_1. Context `{TnEQD:Tarski_neutral_dimensionless_with_decidable_point_equality}. Lemma par_reflexivity : forall A B, A<>B -> Par A B A B. Proof. (* Goal: forall (A B : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) A B)), @Par Tn A B A B *) intros. (* Goal: @Par Tn A B A B *) unfold Par. (* Goal: or (@Par_strict Tn A B A B) (and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) A B)) (and (@Col Tn A A B) (@Col Tn B A B)))) *) unfold Par_strict. (* Goal: or (and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) A B)) (and (@Coplanar Tn A B A B) (not (@ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A B) (@Col Tn X A B))))))) (and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) A B)) (and (@Col Tn A A B) (@Col Tn B A B)))) *) right. (* Goal: and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) A B)) (and (@Col Tn A A B) (@Col Tn B A B))) *) repeat split. (* Goal: @Col Tn B A B *) (* Goal: @Col Tn A A B *) (* Goal: not (@eq (@Tpoint Tn) A B) *) (* Goal: not (@eq (@Tpoint Tn) A B) *) assumption. (* Goal: @Col Tn B A B *) (* Goal: @Col Tn A A B *) (* Goal: not (@eq (@Tpoint Tn) A B) *) assumption. (* Goal: @Col Tn B A B *) (* Goal: @Col Tn A A B *) apply col_trivial_1. (* Goal: @Col Tn B A B *) apply col_trivial_3. Qed. Lemma par_strict_irreflexivity : forall A B, ~ Par_strict A B A B. Proof. (* Goal: forall A B : @Tpoint Tn, not (@Par_strict Tn A B A B) *) intros. (* Goal: not (@Par_strict Tn A B A B) *) intro. (* Goal: False *) unfold Par_strict in H. (* Goal: False *) spliter. (* Goal: False *) apply H2. (* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A B) (@Col Tn X A B)) *) exists A. (* Goal: and (@Col Tn A A B) (@Col Tn A A B) *) split; apply col_trivial_1. Qed. Lemma not_par_strict_id : forall A B C, ~ Par_strict A B A C. Proof. (* Goal: forall A B C : @Tpoint Tn, not (@Par_strict Tn A B A C) *) intros. (* Goal: not (@Par_strict Tn A B A C) *) intro. (* Goal: False *) unfold Par_strict in H. (* Goal: False *) spliter. (* Goal: False *) apply H2. (* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A B) (@Col Tn X A C)) *) exists A. (* Goal: and (@Col Tn A A B) (@Col Tn A A C) *) split; Col. Qed. Lemma par_id : forall A B C, Par A B A C -> Col A B C. Proof. (* Goal: forall (A B C : @Tpoint Tn) (_ : @Par Tn A B A C), @Col Tn A B C *) intros. (* Goal: @Col Tn A B C *) unfold Par in H. (* Goal: @Col Tn A B C *) induction H. (* Goal: @Col Tn A B C *) (* Goal: @Col Tn A B C *) unfold Par_strict in H. (* Goal: @Col Tn A B C *) (* Goal: @Col Tn A B C *) spliter. (* Goal: @Col Tn A B C *) (* Goal: @Col Tn A B C *) apply False_ind. (* Goal: @Col Tn A B C *) (* Goal: False *) apply H2. (* Goal: @Col Tn A B C *) (* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A B) (@Col Tn X A C)) *) exists A. (* Goal: @Col Tn A B C *) (* Goal: and (@Col Tn A A B) (@Col Tn A A C) *) Col. (* Goal: @Col Tn A B C *) spliter;Col. Qed. Lemma par_strict_not_col_1 : forall A B C D, Par_strict A B C D -> ~ Col A B C. Proof. (* Goal: forall (A B C D : @Tpoint Tn) (_ : @Par_strict Tn A B C D), not (@Col Tn A B C) *) intros. (* Goal: not (@Col Tn A B C) *) unfold Par_strict in *. (* Goal: not (@Col Tn A B C) *) spliter. (* Goal: not (@Col Tn A B C) *) intro. (* Goal: False *) apply H2. (* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A B) (@Col Tn X C D)) *) exists C. (* Goal: and (@Col Tn C A B) (@Col Tn C C D) *) split;Col. Qed. Lemma par_strict_not_col_2 : forall A B C D, Par_strict A B C D -> ~ Col B C D. Proof. (* Goal: forall (A B C D : @Tpoint Tn) (_ : @Par_strict Tn A B C D), not (@Col Tn B C D) *) intros. (* Goal: not (@Col Tn B C D) *) unfold Par_strict in *. (* Goal: not (@Col Tn B C D) *) spliter. (* Goal: not (@Col Tn B C D) *) intro. (* Goal: False *) apply H2. (* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A B) (@Col Tn X C D)) *) exists B. (* Goal: and (@Col Tn B A B) (@Col Tn B C D) *) split;Col. Qed. Lemma par_strict_not_col_3 : forall A B C D, Par_strict A B C D -> ~ Col C D A. Proof. (* Goal: forall (A B C D : @Tpoint Tn) (_ : @Par_strict Tn A B C D), not (@Col Tn C D A) *) intros. (* Goal: not (@Col Tn C D A) *) unfold Par_strict in *. (* Goal: not (@Col Tn C D A) *) spliter. (* Goal: not (@Col Tn C D A) *) intro. (* Goal: False *) apply H2. (* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A B) (@Col Tn X C D)) *) exists A. (* Goal: and (@Col Tn A A B) (@Col Tn A C D) *) split;Col. Qed. Lemma par_strict_not_col_4 : forall A B C D, Par_strict A B C D -> ~ Col A B D. Proof. (* Goal: forall (A B C D : @Tpoint Tn) (_ : @Par_strict Tn A B C D), not (@Col Tn A B D) *) intros. (* Goal: not (@Col Tn A B D) *) unfold Par_strict in *. (* Goal: not (@Col Tn A B D) *) spliter. (* Goal: not (@Col Tn A B D) *) intro. (* Goal: False *) apply H2. (* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A B) (@Col Tn X C D)) *) exists D. (* Goal: and (@Col Tn D A B) (@Col Tn D C D) *) split;Col. Qed. Lemma par_strict_not_cols : forall A B C D, Par_strict A B C D -> ~ Col A B C /\ ~ Col B C D /\ ~ Col C D A /\ ~ Col A B D. Proof. (* Goal: forall (A B C D : @Tpoint Tn) (_ : @Par_strict Tn A B C D), and (not (@Col Tn A B C)) (and (not (@Col Tn B C D)) (and (not (@Col Tn C D A)) (not (@Col Tn A B D)))) *) intros. (* Goal: and (not (@Col Tn A B C)) (and (not (@Col Tn B C D)) (and (not (@Col Tn C D A)) (not (@Col Tn A B D)))) *) repeat split. (* Goal: not (@Col Tn A B D) *) (* Goal: not (@Col Tn C D A) *) (* Goal: not (@Col Tn B C D) *) (* Goal: not (@Col Tn A B C) *) apply par_strict_not_col_1 with D, H. (* Goal: not (@Col Tn A B D) *) (* Goal: not (@Col Tn C D A) *) (* Goal: not (@Col Tn B C D) *) apply (par_strict_not_col_2 A), H. (* Goal: not (@Col Tn A B D) *) (* Goal: not (@Col Tn C D A) *) apply par_strict_not_col_3 with B, H. (* Goal: not (@Col Tn A B D) *) apply par_strict_not_col_4 with C, H. Qed. Lemma par_id_1 : forall A B C, Par A B A C -> Col B A C. Proof. (* Goal: forall (A B C : @Tpoint Tn) (_ : @Par Tn A B A C), @Col Tn B A C *) intros. (* Goal: @Col Tn B A C *) assert (H1 := par_id A B C H). (* Goal: @Col Tn B A C *) Col. Qed. Lemma par_id_2 : forall A B C, Par A B A C -> Col B C A. Proof. (* Goal: forall (A B C : @Tpoint Tn) (_ : @Par Tn A B A C), @Col Tn B C A *) intros. (* Goal: @Col Tn B C A *) assert (H1 := par_id A B C H). (* Goal: @Col Tn B C A *) Col. Qed. Lemma par_id_3 : forall A B C, Par A B A C -> Col A C B. Proof. (* Goal: forall (A B C : @Tpoint Tn) (_ : @Par Tn A B A C), @Col Tn A C B *) intros. (* Goal: @Col Tn A C B *) assert (H1 := par_id A B C H). (* Goal: @Col Tn A C B *) Col. Qed. Lemma par_id_4 : forall A B C, Par A B A C -> Col C B A. Proof. (* Goal: forall (A B C : @Tpoint Tn) (_ : @Par Tn A B A C), @Col Tn C B A *) intros. (* Goal: @Col Tn C B A *) assert (H1 := par_id A B C H). (* Goal: @Col Tn C B A *) Col. Qed. Lemma par_id_5 : forall A B C, Par A B A C -> Col C A B. Proof. (* Goal: forall (A B C : @Tpoint Tn) (_ : @Par Tn A B A C), @Col Tn C A B *) intros. (* Goal: @Col Tn C A B *) assert (H1 := par_id A B C H). (* Goal: @Col Tn C A B *) Col. Qed. Lemma par_strict_symmetry :forall A B C D, Par_strict A B C D -> Par_strict C D A B. Proof. (* Goal: forall (A B C D : @Tpoint Tn) (_ : @Par_strict Tn A B C D), @Par_strict Tn C D A B *) unfold Par_strict. (* Goal: forall (A B C D : @Tpoint Tn) (_ : and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C D)) (and (@Coplanar Tn A B C D) (not (@ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A B) (@Col Tn X C D))))))), and (not (@eq (@Tpoint Tn) C D)) (and (not (@eq (@Tpoint Tn) A B)) (and (@Coplanar Tn C D A B) (not (@ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X C D) (@Col Tn X A B)))))) *) intros. (* Goal: and (not (@eq (@Tpoint Tn) C D)) (and (not (@eq (@Tpoint Tn) A B)) (and (@Coplanar Tn C D A B) (not (@ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X C D) (@Col Tn X A B)))))) *) spliter. (* Goal: and (not (@eq (@Tpoint Tn) C D)) (and (not (@eq (@Tpoint Tn) A B)) (and (@Coplanar Tn C D A B) (not (@ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X C D) (@Col Tn X A B)))))) *) repeat split. (* Goal: not (@ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X C D) (@Col Tn X A B))) *) (* Goal: @Coplanar Tn C D A B *) (* Goal: not (@eq (@Tpoint Tn) A B) *) (* Goal: not (@eq (@Tpoint Tn) C D) *) assumption. (* Goal: not (@ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X C D) (@Col Tn X A B))) *) (* Goal: @Coplanar Tn C D A B *) (* Goal: not (@eq (@Tpoint Tn) A B) *) assumption. (* Goal: not (@ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X C D) (@Col Tn X A B))) *) (* Goal: @Coplanar Tn C D A B *) apply coplanar_perm_16;assumption. (* Goal: not (@ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X C D) (@Col Tn X A B))) *) intro. (* Goal: False *) apply H2. (* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A B) (@Col Tn X C D)) *) ex_and H3 X. (* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A B) (@Col Tn X C D)) *) exists X. (* Goal: and (@Col Tn X A B) (@Col Tn X C D) *) split; assumption. Qed. Lemma par_symmetry :forall A B C D, Par A B C D -> Par C D A B. Proof. (* Goal: forall (A B C D : @Tpoint Tn) (_ : @Par Tn A B C D), @Par Tn C D A B *) unfold Par. (* Goal: forall (A B C D : @Tpoint Tn) (_ : or (@Par_strict Tn A B C D) (and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C D)) (and (@Col Tn A C D) (@Col Tn B C D))))), or (@Par_strict Tn C D A B) (and (not (@eq (@Tpoint Tn) C D)) (and (not (@eq (@Tpoint Tn) A B)) (and (@Col Tn C A B) (@Col Tn D A B)))) *) intros. (* Goal: or (@Par_strict Tn C D A B) (and (not (@eq (@Tpoint Tn) C D)) (and (not (@eq (@Tpoint Tn) A B)) (and (@Col Tn C A B) (@Col Tn D A B)))) *) induction H. (* Goal: or (@Par_strict Tn C D A B) (and (not (@eq (@Tpoint Tn) C D)) (and (not (@eq (@Tpoint Tn) A B)) (and (@Col Tn C A B) (@Col Tn D A B)))) *) (* Goal: or (@Par_strict Tn C D A B) (and (not (@eq (@Tpoint Tn) C D)) (and (not (@eq (@Tpoint Tn) A B)) (and (@Col Tn C A B) (@Col Tn D A B)))) *) left. (* Goal: or (@Par_strict Tn C D A B) (and (not (@eq (@Tpoint Tn) C D)) (and (not (@eq (@Tpoint Tn) A B)) (and (@Col Tn C A B) (@Col Tn D A B)))) *) (* Goal: @Par_strict Tn C D A B *) apply par_strict_symmetry. (* Goal: or (@Par_strict Tn C D A B) (and (not (@eq (@Tpoint Tn) C D)) (and (not (@eq (@Tpoint Tn) A B)) (and (@Col Tn C A B) (@Col Tn D A B)))) *) (* Goal: @Par_strict Tn A B C D *) assumption. (* Goal: or (@Par_strict Tn C D A B) (and (not (@eq (@Tpoint Tn) C D)) (and (not (@eq (@Tpoint Tn) A B)) (and (@Col Tn C A B) (@Col Tn D A B)))) *) spliter. (* Goal: or (@Par_strict Tn C D A B) (and (not (@eq (@Tpoint Tn) C D)) (and (not (@eq (@Tpoint Tn) A B)) (and (@Col Tn C A B) (@Col Tn D A B)))) *) right. (* Goal: and (not (@eq (@Tpoint Tn) C D)) (and (not (@eq (@Tpoint Tn) A B)) (and (@Col Tn C A B) (@Col Tn D A B))) *) repeat split;try assumption. (* Goal: @Col Tn D A B *) (* Goal: @Col Tn C A B *) eapply (col_transitivity_1 _ D);Col. (* Goal: @Col Tn D A B *) eapply (col_transitivity_1 _ C);Col. Qed. Lemma par_left_comm : forall A B C D, Par A B C D -> Par B A C D. Proof. (* Goal: forall (A B C D : @Tpoint Tn) (_ : @Par Tn A B C D), @Par Tn B A C D *) unfold Par. (* Goal: forall (A B C D : @Tpoint Tn) (_ : or (@Par_strict Tn A B C D) (and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C D)) (and (@Col Tn A C D) (@Col Tn B C D))))), or (@Par_strict Tn B A C D) (and (not (@eq (@Tpoint Tn) B A)) (and (not (@eq (@Tpoint Tn) C D)) (and (@Col Tn B C D) (@Col Tn A C D)))) *) intros. (* Goal: or (@Par_strict Tn B A C D) (and (not (@eq (@Tpoint Tn) B A)) (and (not (@eq (@Tpoint Tn) C D)) (and (@Col Tn B C D) (@Col Tn A C D)))) *) induction H. (* Goal: or (@Par_strict Tn B A C D) (and (not (@eq (@Tpoint Tn) B A)) (and (not (@eq (@Tpoint Tn) C D)) (and (@Col Tn B C D) (@Col Tn A C D)))) *) (* Goal: or (@Par_strict Tn B A C D) (and (not (@eq (@Tpoint Tn) B A)) (and (not (@eq (@Tpoint Tn) C D)) (and (@Col Tn B C D) (@Col Tn A C D)))) *) left. (* Goal: or (@Par_strict Tn B A C D) (and (not (@eq (@Tpoint Tn) B A)) (and (not (@eq (@Tpoint Tn) C D)) (and (@Col Tn B C D) (@Col Tn A C D)))) *) (* Goal: @Par_strict Tn B A C D *) unfold Par_strict in *. (* Goal: or (@Par_strict Tn B A C D) (and (not (@eq (@Tpoint Tn) B A)) (and (not (@eq (@Tpoint Tn) C D)) (and (@Col Tn B C D) (@Col Tn A C D)))) *) (* Goal: and (not (@eq (@Tpoint Tn) B A)) (and (not (@eq (@Tpoint Tn) C D)) (and (@Coplanar Tn B A C D) (not (@ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X B A) (@Col Tn X C D)))))) *) spliter. (* Goal: or (@Par_strict Tn B A C D) (and (not (@eq (@Tpoint Tn) B A)) (and (not (@eq (@Tpoint Tn) C D)) (and (@Col Tn B C D) (@Col Tn A C D)))) *) (* Goal: and (not (@eq (@Tpoint Tn) B A)) (and (not (@eq (@Tpoint Tn) C D)) (and (@Coplanar Tn B A C D) (not (@ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X B A) (@Col Tn X C D)))))) *) repeat split. (* Goal: or (@Par_strict Tn B A C D) (and (not (@eq (@Tpoint Tn) B A)) (and (not (@eq (@Tpoint Tn) C D)) (and (@Col Tn B C D) (@Col Tn A C D)))) *) (* Goal: not (@ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X B A) (@Col Tn X C D))) *) (* Goal: @Coplanar Tn B A C D *) (* Goal: not (@eq (@Tpoint Tn) C D) *) (* Goal: not (@eq (@Tpoint Tn) B A) *) auto. (* Goal: or (@Par_strict Tn B A C D) (and (not (@eq (@Tpoint Tn) B A)) (and (not (@eq (@Tpoint Tn) C D)) (and (@Col Tn B C D) (@Col Tn A C D)))) *) (* Goal: not (@ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X B A) (@Col Tn X C D))) *) (* Goal: @Coplanar Tn B A C D *) (* Goal: not (@eq (@Tpoint Tn) C D) *) assumption. (* Goal: or (@Par_strict Tn B A C D) (and (not (@eq (@Tpoint Tn) B A)) (and (not (@eq (@Tpoint Tn) C D)) (and (@Col Tn B C D) (@Col Tn A C D)))) *) (* Goal: not (@ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X B A) (@Col Tn X C D))) *) (* Goal: @Coplanar Tn B A C D *) apply coplanar_perm_6;assumption. (* Goal: or (@Par_strict Tn B A C D) (and (not (@eq (@Tpoint Tn) B A)) (and (not (@eq (@Tpoint Tn) C D)) (and (@Col Tn B C D) (@Col Tn A C D)))) *) (* Goal: not (@ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X B A) (@Col Tn X C D))) *) intro. (* Goal: or (@Par_strict Tn B A C D) (and (not (@eq (@Tpoint Tn) B A)) (and (not (@eq (@Tpoint Tn) C D)) (and (@Col Tn B C D) (@Col Tn A C D)))) *) (* Goal: False *) apply H2. (* Goal: or (@Par_strict Tn B A C D) (and (not (@eq (@Tpoint Tn) B A)) (and (not (@eq (@Tpoint Tn) C D)) (and (@Col Tn B C D) (@Col Tn A C D)))) *) (* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A B) (@Col Tn X C D)) *) ex_and H3 X. (* Goal: or (@Par_strict Tn B A C D) (and (not (@eq (@Tpoint Tn) B A)) (and (not (@eq (@Tpoint Tn) C D)) (and (@Col Tn B C D) (@Col Tn A C D)))) *) (* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A B) (@Col Tn X C D)) *) exists X. (* Goal: or (@Par_strict Tn B A C D) (and (not (@eq (@Tpoint Tn) B A)) (and (not (@eq (@Tpoint Tn) C D)) (and (@Col Tn B C D) (@Col Tn A C D)))) *) (* Goal: and (@Col Tn X A B) (@Col Tn X C D) *) Col5. (* Goal: or (@Par_strict Tn B A C D) (and (not (@eq (@Tpoint Tn) B A)) (and (not (@eq (@Tpoint Tn) C D)) (and (@Col Tn B C D) (@Col Tn A C D)))) *) right. (* Goal: and (not (@eq (@Tpoint Tn) B A)) (and (not (@eq (@Tpoint Tn) C D)) (and (@Col Tn B C D) (@Col Tn A C D))) *) spliter. (* Goal: and (not (@eq (@Tpoint Tn) B A)) (and (not (@eq (@Tpoint Tn) C D)) (and (@Col Tn B C D) (@Col Tn A C D))) *) Col5. Qed. Lemma par_right_comm : forall A B C D, Par A B C D -> Par A B D C. Proof. (* Goal: forall (A B C D : @Tpoint Tn) (_ : @Par Tn A B C D), @Par Tn A B D C *) intros. (* Goal: @Par Tn A B D C *) apply par_symmetry in H. (* Goal: @Par Tn A B D C *) apply par_symmetry. (* Goal: @Par Tn D C A B *) apply par_left_comm. (* Goal: @Par Tn C D A B *) assumption. Qed. Lemma par_comm : forall A B C D, Par A B C D -> Par B A D C. Proof. (* Goal: forall (A B C D : @Tpoint Tn) (_ : @Par Tn A B C D), @Par Tn B A D C *) intros. (* Goal: @Par Tn B A D C *) apply par_left_comm. (* Goal: @Par Tn A B D C *) apply par_right_comm. (* Goal: @Par Tn A B C D *) assumption. Qed. Lemma par_strict_left_comm : forall A B C D, Par_strict A B C D -> Par_strict B A C D. Proof. (* Goal: forall (A B C D : @Tpoint Tn) (_ : @Par_strict Tn A B C D), @Par_strict Tn B A C D *) unfold Par_strict. (* Goal: forall (A B C D : @Tpoint Tn) (_ : and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C D)) (and (@Coplanar Tn A B C D) (not (@ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A B) (@Col Tn X C D))))))), and (not (@eq (@Tpoint Tn) B A)) (and (not (@eq (@Tpoint Tn) C D)) (and (@Coplanar Tn B A C D) (not (@ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X B A) (@Col Tn X C D)))))) *) intros. (* Goal: and (not (@eq (@Tpoint Tn) B A)) (and (not (@eq (@Tpoint Tn) C D)) (and (@Coplanar Tn B A C D) (not (@ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X B A) (@Col Tn X C D)))))) *) decompose [and] H;clear H. (* Goal: and (not (@eq (@Tpoint Tn) B A)) (and (not (@eq (@Tpoint Tn) C D)) (and (@Coplanar Tn B A C D) (not (@ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X B A) (@Col Tn X C D)))))) *) repeat split. (* Goal: not (@ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X B A) (@Col Tn X C D))) *) (* Goal: @Coplanar Tn B A C D *) (* Goal: not (@eq (@Tpoint Tn) C D) *) (* Goal: not (@eq (@Tpoint Tn) B A) *) intuition. (* Goal: not (@ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X B A) (@Col Tn X C D))) *) (* Goal: @Coplanar Tn B A C D *) (* Goal: not (@eq (@Tpoint Tn) C D) *) assumption. (* Goal: not (@ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X B A) (@Col Tn X C D))) *) (* Goal: @Coplanar Tn B A C D *) apply coplanar_perm_6;assumption. (* Goal: not (@ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X B A) (@Col Tn X C D))) *) intro. (* Goal: False *) apply H4. (* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A B) (@Col Tn X C D)) *) destruct H as [X [HCol1 HCol2]]. (* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A B) (@Col Tn X C D)) *) exists X; Col. Qed. Lemma par_strict_right_comm : forall A B C D, Par_strict A B C D -> Par_strict A B D C. Proof. (* Goal: forall (A B C D : @Tpoint Tn) (_ : @Par_strict Tn A B C D), @Par_strict Tn A B D C *) unfold Par_strict. (* Goal: forall (A B C D : @Tpoint Tn) (_ : and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C D)) (and (@Coplanar Tn A B C D) (not (@ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A B) (@Col Tn X C D))))))), and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) D C)) (and (@Coplanar Tn A B D C) (not (@ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A B) (@Col Tn X D C)))))) *) intros. (* Goal: and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) D C)) (and (@Coplanar Tn A B D C) (not (@ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A B) (@Col Tn X D C)))))) *) decompose [and] H;clear H. (* Goal: and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) D C)) (and (@Coplanar Tn A B D C) (not (@ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A B) (@Col Tn X D C)))))) *) repeat split. (* Goal: not (@ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A B) (@Col Tn X D C))) *) (* Goal: @Coplanar Tn A B D C *) (* Goal: not (@eq (@Tpoint Tn) D C) *) (* Goal: not (@eq (@Tpoint Tn) A B) *) assumption. (* Goal: not (@ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A B) (@Col Tn X D C))) *) (* Goal: @Coplanar Tn A B D C *) (* Goal: not (@eq (@Tpoint Tn) D C) *) intuition. (* Goal: not (@ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A B) (@Col Tn X D C))) *) (* Goal: @Coplanar Tn A B D C *) apply coplanar_perm_1;assumption. (* Goal: not (@ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A B) (@Col Tn X D C))) *) intro. (* Goal: False *) apply H4. (* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A B) (@Col Tn X C D)) *) destruct H as [X [HCol1 HCol2]]. (* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A B) (@Col Tn X C D)) *) exists X; Col. Qed. Lemma par_strict_comm : forall A B C D, Par_strict A B C D -> Par_strict B A D C. Proof. (* Goal: forall (A B C D : @Tpoint Tn) (_ : @Par_strict Tn A B C D), @Par_strict Tn B A D C *) intros. (* Goal: @Par_strict Tn B A D C *) apply par_strict_left_comm in H. (* Goal: @Par_strict Tn B A D C *) apply par_strict_right_comm. (* Goal: @Par_strict Tn B A C D *) assumption. Qed. Lemma par_strict_neq1 : forall A B C D, Par_strict A B C D -> A <> B. Proof. (* Goal: forall (A B C D : @Tpoint Tn) (_ : @Par_strict Tn A B C D), not (@eq (@Tpoint Tn) A B) *) unfold Par_strict; intros; spliter; auto. Qed. Lemma par_strict_neq2 : forall A B C D, Par_strict A B C D -> C <> D. Proof. (* Goal: forall (A B C D : @Tpoint Tn) (_ : @Par_strict Tn A B C D), not (@eq (@Tpoint Tn) C D) *) unfold Par_strict; intros; spliter; auto. Qed. Lemma par_neq1 : forall A B C D, Par A B C D -> A <> B. Proof. (* Goal: forall (A B C D : @Tpoint Tn) (_ : @Par Tn A B C D), not (@eq (@Tpoint Tn) A B) *) unfold Par, Par_strict; intros; induction H; spliter; auto. Qed. Lemma par_neq2 : forall A B C D, Par A B C D -> C <> D. Proof. (* Goal: forall (A B C D : @Tpoint Tn) (_ : @Par Tn A B C D), not (@eq (@Tpoint Tn) C D) *) unfold Par, Par_strict; intros; induction H; spliter; auto. Qed. End T12_1. Ltac assert_diffs := repeat match goal with | H:(~Col ?X1 ?X2 ?X3) |- _ => let h := fresh in not_exist_hyp3 X1 X2 X1 X3 X2 X3; assert (h := not_col_distincts X1 X2 X3 H);decompose [and] h;clear h;clean_reap_hyps | H:(~Bet ?X1 ?X2 ?X3) |- _ => let h := fresh in not_exist_hyp2 X1 X2 X2 X3; assert (h := not_bet_distincts X1 X2 X3 H);decompose [and] h;clear h;clean_reap_hyps | H:Bet ?A ?B ?C, H2 : ?A <> ?B |-_ => let T:= fresh in (not_exist_hyp_comm A C); assert (T:= bet_neq12__neq A B C H H2);clean_reap_hyps | H:Bet ?A ?B ?C, H2 : ?B <> ?A |-_ => let T:= fresh in (not_exist_hyp_comm A C); assert (T:= bet_neq21__neq A B C H H2);clean_reap_hyps | H:Bet ?A ?B ?C, H2 : ?B <> ?C |-_ => let T:= fresh in (not_exist_hyp_comm A C); assert (T:= bet_neq23__neq A B C H H2);clean_reap_hyps | H:Bet ?A ?B ?C, H2 : ?C <> ?B |-_ => let T:= fresh in (not_exist_hyp_comm A C); assert (T:= bet_neq32__neq A B C H H2);clean_reap_hyps | H:Cong ?A ?B ?C ?D, H2 : ?A <> ?B |-_ => let T:= fresh in (not_exist_hyp_comm C D); assert (T:= cong_diff A B C D H2 H);clean_reap_hyps | H:Cong ?A ?B ?C ?D, H2 : ?B <> ?A |-_ => let T:= fresh in (not_exist_hyp_comm C D); assert (T:= cong_diff_2 A B C D H2 H);clean_reap_hyps | H:Cong ?A ?B ?C ?D, H2 : ?C <> ?D |-_ => let T:= fresh in (not_exist_hyp_comm A B); assert (T:= cong_diff_3 A B C D H2 H);clean_reap_hyps | H:Cong ?A ?B ?C ?D, H2 : ?D <> ?C |-_ => let T:= fresh in (not_exist_hyp_comm A B); assert (T:= cong_diff_4 A B C D H2 H);clean_reap_hyps | H:Le ?A ?B ?C ?D, H2 : ?A <> ?B |-_ => let T:= fresh in (not_exist_hyp_comm C D); assert (T:= le_diff A B C D H2 H);clean_reap_hyps | H:Le ?A ?B ?C ?D, H2 : ?B <> ?A |-_ => let T:= fresh in (not_exist_hyp_comm C D); assert (T:= le_diff A B C D (swap_diff B A H2) H);clean_reap_hyps | H:Lt ?A ?B ?C ?D |-_ => let T:= fresh in (not_exist_hyp_comm C D); assert (T:= lt_diff A B C D H);clean_reap_hyps | H:Midpoint ?I ?A ?B, H2 : ?A<>?B |- _ => let T:= fresh in (not_exist_hyp2 I B I A); assert (T:= midpoint_distinct_1 I A B H2 H); decompose [and] T;clear T;clean_reap_hyps | H:Midpoint ?I ?A ?B, H2 : ?B<>?A |- _ => let T:= fresh in (not_exist_hyp2 I B I A); assert (T:= midpoint_distinct_1 I A B (swap_diff B A H2) H); decompose [and] T;clear T;clean_reap_hyps | H:Midpoint ?I ?A ?B, H2 : ?I<>?A |- _ => let T:= fresh in (not_exist_hyp2 I B A B); assert (T:= midpoint_distinct_2 I A B H2 H); decompose [and] T;clear T;clean_reap_hyps | H:Midpoint ?I ?A ?B, H2 : ?A<>?I |- _ => let T:= fresh in (not_exist_hyp2 I B A B); assert (T:= midpoint_distinct_2 I A B (swap_diff A I H2) H); decompose [and] T;clear T;clean_reap_hyps | H:Midpoint ?I ?A ?B, H2 : ?I<>?B |- _ => let T:= fresh in (not_exist_hyp2 I A A B); assert (T:= midpoint_distinct_3 I A B H2 H); decompose [and] T;clear T;clean_reap_hyps | H:Midpoint ?I ?A ?B, H2 : ?B<>?I |- _ => let T:= fresh in (not_exist_hyp2 I A A B); assert (T:= midpoint_distinct_3 I A B (swap_diff B I H2) H); decompose [and] T;clear T;clean_reap_hyps | H:Per ?A ?B ?C, H2 : ?A<>?B |- _ => let T:= fresh in (not_exist_hyp_comm A C); assert (T:= per_distinct A B C H H2); clean_reap_hyps | H:Per ?A ?B ?C, H2 : ?B<>?A |- _ => let T:= fresh in (not_exist_hyp_comm A C); assert (T:= per_distinct A B C H (swap_diff B A H2)); clean_reap_hyps | H:Per ?A ?B ?C, H2 : ?B<>?C |- _ => let T:= fresh in (not_exist_hyp_comm A C); assert (T:= per_distinct_1 A B C H H2); clean_reap_hyps | H:Per ?A ?B ?C, H2 : ?C<>?B |- _ => let T:= fresh in (not_exist_hyp_comm A C); assert (T:= per_distinct_1 A B C H (swap_diff C B H2)); clean_reap_hyps | H:Perp ?A ?B ?C ?D |- _ => let T:= fresh in (not_exist_hyp2 A B C D); assert (T:= perp_distinct A B C D H); decompose [and] T;clear T;clean_reap_hyps | H:Perp_at ?X ?A ?B ?C ?D |- _ => let T:= fresh in (not_exist_hyp2 A B C D); assert (T:= perp_in_distinct X A B C D H); decompose [and] T;clear T;clean_reap_hyps | H:Out ?A ?B ?C |- _ => let T:= fresh in (not_exist_hyp2 A B A C); assert (T:= out_distinct A B C H); decompose [and] T;clear T;clean_reap_hyps | H:TS ?A ?B ?C ?D |- _ => let h := fresh in not_exist_hyp6 A B A C A D B C B D C D; assert (h := ts_distincts A B C D H);decompose [and] h;clear h;clean_reap_hyps | H:OS ?A ?B ?C ?D |- _ => let h := fresh in not_exist_hyp5 A B A C A D B C B D; assert (h := os_distincts A B C D H);decompose [and] h;clear h;clean_reap_hyps | H:~ Coplanar ?A ?B ?C ?D |- _ => let h := fresh in not_exist_hyp6 A B A C A D B C B D C D; assert (h := ncop_distincts A B C D H);decompose [and] h;clear h;clean_reap_hyps | H:CongA ?A ?B ?C ?A' ?B' ?C' |- _ => let T:= fresh in (not_exist_hyp_comm A B); assert (T:= conga_diff1 A B C A' B' C' H);clean_reap_hyps | H:CongA ?A ?B ?C ?A' ?B' ?C' |- _ => let T:= fresh in (not_exist_hyp_comm B C); assert (T:= conga_diff2 A B C A' B' C' H);clean_reap_hyps | H:CongA ?A ?B ?C ?A' ?B' ?C' |- _ => let T:= fresh in (not_exist_hyp_comm A' B'); assert (T:= conga_diff45 A B C A' B' C' H);clean_reap_hyps | H:CongA ?A ?B ?C ?A' ?B' ?C' |- _ => let T:= fresh in (not_exist_hyp_comm B' C'); assert (T:= conga_diff56 A B C A' B' C' H);clean_reap_hyps | H:(InAngle ?P ?A ?B ?C) |- _ => let h := fresh in not_exist_hyp3 A B C B P B; assert (h := inangle_distincts A B C P H);decompose [and] h;clear h;clean_reap_hyps | H:LeA ?A ?B ?C ?D ?E ?F |- _ => let h := fresh in not_exist_hyp4 A B B C D E E F; assert (h := lea_distincts A B C D E F H);decompose [and] h;clear h;clean_reap_hyps | H:LtA ?A ?B ?C ?D ?E ?F |- _ => let h := fresh in not_exist_hyp4 A B B C D E E F; assert (h := lta_distincts A B C D E F H);decompose [and] h;clear h;clean_reap_hyps | H:(Acute ?A ?B ?C) |- _ => let h := fresh in not_exist_hyp2 A B B C; assert (h := acute_distincts A B C H);decompose [and] h;clear h;clean_reap_hyps | H:(Obtuse ?A ?B ?C) |- _ => let h := fresh in not_exist_hyp2 A B B C; assert (h := obtuse_distincts A B C H);decompose [and] h;clear h;clean_reap_hyps | H:SuppA ?A ?B ?C ?D ?E ?F |- _ => let h := fresh in not_exist_hyp4 A B B C D E E F; assert (h := suppa_distincts A B C D E F H);decompose [and] h;clear h;clean_reap_hyps | H:(Orth_at ?X ?A ?B ?C ?U ?V) |- _ => let h := fresh in not_exist_hyp4 A B A C B C U V; assert (h := orth_at_distincts A B C U V X H);decompose [and] h;clear h;clean_reap_hyps | H:(Orth ?A ?B ?C ?U ?V) |- _ => let h := fresh in not_exist_hyp4 A B A C B C U V; assert (h := orth_distincts A B C U V H);decompose [and] h;clear h;clean_reap_hyps | H:Par ?A ?B ?C ?D |- _ => let T:= fresh in (not_exist_hyp_comm A B); assert (T:= par_neq1 A B C D H);clean_reap_hyps | H:Par ?A ?B ?C ?D |- _ => let T:= fresh in (not_exist_hyp_comm C D); assert (T:= par_neq2 A B C D H);clean_reap_hyps | H:Par_strict ?A ?B ?C ?D |- _ => let T:= fresh in (not_exist_hyp_comm A B); assert (T:= par_strict_neq1 A B C D H);clean_reap_hyps | H:Par_strict ?A ?B ?C ?D |- _ => let T:= fresh in (not_exist_hyp_comm C D); assert (T:= par_strict_neq2 A B C D H);clean_reap_hyps end. Ltac assert_ncols := repeat match goal with | H:OS ?A ?B ?X ?Y |- _ => not_exist_hyp_perm_ncol A B X;assert (~ Col A B X) by (apply(one_side_not_col123 A B X Y);finish) | H:OS ?A ?B ?X ?Y |- _ => not_exist_hyp_perm_ncol A B Y;assert (~ Col A B Y) by (apply(one_side_not_col124 A B X Y);finish) | H:TS ?A ?B ?X ?Y |- _ => not_exist_hyp_perm_ncol A B X;assert (~ Col A B X) by (apply(two_sides_not_col A B X Y);finish) | H:TS ?A ?B ?X ?Y |- _ => not_exist_hyp_perm_ncol A B Y;assert (~ Col A B Y) by (apply(two_sides_not_col A B Y X);finish) | H:~ Coplanar ?A ?B ?C ?D |- _ => let h := fresh in not_exist_hyp_perm4 A B C D; assert (h := ncop__ncols A B C D H);decompose [and] h;clear h;clean_reap_hyps | H:Par_strict ?A ?B ?C ?D |- _ => let h := fresh in not_exist_hyp_perm4 A B C D; assert (h := par_strict_not_cols A B C D H);decompose [and] h;clear h;clean_reap_hyps end. Hint Resolve par_reflexivity par_strict_irreflexivity par_strict_symmetry par_strict_comm par_strict_right_comm par_strict_left_comm par_symmetry par_comm par_right_comm par_left_comm : par. Hint Resolve par_strict_not_col_1 par_strict_not_col_2 par_strict_not_col_3 par_strict_not_col_4 : col. Ltac Par := eauto with par. Section T12_2. Context `{TnEQD:Tarski_neutral_dimensionless_with_decidable_point_equality}. Lemma Par_cases : forall A B C D, Par A B C D \/ Par B A C D \/ Par A B D C \/ Par B A D C \/ Par C D A B \/ Par C D B A \/ Par D C A B \/ Par D C B A -> Par A B C D. Proof. (* Goal: forall (A B C D : @Tpoint Tn) (_ : or (@Par Tn A B C D) (or (@Par Tn B A C D) (or (@Par Tn A B D C) (or (@Par Tn B A D C) (or (@Par Tn C D A B) (or (@Par Tn C D B A) (or (@Par Tn D C A B) (@Par Tn D C B A)))))))), @Par Tn A B C D *) intros. (* Goal: @Par Tn A B C D *) decompose [or] H;Par. Qed. Lemma Par_perm : forall A B C D, Par A B C D -> Par A B C D /\ Par B A C D /\ Par A B D C /\ Par B A D C /\ Par C D A B /\ Par C D B A /\ Par D C A B /\ Par D C B A. Proof. (* Goal: forall (A B C D : @Tpoint Tn) (_ : @Par Tn A B C D), and (@Par Tn A B C D) (and (@Par Tn B A C D) (and (@Par Tn A B D C) (and (@Par Tn B A D C) (and (@Par Tn C D A B) (and (@Par Tn C D B A) (and (@Par Tn D C A B) (@Par Tn D C B A))))))) *) intros. (* Goal: and (@Par Tn A B C D) (and (@Par Tn B A C D) (and (@Par Tn A B D C) (and (@Par Tn B A D C) (and (@Par Tn C D A B) (and (@Par Tn C D B A) (and (@Par Tn D C A B) (@Par Tn D C B A))))))) *) do 7 (split; Par). Qed. Lemma Par_strict_cases : forall A B C D, Par_strict A B C D \/ Par_strict B A C D \/ Par_strict A B D C \/ Par_strict B A D C \/ Par_strict C D A B \/ Par_strict C D B A \/ Par_strict D C A B \/ Par_strict D C B A -> Par_strict A B C D. Proof. (* Goal: forall (A B C D : @Tpoint Tn) (_ : or (@Par_strict Tn A B C D) (or (@Par_strict Tn B A C D) (or (@Par_strict Tn A B D C) (or (@Par_strict Tn B A D C) (or (@Par_strict Tn C D A B) (or (@Par_strict Tn C D B A) (or (@Par_strict Tn D C A B) (@Par_strict Tn D C B A)))))))), @Par_strict Tn A B C D *) intros. (* Goal: @Par_strict Tn A B C D *) decompose [or] H; eauto with par. Qed. Lemma Par_strict_perm : forall A B C D, Par_strict A B C D -> Par_strict A B C D /\ Par_strict B A C D /\ Par_strict A B D C /\ Par_strict B A D C /\ Par_strict C D A B /\ Par_strict C D B A /\ Par_strict D C A B /\ Par_strict D C B A. End T12_2. Section T12_2'. Context `{TnEQD:Tarski_neutral_dimensionless_with_decidable_point_equality}. Lemma l12_6 : forall A B C D, Par_strict A B C D -> OS A B C D. Proof. (* Goal: forall (A B C D : @Tpoint Tn) (_ : @Par_strict Tn A B C D), @OS Tn A B C D *) intros. (* Goal: @OS Tn A B C D *) unfold Par_strict in H. (* Goal: @OS Tn A B C D *) spliter. (* Goal: @OS Tn A B C D *) assert(HH:= cop__not_two_sides_one_side A B C D). (* Goal: @OS Tn A B C D *) apply HH. (* Goal: not (@TS Tn A B C D) *) (* Goal: not (@Col Tn D A B) *) (* Goal: not (@Col Tn C A B) *) (* Goal: @Coplanar Tn A B C D *) assumption. (* Goal: not (@TS Tn A B C D) *) (* Goal: not (@Col Tn D A B) *) (* Goal: not (@Col Tn C A B) *) intro. (* Goal: not (@TS Tn A B C D) *) (* Goal: not (@Col Tn D A B) *) (* Goal: False *) apply H2. (* Goal: not (@TS Tn A B C D) *) (* Goal: not (@Col Tn D A B) *) (* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A B) (@Col Tn X C D)) *) exists C;Col. (* Goal: not (@TS Tn A B C D) *) (* Goal: not (@Col Tn D A B) *) intro. (* Goal: not (@TS Tn A B C D) *) (* Goal: False *) apply H2. (* Goal: not (@TS Tn A B C D) *) (* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A B) (@Col Tn X C D)) *) exists D;Col. (* Goal: not (@TS Tn A B C D) *) intro. (* Goal: False *) apply H2. (* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A B) (@Col Tn X C D)) *) unfold TS in H3. (* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A B) (@Col Tn X C D)) *) spliter. (* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A B) (@Col Tn X C D)) *) ex_and H5 T. (* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A B) (@Col Tn X C D)) *) exists T. (* Goal: and (@Col Tn T A B) (@Col Tn T C D) *) eauto using bet_col with col. Qed. Lemma pars__os3412 : forall A B C D, Par_strict A B C D -> OS C D A B. Proof. (* Goal: forall (A B C D : @Tpoint Tn) (_ : @Par_strict Tn A B C D), @OS Tn C D A B *) intros. (* Goal: @OS Tn C D A B *) apply l12_6. (* Goal: @Par_strict Tn C D A B *) apply par_strict_symmetry. (* Goal: @Par_strict Tn A B C D *) assumption. Qed. Lemma perp_dec : forall A B C D, Perp A B C D \/ ~ Perp A B C D. Proof. (* Goal: forall A B C D : @Tpoint Tn, or (@Perp Tn A B C D) (not (@Perp Tn A B C D)) *) intros. (* Goal: or (@Perp Tn A B C D) (not (@Perp Tn A B C D)) *) induction (col_dec A B C). (* Goal: or (@Perp Tn A B C D) (not (@Perp Tn A B C D)) *) (* Goal: or (@Perp Tn A B C D) (not (@Perp Tn A B C D)) *) induction (perp_in_dec C A B C D). (* Goal: or (@Perp Tn A B C D) (not (@Perp Tn A B C D)) *) (* Goal: or (@Perp Tn A B C D) (not (@Perp Tn A B C D)) *) (* Goal: or (@Perp Tn A B C D) (not (@Perp Tn A B C D)) *) left. (* Goal: or (@Perp Tn A B C D) (not (@Perp Tn A B C D)) *) (* Goal: or (@Perp Tn A B C D) (not (@Perp Tn A B C D)) *) (* Goal: @Perp Tn A B C D *) apply l8_14_2_1a with C;auto. (* Goal: or (@Perp Tn A B C D) (not (@Perp Tn A B C D)) *) (* Goal: or (@Perp Tn A B C D) (not (@Perp Tn A B C D)) *) right. (* Goal: or (@Perp Tn A B C D) (not (@Perp Tn A B C D)) *) (* Goal: not (@Perp Tn A B C D) *) intro. (* Goal: or (@Perp Tn A B C D) (not (@Perp Tn A B C D)) *) (* Goal: False *) apply H0. (* Goal: or (@Perp Tn A B C D) (not (@Perp Tn A B C D)) *) (* Goal: @Perp_at Tn C A B C D *) clear H0. (* Goal: or (@Perp Tn A B C D) (not (@Perp Tn A B C D)) *) (* Goal: @Perp_at Tn C A B C D *) apply perp_in_right_comm. (* Goal: or (@Perp Tn A B C D) (not (@Perp Tn A B C D)) *) (* Goal: @Perp_at Tn C A B D C *) apply (l8_15_1 A B D C). (* Goal: or (@Perp Tn A B C D) (not (@Perp Tn A B C D)) *) (* Goal: @Perp Tn A B D C *) (* Goal: @Col Tn A B C *) apply perp_distinct in H1. (* Goal: or (@Perp Tn A B C D) (not (@Perp Tn A B C D)) *) (* Goal: @Perp Tn A B D C *) (* Goal: @Col Tn A B C *) intuition. (* Goal: or (@Perp Tn A B C D) (not (@Perp Tn A B C D)) *) (* Goal: @Perp Tn A B D C *) apply perp_right_comm;assumption. (* Goal: or (@Perp Tn A B C D) (not (@Perp Tn A B C D)) *) elim (l8_18_existence A B C H); intros P HP. (* Goal: or (@Perp Tn A B C D) (not (@Perp Tn A B C D)) *) spliter. (* Goal: or (@Perp Tn A B C D) (not (@Perp Tn A B C D)) *) induction (eq_dec_points C D). (* Goal: or (@Perp Tn A B C D) (not (@Perp Tn A B C D)) *) (* Goal: or (@Perp Tn A B C D) (not (@Perp Tn A B C D)) *) subst. (* Goal: or (@Perp Tn A B C D) (not (@Perp Tn A B C D)) *) (* Goal: or (@Perp Tn A B D D) (not (@Perp Tn A B D D)) *) right. (* Goal: or (@Perp Tn A B C D) (not (@Perp Tn A B C D)) *) (* Goal: not (@Perp Tn A B D D) *) intro. (* Goal: or (@Perp Tn A B C D) (not (@Perp Tn A B C D)) *) (* Goal: False *) assert (A <> B /\ D <> D) by (apply perp_distinct;assumption). (* Goal: or (@Perp Tn A B C D) (not (@Perp Tn A B C D)) *) (* Goal: False *) intuition. (* Goal: or (@Perp Tn A B C D) (not (@Perp Tn A B C D)) *) induction (col_dec P C D). (* Goal: or (@Perp Tn A B C D) (not (@Perp Tn A B C D)) *) (* Goal: or (@Perp Tn A B C D) (not (@Perp Tn A B C D)) *) left. (* Goal: or (@Perp Tn A B C D) (not (@Perp Tn A B C D)) *) (* Goal: @Perp Tn A B C D *) assert (A <> B /\ C <> P) by (apply perp_distinct;assumption). (* Goal: or (@Perp Tn A B C D) (not (@Perp Tn A B C D)) *) (* Goal: @Perp Tn A B C D *) spliter. (* Goal: or (@Perp Tn A B C D) (not (@Perp Tn A B C D)) *) (* Goal: @Perp Tn A B C D *) apply perp_col1 with P;Col. (* Goal: or (@Perp Tn A B C D) (not (@Perp Tn A B C D)) *) right. (* Goal: not (@Perp Tn A B C D) *) intro. (* Goal: False *) apply H3. (* Goal: @Col Tn P C D *) apply col_permutation_2, cop_perp2__col with A B; [Cop|apply perp_sym;assumption..]. Qed. Lemma col_cop2_perp2__col : forall X1 X2 Y1 Y2 A B, Perp X1 X2 A B -> Perp Y1 Y2 A B -> Col X1 Y1 Y2 -> Coplanar A B X2 Y1 -> Coplanar A B X2 Y2 -> Col X2 Y1 Y2. Lemma col_perp2_ncol__col : forall X1 X2 Y1 Y2 A B, Perp X1 X2 A B -> Perp Y1 Y2 A B -> Col X1 Y1 Y2 -> ~ Col X1 A B -> Col X2 Y1 Y2. Proof. (* Goal: forall (X1 X2 Y1 Y2 A B : @Tpoint Tn) (_ : @Perp Tn X1 X2 A B) (_ : @Perp Tn Y1 Y2 A B) (_ : @Col Tn X1 Y1 Y2) (_ : not (@Col Tn X1 A B)), @Col Tn X2 Y1 Y2 *) intros. (* Goal: @Col Tn X2 Y1 Y2 *) assert (Coplanar A B X2 Y1). (* Goal: @Col Tn X2 Y1 Y2 *) (* Goal: @Coplanar Tn A B X2 Y1 *) induction (eq_dec_points X1 Y1). (* Goal: @Col Tn X2 Y1 Y2 *) (* Goal: @Coplanar Tn A B X2 Y1 *) (* Goal: @Coplanar Tn A B X2 Y1 *) subst; Cop. (* Goal: @Col Tn X2 Y1 Y2 *) (* Goal: @Coplanar Tn A B X2 Y1 *) apply coplanar_trans_1 with X1; [Cop..|]. (* Goal: @Col Tn X2 Y1 Y2 *) (* Goal: @Coplanar Tn X1 A B Y1 *) assert (Perp Y1 X1 A B) by (apply perp_col with Y2; Col); Cop. (* Goal: @Col Tn X2 Y1 Y2 *) assert (Coplanar A B X2 Y2). (* Goal: @Col Tn X2 Y1 Y2 *) (* Goal: @Coplanar Tn A B X2 Y2 *) induction (eq_dec_points X1 Y2). (* Goal: @Col Tn X2 Y1 Y2 *) (* Goal: @Coplanar Tn A B X2 Y2 *) (* Goal: @Coplanar Tn A B X2 Y2 *) subst; Cop. (* Goal: @Col Tn X2 Y1 Y2 *) (* Goal: @Coplanar Tn A B X2 Y2 *) apply coplanar_trans_1 with X1; [Cop..|]. (* Goal: @Col Tn X2 Y1 Y2 *) (* Goal: @Coplanar Tn X1 A B Y2 *) assert (Perp Y2 X1 A B) by (apply perp_col with Y1; Perp; Col); Cop. (* Goal: @Col Tn X2 Y1 Y2 *) apply col_cop2_perp2__col with X1 A B; assumption. Qed. Lemma l12_9 : forall A1 A2 B1 B2 C1 C2, Coplanar C1 C2 A1 B1 -> Coplanar C1 C2 A1 B2 -> Coplanar C1 C2 A2 B1 -> Coplanar C1 C2 A2 B2 -> Perp A1 A2 C1 C2 -> Perp B1 B2 C1 C2 -> Par A1 A2 B1 B2. Proof. (* Goal: forall (A1 A2 B1 B2 C1 C2 : @Tpoint Tn) (_ : @Coplanar Tn C1 C2 A1 B1) (_ : @Coplanar Tn C1 C2 A1 B2) (_ : @Coplanar Tn C1 C2 A2 B1) (_ : @Coplanar Tn C1 C2 A2 B2) (_ : @Perp Tn A1 A2 C1 C2) (_ : @Perp Tn B1 B2 C1 C2), @Par Tn A1 A2 B1 B2 *) intros A1 A2 B1 B2 C1 C2. (* Goal: forall (_ : @Coplanar Tn C1 C2 A1 B1) (_ : @Coplanar Tn C1 C2 A1 B2) (_ : @Coplanar Tn C1 C2 A2 B1) (_ : @Coplanar Tn C1 C2 A2 B2) (_ : @Perp Tn A1 A2 C1 C2) (_ : @Perp Tn B1 B2 C1 C2), @Par Tn A1 A2 B1 B2 *) intros. (* Goal: @Par Tn A1 A2 B1 B2 *) unfold Par. (* Goal: or (@Par_strict Tn A1 A2 B1 B2) (and (not (@eq (@Tpoint Tn) A1 A2)) (and (not (@eq (@Tpoint Tn) B1 B2)) (and (@Col Tn A1 B1 B2) (@Col Tn A2 B1 B2)))) *) unfold Par_strict. (* Goal: or (and (not (@eq (@Tpoint Tn) A1 A2)) (and (not (@eq (@Tpoint Tn) B1 B2)) (and (@Coplanar Tn A1 A2 B1 B2) (not (@ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A1 A2) (@Col Tn X B1 B2))))))) (and (not (@eq (@Tpoint Tn) A1 A2)) (and (not (@eq (@Tpoint Tn) B1 B2)) (and (@Col Tn A1 B1 B2) (@Col Tn A2 B1 B2)))) *) assert(A1 <> A2 /\ C1 <> C2) by (apply perp_distinct;assumption). (* Goal: or (and (not (@eq (@Tpoint Tn) A1 A2)) (and (not (@eq (@Tpoint Tn) B1 B2)) (and (@Coplanar Tn A1 A2 B1 B2) (not (@ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A1 A2) (@Col Tn X B1 B2))))))) (and (not (@eq (@Tpoint Tn) A1 A2)) (and (not (@eq (@Tpoint Tn) B1 B2)) (and (@Col Tn A1 B1 B2) (@Col Tn A2 B1 B2)))) *) assert(B1 <> B2 /\ C1 <> C2) by (apply perp_distinct;assumption). (* Goal: or (and (not (@eq (@Tpoint Tn) A1 A2)) (and (not (@eq (@Tpoint Tn) B1 B2)) (and (@Coplanar Tn A1 A2 B1 B2) (not (@ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A1 A2) (@Col Tn X B1 B2))))))) (and (not (@eq (@Tpoint Tn) A1 A2)) (and (not (@eq (@Tpoint Tn) B1 B2)) (and (@Col Tn A1 B1 B2) (@Col Tn A2 B1 B2)))) *) spliter. (* Goal: or (and (not (@eq (@Tpoint Tn) A1 A2)) (and (not (@eq (@Tpoint Tn) B1 B2)) (and (@Coplanar Tn A1 A2 B1 B2) (not (@ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A1 A2) (@Col Tn X B1 B2))))))) (and (not (@eq (@Tpoint Tn) A1 A2)) (and (not (@eq (@Tpoint Tn) B1 B2)) (and (@Col Tn A1 B1 B2) (@Col Tn A2 B1 B2)))) *) induction(col_dec A1 B1 B2). (* Goal: or (and (not (@eq (@Tpoint Tn) A1 A2)) (and (not (@eq (@Tpoint Tn) B1 B2)) (and (@Coplanar Tn A1 A2 B1 B2) (not (@ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A1 A2) (@Col Tn X B1 B2))))))) (and (not (@eq (@Tpoint Tn) A1 A2)) (and (not (@eq (@Tpoint Tn) B1 B2)) (and (@Col Tn A1 B1 B2) (@Col Tn A2 B1 B2)))) *) (* Goal: or (and (not (@eq (@Tpoint Tn) A1 A2)) (and (not (@eq (@Tpoint Tn) B1 B2)) (and (@Coplanar Tn A1 A2 B1 B2) (not (@ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A1 A2) (@Col Tn X B1 B2))))))) (and (not (@eq (@Tpoint Tn) A1 A2)) (and (not (@eq (@Tpoint Tn) B1 B2)) (and (@Col Tn A1 B1 B2) (@Col Tn A2 B1 B2)))) *) right. (* Goal: or (and (not (@eq (@Tpoint Tn) A1 A2)) (and (not (@eq (@Tpoint Tn) B1 B2)) (and (@Coplanar Tn A1 A2 B1 B2) (not (@ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A1 A2) (@Col Tn X B1 B2))))))) (and (not (@eq (@Tpoint Tn) A1 A2)) (and (not (@eq (@Tpoint Tn) B1 B2)) (and (@Col Tn A1 B1 B2) (@Col Tn A2 B1 B2)))) *) (* Goal: and (not (@eq (@Tpoint Tn) A1 A2)) (and (not (@eq (@Tpoint Tn) B1 B2)) (and (@Col Tn A1 B1 B2) (@Col Tn A2 B1 B2))) *) repeat split; auto. (* Goal: or (and (not (@eq (@Tpoint Tn) A1 A2)) (and (not (@eq (@Tpoint Tn) B1 B2)) (and (@Coplanar Tn A1 A2 B1 B2) (not (@ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A1 A2) (@Col Tn X B1 B2))))))) (and (not (@eq (@Tpoint Tn) A1 A2)) (and (not (@eq (@Tpoint Tn) B1 B2)) (and (@Col Tn A1 B1 B2) (@Col Tn A2 B1 B2)))) *) (* Goal: @Col Tn A2 B1 B2 *) apply col_cop2_perp2__col with A1 C1 C2; auto. (* Goal: or (and (not (@eq (@Tpoint Tn) A1 A2)) (and (not (@eq (@Tpoint Tn) B1 B2)) (and (@Coplanar Tn A1 A2 B1 B2) (not (@ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A1 A2) (@Col Tn X B1 B2))))))) (and (not (@eq (@Tpoint Tn) A1 A2)) (and (not (@eq (@Tpoint Tn) B1 B2)) (and (@Col Tn A1 B1 B2) (@Col Tn A2 B1 B2)))) *) left. (* Goal: and (not (@eq (@Tpoint Tn) A1 A2)) (and (not (@eq (@Tpoint Tn) B1 B2)) (and (@Coplanar Tn A1 A2 B1 B2) (not (@ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A1 A2) (@Col Tn X B1 B2)))))) *) repeat split. (* Goal: not (@ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A1 A2) (@Col Tn X B1 B2))) *) (* Goal: @Coplanar Tn A1 A2 B1 B2 *) (* Goal: not (@eq (@Tpoint Tn) B1 B2) *) (* Goal: not (@eq (@Tpoint Tn) A1 A2) *) assumption. (* Goal: not (@ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A1 A2) (@Col Tn X B1 B2))) *) (* Goal: @Coplanar Tn A1 A2 B1 B2 *) (* Goal: not (@eq (@Tpoint Tn) B1 B2) *) assumption. (* Goal: not (@ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A1 A2) (@Col Tn X B1 B2))) *) (* Goal: @Coplanar Tn A1 A2 B1 B2 *) induction (perp_not_col2 C1 C2 A1 A2); Perp. (* Goal: not (@ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A1 A2) (@Col Tn X B1 B2))) *) (* Goal: @Coplanar Tn A1 A2 B1 B2 *) (* Goal: @Coplanar Tn A1 A2 B1 B2 *) apply coplanar_pseudo_trans with C1 C2 A1; Cop. (* Goal: not (@ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A1 A2) (@Col Tn X B1 B2))) *) (* Goal: @Coplanar Tn A1 A2 B1 B2 *) apply coplanar_pseudo_trans with C1 C2 A2; Cop. (* Goal: not (@ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A1 A2) (@Col Tn X B1 B2))) *) intro. (* Goal: False *) ex_and H10 AB. (* Goal: False *) apply H9. (* Goal: @Col Tn A1 B1 B2 *) induction(eq_dec_points AB A1). (* Goal: @Col Tn A1 B1 B2 *) (* Goal: @Col Tn A1 B1 B2 *) subst AB. (* Goal: @Col Tn A1 B1 B2 *) (* Goal: @Col Tn A1 B1 B2 *) assumption. (* Goal: @Col Tn A1 B1 B2 *) assert(Perp A1 AB C1 C2) by (eauto using perp_col with col). (* Goal: @Col Tn A1 B1 B2 *) apply col_cop2_perp2__col with AB C1 C2; Perp. Qed. Lemma parallel_existence : forall A B P, A <> B -> exists C, exists D, C<>D /\ Par A B C D /\ Col P C D. Proof. (* Goal: forall (A B P : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) A B)), @ex (@Tpoint Tn) (fun C : @Tpoint Tn => @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C D)) (and (@Par Tn A B C D) (@Col Tn P C D)))) *) intros. (* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C D)) (and (@Par Tn A B C D) (@Col Tn P C D)))) *) induction(col_dec A B P). (* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C D)) (and (@Par Tn A B C D) (@Col Tn P C D)))) *) (* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C D)) (and (@Par Tn A B C D) (@Col Tn P C D)))) *) exists A. (* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C D)) (and (@Par Tn A B C D) (@Col Tn P C D)))) *) (* Goal: @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (not (@eq (@Tpoint Tn) A D)) (and (@Par Tn A B A D) (@Col Tn P A D))) *) exists B. (* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C D)) (and (@Par Tn A B C D) (@Col Tn P C D)))) *) (* Goal: and (not (@eq (@Tpoint Tn) A B)) (and (@Par Tn A B A B) (@Col Tn P A B)) *) repeat split. (* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C D)) (and (@Par Tn A B C D) (@Col Tn P C D)))) *) (* Goal: @Col Tn P A B *) (* Goal: @Par Tn A B A B *) (* Goal: not (@eq (@Tpoint Tn) A B) *) assumption. (* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C D)) (and (@Par Tn A B C D) (@Col Tn P C D)))) *) (* Goal: @Col Tn P A B *) (* Goal: @Par Tn A B A B *) Par. (* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C D)) (and (@Par Tn A B C D) (@Col Tn P C D)))) *) (* Goal: @Col Tn P A B *) Col. (* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C D)) (and (@Par Tn A B C D) (@Col Tn P C D)))) *) assert(exists P', Col A B P' /\ Perp A B P P'). (* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C D)) (and (@Par Tn A B C D) (@Col Tn P C D)))) *) (* Goal: @ex (@Tpoint Tn) (fun P' : @Tpoint Tn => and (@Col Tn A B P') (@Perp Tn A B P P')) *) eapply l8_18_existence. (* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C D)) (and (@Par Tn A B C D) (@Col Tn P C D)))) *) (* Goal: not (@Col Tn A B P) *) assumption. (* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C D)) (and (@Par Tn A B C D) (@Col Tn P C D)))) *) ex_and H1 P'. (* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C D)) (and (@Par Tn A B C D) (@Col Tn P C D)))) *) assert(P <> P'). (* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C D)) (and (@Par Tn A B C D) (@Col Tn P C D)))) *) (* Goal: not (@eq (@Tpoint Tn) P P') *) intro. (* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C D)) (and (@Par Tn A B C D) (@Col Tn P C D)))) *) (* Goal: False *) subst P'. (* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C D)) (and (@Par Tn A B C D) (@Col Tn P C D)))) *) (* Goal: False *) contradiction. (* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C D)) (and (@Par Tn A B C D) (@Col Tn P C D)))) *) induction(eq_dec_points P' A). (* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C D)) (and (@Par Tn A B C D) (@Col Tn P C D)))) *) (* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C D)) (and (@Par Tn A B C D) (@Col Tn P C D)))) *) subst P'. (* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C D)) (and (@Par Tn A B C D) (@Col Tn P C D)))) *) (* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C D)) (and (@Par Tn A B C D) (@Col Tn P C D)))) *) assert(exists Q, Per Q P A /\ Cong Q P A B /\ OS A P Q B). (* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C D)) (and (@Par Tn A B C D) (@Col Tn P C D)))) *) (* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C D)) (and (@Par Tn A B C D) (@Col Tn P C D)))) *) (* Goal: @ex (@Tpoint Tn) (fun Q : @Tpoint Tn => and (@Per Tn Q P A) (and (@Cong Tn Q P A B) (@OS Tn A P Q B))) *) eapply ex_per_cong. (* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C D)) (and (@Par Tn A B C D) (@Col Tn P C D)))) *) (* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C D)) (and (@Par Tn A B C D) (@Col Tn P C D)))) *) (* Goal: not (@Col Tn A P B) *) (* Goal: @Col Tn A P P *) (* Goal: not (@eq (@Tpoint Tn) A B) *) (* Goal: not (@eq (@Tpoint Tn) A P) *) auto. (* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C D)) (and (@Par Tn A B C D) (@Col Tn P C D)))) *) (* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C D)) (and (@Par Tn A B C D) (@Col Tn P C D)))) *) (* Goal: not (@Col Tn A P B) *) (* Goal: @Col Tn A P P *) (* Goal: not (@eq (@Tpoint Tn) A B) *) assumption. (* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C D)) (and (@Par Tn A B C D) (@Col Tn P C D)))) *) (* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C D)) (and (@Par Tn A B C D) (@Col Tn P C D)))) *) (* Goal: not (@Col Tn A P B) *) (* Goal: @Col Tn A P P *) apply col_trivial_2. (* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C D)) (and (@Par Tn A B C D) (@Col Tn P C D)))) *) (* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C D)) (and (@Par Tn A B C D) (@Col Tn P C D)))) *) (* Goal: not (@Col Tn A P B) *) intro. (* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C D)) (and (@Par Tn A B C D) (@Col Tn P C D)))) *) (* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C D)) (and (@Par Tn A B C D) (@Col Tn P C D)))) *) (* Goal: False *) apply H0. (* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C D)) (and (@Par Tn A B C D) (@Col Tn P C D)))) *) (* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C D)) (and (@Par Tn A B C D) (@Col Tn P C D)))) *) (* Goal: @Col Tn A B P *) Col. (* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C D)) (and (@Par Tn A B C D) (@Col Tn P C D)))) *) (* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C D)) (and (@Par Tn A B C D) (@Col Tn P C D)))) *) ex_and H4 Q. (* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C D)) (and (@Par Tn A B C D) (@Col Tn P C D)))) *) (* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C D)) (and (@Par Tn A B C D) (@Col Tn P C D)))) *) exists P. (* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C D)) (and (@Par Tn A B C D) (@Col Tn P C D)))) *) (* Goal: @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (not (@eq (@Tpoint Tn) P D)) (and (@Par Tn A B P D) (@Col Tn P P D))) *) exists Q. (* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C D)) (and (@Par Tn A B C D) (@Col Tn P C D)))) *) (* Goal: and (not (@eq (@Tpoint Tn) P Q)) (and (@Par Tn A B P Q) (@Col Tn P P Q)) *) assert(P <> Q). (* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C D)) (and (@Par Tn A B C D) (@Col Tn P C D)))) *) (* Goal: and (not (@eq (@Tpoint Tn) P Q)) (and (@Par Tn A B P Q) (@Col Tn P P Q)) *) (* Goal: not (@eq (@Tpoint Tn) P Q) *) intro. (* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C D)) (and (@Par Tn A B C D) (@Col Tn P C D)))) *) (* Goal: and (not (@eq (@Tpoint Tn) P Q)) (and (@Par Tn A B P Q) (@Col Tn P P Q)) *) (* Goal: False *) treat_equalities. (* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C D)) (and (@Par Tn A B C D) (@Col Tn P C D)))) *) (* Goal: and (not (@eq (@Tpoint Tn) P Q)) (and (@Par Tn A B P Q) (@Col Tn P P Q)) *) (* Goal: False *) intuition. (* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C D)) (and (@Par Tn A B C D) (@Col Tn P C D)))) *) (* Goal: and (not (@eq (@Tpoint Tn) P Q)) (and (@Par Tn A B P Q) (@Col Tn P P Q)) *) repeat split. (* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C D)) (and (@Par Tn A B C D) (@Col Tn P C D)))) *) (* Goal: @Col Tn P P Q *) (* Goal: @Par Tn A B P Q *) (* Goal: not (@eq (@Tpoint Tn) P Q) *) assumption. (* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C D)) (and (@Par Tn A B C D) (@Col Tn P C D)))) *) (* Goal: @Col Tn P P Q *) (* Goal: @Par Tn A B P Q *) apply l12_9 with P A; Cop. (* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C D)) (and (@Par Tn A B C D) (@Col Tn P C D)))) *) (* Goal: @Col Tn P P Q *) (* Goal: @Perp Tn P Q P A *) apply per_perp_in in H4. (* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C D)) (and (@Par Tn A B C D) (@Col Tn P C D)))) *) (* Goal: @Col Tn P P Q *) (* Goal: not (@eq (@Tpoint Tn) P A) *) (* Goal: not (@eq (@Tpoint Tn) Q P) *) (* Goal: @Perp Tn P Q P A *) apply perp_in_perp_bis in H4. (* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C D)) (and (@Par Tn A B C D) (@Col Tn P C D)))) *) (* Goal: @Col Tn P P Q *) (* Goal: not (@eq (@Tpoint Tn) P A) *) (* Goal: not (@eq (@Tpoint Tn) Q P) *) (* Goal: @Perp Tn P Q P A *) induction H4. (* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C D)) (and (@Par Tn A B C D) (@Col Tn P C D)))) *) (* Goal: @Col Tn P P Q *) (* Goal: not (@eq (@Tpoint Tn) P A) *) (* Goal: not (@eq (@Tpoint Tn) Q P) *) (* Goal: @Perp Tn P Q P A *) (* Goal: @Perp Tn P Q P A *) apply perp_distinct in H4. (* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C D)) (and (@Par Tn A B C D) (@Col Tn P C D)))) *) (* Goal: @Col Tn P P Q *) (* Goal: not (@eq (@Tpoint Tn) P A) *) (* Goal: not (@eq (@Tpoint Tn) Q P) *) (* Goal: @Perp Tn P Q P A *) (* Goal: @Perp Tn P Q P A *) spliter. (* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C D)) (and (@Par Tn A B C D) (@Col Tn P C D)))) *) (* Goal: @Col Tn P P Q *) (* Goal: not (@eq (@Tpoint Tn) P A) *) (* Goal: not (@eq (@Tpoint Tn) Q P) *) (* Goal: @Perp Tn P Q P A *) (* Goal: @Perp Tn P Q P A *) absurde. (* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C D)) (and (@Par Tn A B C D) (@Col Tn P C D)))) *) (* Goal: @Col Tn P P Q *) (* Goal: not (@eq (@Tpoint Tn) P A) *) (* Goal: not (@eq (@Tpoint Tn) Q P) *) (* Goal: @Perp Tn P Q P A *) apply perp_left_comm. (* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C D)) (and (@Par Tn A B C D) (@Col Tn P C D)))) *) (* Goal: @Col Tn P P Q *) (* Goal: not (@eq (@Tpoint Tn) P A) *) (* Goal: not (@eq (@Tpoint Tn) Q P) *) (* Goal: @Perp Tn Q P P A *) assumption. (* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C D)) (and (@Par Tn A B C D) (@Col Tn P C D)))) *) (* Goal: @Col Tn P P Q *) (* Goal: not (@eq (@Tpoint Tn) P A) *) (* Goal: not (@eq (@Tpoint Tn) Q P) *) auto. (* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C D)) (and (@Par Tn A B C D) (@Col Tn P C D)))) *) (* Goal: @Col Tn P P Q *) (* Goal: not (@eq (@Tpoint Tn) P A) *) assumption. (* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C D)) (and (@Par Tn A B C D) (@Col Tn P C D)))) *) (* Goal: @Col Tn P P Q *) Col. (* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C D)) (and (@Par Tn A B C D) (@Col Tn P C D)))) *) assert(exists Q, Per Q P P' /\ Cong Q P A B /\ OS P' P Q A). (* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C D)) (and (@Par Tn A B C D) (@Col Tn P C D)))) *) (* Goal: @ex (@Tpoint Tn) (fun Q : @Tpoint Tn => and (@Per Tn Q P P') (and (@Cong Tn Q P A B) (@OS Tn P' P Q A))) *) eapply ex_per_cong. (* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C D)) (and (@Par Tn A B C D) (@Col Tn P C D)))) *) (* Goal: not (@Col Tn P' P A) *) (* Goal: @Col Tn P' P P *) (* Goal: not (@eq (@Tpoint Tn) A B) *) (* Goal: not (@eq (@Tpoint Tn) P' P) *) auto. (* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C D)) (and (@Par Tn A B C D) (@Col Tn P C D)))) *) (* Goal: not (@Col Tn P' P A) *) (* Goal: @Col Tn P' P P *) (* Goal: not (@eq (@Tpoint Tn) A B) *) assumption. (* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C D)) (and (@Par Tn A B C D) (@Col Tn P C D)))) *) (* Goal: not (@Col Tn P' P A) *) (* Goal: @Col Tn P' P P *) Col. (* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C D)) (and (@Par Tn A B C D) (@Col Tn P C D)))) *) (* Goal: not (@Col Tn P' P A) *) intro. (* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C D)) (and (@Par Tn A B C D) (@Col Tn P C D)))) *) (* Goal: False *) apply H0. (* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C D)) (and (@Par Tn A B C D) (@Col Tn P C D)))) *) (* Goal: @Col Tn A B P *) eapply (col_transitivity_1 _ P'). (* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C D)) (and (@Par Tn A B C D) (@Col Tn P C D)))) *) (* Goal: @Col Tn A P' P *) (* Goal: @Col Tn A P' B *) (* Goal: not (@eq (@Tpoint Tn) A P') *) auto. (* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C D)) (and (@Par Tn A B C D) (@Col Tn P C D)))) *) (* Goal: @Col Tn A P' P *) (* Goal: @Col Tn A P' B *) Col. (* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C D)) (and (@Par Tn A B C D) (@Col Tn P C D)))) *) (* Goal: @Col Tn A P' P *) Col. (* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C D)) (and (@Par Tn A B C D) (@Col Tn P C D)))) *) ex_and H5 Q. (* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C D)) (and (@Par Tn A B C D) (@Col Tn P C D)))) *) exists P. (* Goal: @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (not (@eq (@Tpoint Tn) P D)) (and (@Par Tn A B P D) (@Col Tn P P D))) *) exists Q. (* Goal: and (not (@eq (@Tpoint Tn) P Q)) (and (@Par Tn A B P Q) (@Col Tn P P Q)) *) assert(P <> Q). (* Goal: and (not (@eq (@Tpoint Tn) P Q)) (and (@Par Tn A B P Q) (@Col Tn P P Q)) *) (* Goal: not (@eq (@Tpoint Tn) P Q) *) intro. (* Goal: and (not (@eq (@Tpoint Tn) P Q)) (and (@Par Tn A B P Q) (@Col Tn P P Q)) *) (* Goal: False *) treat_equalities. (* Goal: and (not (@eq (@Tpoint Tn) P Q)) (and (@Par Tn A B P Q) (@Col Tn P P Q)) *) (* Goal: False *) intuition. (* Goal: and (not (@eq (@Tpoint Tn) P Q)) (and (@Par Tn A B P Q) (@Col Tn P P Q)) *) repeat split. (* Goal: @Col Tn P P Q *) (* Goal: @Par Tn A B P Q *) (* Goal: not (@eq (@Tpoint Tn) P Q) *) assumption. (* Goal: @Col Tn P P Q *) (* Goal: @Par Tn A B P Q *) apply l12_9 with P P'. (* Goal: @Col Tn P P Q *) (* Goal: @Perp Tn P Q P P' *) (* Goal: @Perp Tn A B P P' *) (* Goal: @Coplanar Tn P P' B Q *) (* Goal: @Coplanar Tn P P' B P *) (* Goal: @Coplanar Tn P P' A Q *) (* Goal: @Coplanar Tn P P' A P *) exists P; left; split; Col. (* Goal: @Col Tn P P Q *) (* Goal: @Perp Tn P Q P P' *) (* Goal: @Perp Tn A B P P' *) (* Goal: @Coplanar Tn P P' B Q *) (* Goal: @Coplanar Tn P P' B P *) (* Goal: @Coplanar Tn P P' A Q *) Cop. (* Goal: @Col Tn P P Q *) (* Goal: @Perp Tn P Q P P' *) (* Goal: @Perp Tn A B P P' *) (* Goal: @Coplanar Tn P P' B Q *) (* Goal: @Coplanar Tn P P' B P *) exists P; left; split; Col. (* Goal: @Col Tn P P Q *) (* Goal: @Perp Tn P Q P P' *) (* Goal: @Perp Tn A B P P' *) (* Goal: @Coplanar Tn P P' B Q *) apply coplanar_perm_3, col_cop__cop with A; Col; Cop. (* Goal: @Col Tn P P Q *) (* Goal: @Perp Tn P Q P P' *) (* Goal: @Perp Tn A B P P' *) apply H2. (* Goal: @Col Tn P P Q *) (* Goal: @Perp Tn P Q P P' *) apply per_perp_in in H5. (* Goal: @Col Tn P P Q *) (* Goal: not (@eq (@Tpoint Tn) P P') *) (* Goal: not (@eq (@Tpoint Tn) Q P) *) (* Goal: @Perp Tn P Q P P' *) apply perp_in_perp_bis in H5. (* Goal: @Col Tn P P Q *) (* Goal: not (@eq (@Tpoint Tn) P P') *) (* Goal: not (@eq (@Tpoint Tn) Q P) *) (* Goal: @Perp Tn P Q P P' *) induction H5. (* Goal: @Col Tn P P Q *) (* Goal: not (@eq (@Tpoint Tn) P P') *) (* Goal: not (@eq (@Tpoint Tn) Q P) *) (* Goal: @Perp Tn P Q P P' *) (* Goal: @Perp Tn P Q P P' *) apply perp_distinct in H5. (* Goal: @Col Tn P P Q *) (* Goal: not (@eq (@Tpoint Tn) P P') *) (* Goal: not (@eq (@Tpoint Tn) Q P) *) (* Goal: @Perp Tn P Q P P' *) (* Goal: @Perp Tn P Q P P' *) spliter. (* Goal: @Col Tn P P Q *) (* Goal: not (@eq (@Tpoint Tn) P P') *) (* Goal: not (@eq (@Tpoint Tn) Q P) *) (* Goal: @Perp Tn P Q P P' *) (* Goal: @Perp Tn P Q P P' *) absurde. (* Goal: @Col Tn P P Q *) (* Goal: not (@eq (@Tpoint Tn) P P') *) (* Goal: not (@eq (@Tpoint Tn) Q P) *) (* Goal: @Perp Tn P Q P P' *) apply perp_left_comm. (* Goal: @Col Tn P P Q *) (* Goal: not (@eq (@Tpoint Tn) P P') *) (* Goal: not (@eq (@Tpoint Tn) Q P) *) (* Goal: @Perp Tn Q P P P' *) assumption. (* Goal: @Col Tn P P Q *) (* Goal: not (@eq (@Tpoint Tn) P P') *) (* Goal: not (@eq (@Tpoint Tn) Q P) *) auto. (* Goal: @Col Tn P P Q *) (* Goal: not (@eq (@Tpoint Tn) P P') *) assumption. (* Goal: @Col Tn P P Q *) Col. Qed. Lemma par_col_par : forall A B C D D', C <> D' -> Par A B C D -> Col C D D' -> Par A B C D'. Lemma parallel_existence1 : forall A B P, A <> B -> exists Q, Par A B P Q. Proof. (* Goal: forall (A B P : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) A B)), @ex (@Tpoint Tn) (fun Q : @Tpoint Tn => @Par Tn A B P Q) *) intros. (* Goal: @ex (@Tpoint Tn) (fun Q : @Tpoint Tn => @Par Tn A B P Q) *) assert (T:= parallel_existence A B P H). (* Goal: @ex (@Tpoint Tn) (fun Q : @Tpoint Tn => @Par Tn A B P Q) *) decompose [and ex] T;clear T. (* Goal: @ex (@Tpoint Tn) (fun Q : @Tpoint Tn => @Par Tn A B P Q) *) elim (eq_dec_points x P);intro. (* Goal: @ex (@Tpoint Tn) (fun Q : @Tpoint Tn => @Par Tn A B P Q) *) (* Goal: @ex (@Tpoint Tn) (fun Q : @Tpoint Tn => @Par Tn A B P Q) *) subst. (* Goal: @ex (@Tpoint Tn) (fun Q : @Tpoint Tn => @Par Tn A B P Q) *) (* Goal: @ex (@Tpoint Tn) (fun Q : @Tpoint Tn => @Par Tn A B P Q) *) exists x0. (* Goal: @ex (@Tpoint Tn) (fun Q : @Tpoint Tn => @Par Tn A B P Q) *) (* Goal: @Par Tn A B P x0 *) intuition. (* Goal: @ex (@Tpoint Tn) (fun Q : @Tpoint Tn => @Par Tn A B P Q) *) exists x. (* Goal: @Par Tn A B P x *) apply par_right_comm. (* Goal: @Par Tn A B x P *) apply par_col_par with x0; Par. (* Goal: @Col Tn x x0 P *) Col. Qed. Lemma par_not_col : forall A B C D X, Par_strict A B C D -> Col X A B -> ~Col X C D. Proof. (* Goal: forall (A B C D X : @Tpoint Tn) (_ : @Par_strict Tn A B C D) (_ : @Col Tn X A B), not (@Col Tn X C D) *) intros. (* Goal: not (@Col Tn X C D) *) unfold Par_strict in H. (* Goal: not (@Col Tn X C D) *) intro. (* Goal: False *) spliter. (* Goal: False *) apply H4. (* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A B) (@Col Tn X C D)) *) exists X; Col. Qed. Lemma not_strict_par1 : forall A B C D X, Par A B C D -> Col A B X -> Col C D X -> Col A B C. Lemma not_strict_par2 : forall A B C D X, Par A B C D -> Col A B X -> Col C D X -> Col A B D. Lemma not_strict_par : forall A B C D X, Par A B C D -> Col A B X -> Col C D X -> Col A B C /\ Col A B D. Lemma not_par_not_col : forall A B C, A <> B -> A <> C -> ~Par A B A C -> ~Col A B C. Proof. (* Goal: forall (A B C : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) A B)) (_ : not (@eq (@Tpoint Tn) A C)) (_ : not (@Par Tn A B A C)), not (@Col Tn A B C) *) intros. (* Goal: not (@Col Tn A B C) *) intro. (* Goal: False *) apply H1. (* Goal: @Par Tn A B A C *) unfold Par. (* Goal: or (@Par_strict Tn A B A C) (and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) A C)) (and (@Col Tn A A C) (@Col Tn B A C)))) *) right. (* Goal: and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) A C)) (and (@Col Tn A A C) (@Col Tn B A C))) *) repeat split. (* Goal: @Col Tn B A C *) (* Goal: @Col Tn A A C *) (* Goal: not (@eq (@Tpoint Tn) A C) *) (* Goal: not (@eq (@Tpoint Tn) A B) *) assumption. (* Goal: @Col Tn B A C *) (* Goal: @Col Tn A A C *) (* Goal: not (@eq (@Tpoint Tn) A C) *) assumption. (* Goal: @Col Tn B A C *) (* Goal: @Col Tn A A C *) apply col_trivial_1. (* Goal: @Col Tn B A C *) Col. Qed. Lemma not_par_inter_uniqueness : forall A B C D X Y, A <> B -> C <> D -> ~Par A B C D -> Col A B X -> Col C D X -> Col A B Y -> Col C D Y -> X = Y. Lemma inter_uniqueness_not_par : forall A B C D P, ~Col A B C -> Col A B P -> Col C D P -> ~Par A B C D. Proof. (* Goal: forall (A B C D P : @Tpoint Tn) (_ : not (@Col Tn A B C)) (_ : @Col Tn A B P) (_ : @Col Tn C D P), not (@Par Tn A B C D) *) intros. (* Goal: not (@Par Tn A B C D) *) intro. (* Goal: False *) unfold Par in H2. (* Goal: False *) induction H2. (* Goal: False *) (* Goal: False *) unfold Par_strict in H2. (* Goal: False *) (* Goal: False *) spliter. (* Goal: False *) (* Goal: False *) apply H5. (* Goal: False *) (* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A B) (@Col Tn X C D)) *) exists P. (* Goal: False *) (* Goal: and (@Col Tn P A B) (@Col Tn P C D) *) Col5. (* Goal: False *) spliter. (* Goal: False *) apply H. (* Goal: @Col Tn A B C *) ColR. Qed. Lemma col_not_col_not_par : forall A B C D, (exists P, Col A B P /\ Col C D P) -> (exists Q, Col C D Q /\ ~Col A B Q) -> ~Par A B C D. Lemma par_distincts : forall A B C D, Par A B C D -> (Par A B C D /\ A <> B /\ C <> D). Proof. (* Goal: forall (A B C D : @Tpoint Tn) (_ : @Par Tn A B C D), and (@Par Tn A B C D) (and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C D))) *) intros. (* Goal: and (@Par Tn A B C D) (and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C D))) *) split. (* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C D)) *) (* Goal: @Par Tn A B C D *) assumption. (* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C D)) *) unfold Par in H. (* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C D)) *) induction H. (* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C D)) *) (* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C D)) *) unfold Par_strict in H. (* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C D)) *) (* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C D)) *) spliter. (* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C D)) *) (* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C D)) *) split; assumption. (* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C D)) *) spliter. (* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C D)) *) split; assumption. Qed. Lemma par_not_col_strict : forall A B C D P, Par A B C D -> Col C D P -> ~Col A B P -> Par_strict A B C D. Lemma all_one_side_par_strict : forall A B C D, C <> D -> (forall P, Col C D P -> OS A B C P) -> Par_strict A B C D. Proof. (* Goal: forall (A B C D : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) C D)) (_ : forall (P : @Tpoint Tn) (_ : @Col Tn C D P), @OS Tn A B C P), @Par_strict Tn A B C D *) intros. (* Goal: @Par_strict Tn A B C D *) unfold Par_strict. (* Goal: and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C D)) (and (@Coplanar Tn A B C D) (not (@ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A B) (@Col Tn X C D)))))) *) repeat split. (* Goal: not (@ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A B) (@Col Tn X C D))) *) (* Goal: @Coplanar Tn A B C D *) (* Goal: not (@eq (@Tpoint Tn) C D) *) (* Goal: not (@eq (@Tpoint Tn) A B) *) assert(HH:=H0 D (col_trivial_2 _ _)). (* Goal: not (@ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A B) (@Col Tn X C D))) *) (* Goal: @Coplanar Tn A B C D *) (* Goal: not (@eq (@Tpoint Tn) C D) *) (* Goal: not (@eq (@Tpoint Tn) A B) *) unfold OS in HH. (* Goal: not (@ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A B) (@Col Tn X C D))) *) (* Goal: @Coplanar Tn A B C D *) (* Goal: not (@eq (@Tpoint Tn) C D) *) (* Goal: not (@eq (@Tpoint Tn) A B) *) ex_and HH C0. (* Goal: not (@ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A B) (@Col Tn X C D))) *) (* Goal: @Coplanar Tn A B C D *) (* Goal: not (@eq (@Tpoint Tn) C D) *) (* Goal: not (@eq (@Tpoint Tn) A B) *) unfold TS in H1. (* Goal: not (@ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A B) (@Col Tn X C D))) *) (* Goal: @Coplanar Tn A B C D *) (* Goal: not (@eq (@Tpoint Tn) C D) *) (* Goal: not (@eq (@Tpoint Tn) A B) *) spliter. (* Goal: not (@ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A B) (@Col Tn X C D))) *) (* Goal: @Coplanar Tn A B C D *) (* Goal: not (@eq (@Tpoint Tn) C D) *) (* Goal: not (@eq (@Tpoint Tn) A B) *) intro. (* Goal: not (@ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A B) (@Col Tn X C D))) *) (* Goal: @Coplanar Tn A B C D *) (* Goal: not (@eq (@Tpoint Tn) C D) *) (* Goal: False *) subst B. (* Goal: not (@ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A B) (@Col Tn X C D))) *) (* Goal: @Coplanar Tn A B C D *) (* Goal: not (@eq (@Tpoint Tn) C D) *) (* Goal: False *) Col. (* Goal: not (@ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A B) (@Col Tn X C D))) *) (* Goal: @Coplanar Tn A B C D *) (* Goal: not (@eq (@Tpoint Tn) C D) *) assumption. (* Goal: not (@ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A B) (@Col Tn X C D))) *) (* Goal: @Coplanar Tn A B C D *) apply os__coplanar, H0; Col. (* Goal: not (@ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A B) (@Col Tn X C D))) *) intro. (* Goal: False *) ex_and H1 X. (* Goal: False *) assert(HH:= H0 X (col_permutation_1 _ _ _ H2) ). (* Goal: False *) unfold OS in HH. (* Goal: False *) ex_and HH M. (* Goal: False *) unfold TS in H4. (* Goal: False *) spliter. (* Goal: False *) contradiction. Qed. Lemma par_col_par_2 : forall A B C D P, A <> P -> Col A B P -> Par A B C D -> Par A P C D. Lemma par_col2_par : forall A B C D E F, E <> F -> Par A B C D -> Col C D E -> Col C D F -> Par A B E F. Lemma par_col2_par_bis : forall A B C D E F, E <> F -> Par A B C D -> Col E F C -> Col E F D -> Par A B E F. Proof. (* Goal: forall (A B C D E F : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) E F)) (_ : @Par Tn A B C D) (_ : @Col Tn E F C) (_ : @Col Tn E F D), @Par Tn A B E F *) intros. (* Goal: @Par Tn A B E F *) apply par_col2_par with C D; Col; ColR. Qed. Lemma par_strict_col_par_strict : forall A B C D E, C <> E -> Par_strict A B C D -> Col C D E -> Par_strict A B C E. Lemma par_strict_col2_par_strict : forall A B C D E F, E <> F -> Par_strict A B C D -> Col C D E -> Col C D F -> Par_strict A B E F. Lemma line_dec : forall B1 B2 C1 C2, (Col C1 B1 B2 /\ Col C2 B1 B2) \/ ~ (Col C1 B1 B2 /\ Col C2 B1 B2). Proof. (* Goal: forall B1 B2 C1 C2 : @Tpoint Tn, or (and (@Col Tn C1 B1 B2) (@Col Tn C2 B1 B2)) (not (and (@Col Tn C1 B1 B2) (@Col Tn C2 B1 B2))) *) intros. (* Goal: or (and (@Col Tn C1 B1 B2) (@Col Tn C2 B1 B2)) (not (and (@Col Tn C1 B1 B2) (@Col Tn C2 B1 B2))) *) induction (col_dec C1 B1 B2); induction (col_dec C2 B1 B2);tauto. Qed. Lemma par_distinct : forall A B C D, Par A B C D -> A <> B /\ C <> D. Proof. (* Goal: forall (A B C D : @Tpoint Tn) (_ : @Par Tn A B C D), and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C D)) *) intros. (* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C D)) *) induction H. (* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C D)) *) (* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C D)) *) unfold Par_strict in H; intuition. (* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C D)) *) intuition. Qed. Lemma par_col4__par : forall A B C D E F G H, E <> F -> G <> H -> Par A B C D -> Col A B E -> Col A B F -> Col C D G -> Col C D H -> Par E F G H. Proof. (* Goal: forall (A B C D E F G H : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) E F)) (_ : not (@eq (@Tpoint Tn) G H)) (_ : @Par Tn A B C D) (_ : @Col Tn A B E) (_ : @Col Tn A B F) (_ : @Col Tn C D G) (_ : @Col Tn C D H), @Par Tn E F G H *) intros A B C D E F G H. (* Goal: forall (_ : not (@eq (@Tpoint Tn) E F)) (_ : not (@eq (@Tpoint Tn) G H)) (_ : @Par Tn A B C D) (_ : @Col Tn A B E) (_ : @Col Tn A B F) (_ : @Col Tn C D G) (_ : @Col Tn C D H), @Par Tn E F G H *) intros. (* Goal: @Par Tn E F G H *) apply (par_col2_par _ _ C D); auto. (* Goal: @Par Tn E F C D *) apply par_symmetry. (* Goal: @Par Tn C D E F *) apply (par_col2_par _ _ A B); auto. (* Goal: @Par Tn C D A B *) apply par_symmetry; auto. Qed. Lemma par_strict_col4__par_strict : forall A B C D E F G H, E <> F -> G <> H -> Par_strict A B C D -> Col A B E -> Col A B F -> Col C D G -> Col C D H -> Par_strict E F G H. Lemma par_strict_one_side : forall A B C D P, Par_strict A B C D -> Col C D P -> OS A B C P. Proof. (* Goal: forall (A B C D P : @Tpoint Tn) (_ : @Par_strict Tn A B C D) (_ : @Col Tn C D P), @OS Tn A B C P *) intros A B C D P HPar HCol. (* Goal: @OS Tn A B C P *) destruct (eq_dec_points C P). (* Goal: @OS Tn A B C P *) (* Goal: @OS Tn A B C P *) subst P; apply par_strict_not_col_1 in HPar; apply one_side_reflexivity; Col. (* Goal: @OS Tn A B C P *) apply l12_6, par_strict_col_par_strict with D; trivial. Qed. Lemma par_strict_all_one_side : forall A B C D, Par_strict A B C D -> (forall P, Col C D P -> OS A B C P). Lemma inter_distincts : forall A B C D X, Inter A B C D X -> A <> B /\ C <> D. Proof. (* Goal: forall (A B C D X : @Tpoint Tn) (_ : @Inter Tn A B C D X), and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C D)) *) intros. (* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C D)) *) destruct H as [HAB [[P []] _]]. (* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C D)) *) assert_diffs. (* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C D)) *) split; auto. Qed. Lemma inter_trivial : forall A B X, ~ Col A B X -> Inter A X B X X. Proof. (* Goal: forall (A B X : @Tpoint Tn) (_ : not (@Col Tn A B X)), @Inter Tn A X B X X *) intros. (* Goal: @Inter Tn A X B X X *) assert_diffs. (* Goal: @Inter Tn A X B X X *) unfold Inter. (* Goal: and (not (@eq (@Tpoint Tn) B X)) (and (@ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@Col Tn P B X) (not (@Col Tn P A X)))) (and (@Col Tn A X X) (@Col Tn B X X))) *) repeat split; Col. (* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@Col Tn P B X) (not (@Col Tn P A X))) *) exists B. (* Goal: and (@Col Tn B B X) (not (@Col Tn B A X)) *) split. (* Goal: not (@Col Tn B A X) *) (* Goal: @Col Tn B B X *) Col. (* Goal: not (@Col Tn B A X) *) intro. (* Goal: False *) apply H. (* Goal: @Col Tn A B X *) Col. Qed. Lemma inter_sym : forall A B C D X, Inter A B C D X -> Inter C D A B X. Lemma inter_left_comm : forall A B C D X, Inter A B C D X -> Inter B A C D X. Proof. (* Goal: forall (A B C D X : @Tpoint Tn) (_ : @Inter Tn A B C D X), @Inter Tn B A C D X *) intros. (* Goal: @Inter Tn B A C D X *) unfold Inter in *. (* Goal: and (not (@eq (@Tpoint Tn) C D)) (and (@ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@Col Tn P C D) (not (@Col Tn P B A)))) (and (@Col Tn B A X) (@Col Tn C D X))) *) spliter. (* Goal: and (not (@eq (@Tpoint Tn) C D)) (and (@ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@Col Tn P C D) (not (@Col Tn P B A)))) (and (@Col Tn B A X) (@Col Tn C D X))) *) ex_and H0 P. (* Goal: and (not (@eq (@Tpoint Tn) C D)) (and (@ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@Col Tn P C D) (not (@Col Tn P B A)))) (and (@Col Tn B A X) (@Col Tn C D X))) *) split. (* Goal: and (@ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@Col Tn P C D) (not (@Col Tn P B A)))) (and (@Col Tn B A X) (@Col Tn C D X)) *) (* Goal: not (@eq (@Tpoint Tn) C D) *) assumption. (* Goal: and (@ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@Col Tn P C D) (not (@Col Tn P B A)))) (and (@Col Tn B A X) (@Col Tn C D X)) *) split. (* Goal: and (@Col Tn B A X) (@Col Tn C D X) *) (* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@Col Tn P C D) (not (@Col Tn P B A))) *) exists P. (* Goal: and (@Col Tn B A X) (@Col Tn C D X) *) (* Goal: and (@Col Tn P C D) (not (@Col Tn P B A)) *) split. (* Goal: and (@Col Tn B A X) (@Col Tn C D X) *) (* Goal: not (@Col Tn P B A) *) (* Goal: @Col Tn P C D *) assumption. (* Goal: and (@Col Tn B A X) (@Col Tn C D X) *) (* Goal: not (@Col Tn P B A) *) intro. (* Goal: and (@Col Tn B A X) (@Col Tn C D X) *) (* Goal: False *) apply H3. (* Goal: and (@Col Tn B A X) (@Col Tn C D X) *) (* Goal: @Col Tn P A B *) Col. (* Goal: and (@Col Tn B A X) (@Col Tn C D X) *) split; Col. Qed. Lemma inter_right_comm : forall A B C D X, Inter A B C D X -> Inter A B D C X. Proof. (* Goal: forall (A B C D X : @Tpoint Tn) (_ : @Inter Tn A B C D X), @Inter Tn A B D C X *) intros. (* Goal: @Inter Tn A B D C X *) unfold Inter in *. (* Goal: and (not (@eq (@Tpoint Tn) D C)) (and (@ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@Col Tn P D C) (not (@Col Tn P A B)))) (and (@Col Tn A B X) (@Col Tn D C X))) *) spliter. (* Goal: and (not (@eq (@Tpoint Tn) D C)) (and (@ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@Col Tn P D C) (not (@Col Tn P A B)))) (and (@Col Tn A B X) (@Col Tn D C X))) *) ex_and H0 P. (* Goal: and (not (@eq (@Tpoint Tn) D C)) (and (@ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@Col Tn P D C) (not (@Col Tn P A B)))) (and (@Col Tn A B X) (@Col Tn D C X))) *) split. (* Goal: and (@ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@Col Tn P D C) (not (@Col Tn P A B)))) (and (@Col Tn A B X) (@Col Tn D C X)) *) (* Goal: not (@eq (@Tpoint Tn) D C) *) auto. (* Goal: and (@ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@Col Tn P D C) (not (@Col Tn P A B)))) (and (@Col Tn A B X) (@Col Tn D C X)) *) split. (* Goal: and (@Col Tn A B X) (@Col Tn D C X) *) (* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@Col Tn P D C) (not (@Col Tn P A B))) *) exists P. (* Goal: and (@Col Tn A B X) (@Col Tn D C X) *) (* Goal: and (@Col Tn P D C) (not (@Col Tn P A B)) *) split. (* Goal: and (@Col Tn A B X) (@Col Tn D C X) *) (* Goal: not (@Col Tn P A B) *) (* Goal: @Col Tn P D C *) Col. (* Goal: and (@Col Tn A B X) (@Col Tn D C X) *) (* Goal: not (@Col Tn P A B) *) assumption. (* Goal: and (@Col Tn A B X) (@Col Tn D C X) *) split; Col. Qed. Lemma inter_comm : forall A B C D X, Inter A B C D X -> Inter B A D C X. Proof. (* Goal: forall (A B C D X : @Tpoint Tn) (_ : @Inter Tn A B C D X), @Inter Tn B A D C X *) intros. (* Goal: @Inter Tn B A D C X *) apply inter_left_comm. (* Goal: @Inter Tn A B D C X *) apply inter_right_comm. (* Goal: @Inter Tn A B C D X *) assumption. Qed. Lemma l12_17 : forall A B C D P, A <> B -> Midpoint P A C -> Midpoint P B D -> Par A B C D. Lemma l12_18_a : forall A B C D P, Cong A B C D -> Cong B C D A -> ~Col A B C -> B <> D -> Col A P C -> Col B P D -> Par A B C D. Lemma l12_18_b : forall A B C D P, Cong A B C D -> Cong B C D A -> ~Col A B C -> B <> D -> Col A P C -> Col B P D -> Par B C D A. Lemma l12_18_c : forall A B C D P, Cong A B C D -> Cong B C D A -> ~Col A B C -> B <> D -> Col A P C -> Col B P D -> TS B D A C. Lemma l12_18_d : forall A B C D P, Cong A B C D -> Cong B C D A -> ~Col A B C -> B <> D -> Col A P C -> Col B P D -> TS A C B D. Lemma l12_18 : forall A B C D P, Cong A B C D -> Cong B C D A -> ~Col A B C -> B <> D -> Col A P C -> Col B P D -> Par A B C D /\ Par B C D A /\ TS B D A C /\ TS A C B D. Proof. (* Goal: forall (A B C D P : @Tpoint Tn) (_ : @Cong Tn A B C D) (_ : @Cong Tn B C D A) (_ : not (@Col Tn A B C)) (_ : not (@eq (@Tpoint Tn) B D)) (_ : @Col Tn A P C) (_ : @Col Tn B P D), and (@Par Tn A B C D) (and (@Par Tn B C D A) (and (@TS Tn B D A C) (@TS Tn A C B D))) *) intros. (* Goal: and (@Par Tn A B C D) (and (@Par Tn B C D A) (and (@TS Tn B D A C) (@TS Tn A C B D))) *) split. (* Goal: and (@Par Tn B C D A) (and (@TS Tn B D A C) (@TS Tn A C B D)) *) (* Goal: @Par Tn A B C D *) apply (l12_18_a _ _ _ _ P); assumption. (* Goal: and (@Par Tn B C D A) (and (@TS Tn B D A C) (@TS Tn A C B D)) *) split. (* Goal: and (@TS Tn B D A C) (@TS Tn A C B D) *) (* Goal: @Par Tn B C D A *) apply (l12_18_b _ _ _ _ P); assumption. (* Goal: and (@TS Tn B D A C) (@TS Tn A C B D) *) split. (* Goal: @TS Tn A C B D *) (* Goal: @TS Tn B D A C *) apply (l12_18_c _ _ _ _ P); assumption. (* Goal: @TS Tn A C B D *) apply (l12_18_d _ _ _ _ P); assumption. Qed. Lemma par_two_sides_two_sides : forall A B C D, Par A B C D -> TS B D A C -> TS A C B D. Proof. (* Goal: forall (A B C D : @Tpoint Tn) (_ : @Par Tn A B C D) (_ : @TS Tn B D A C), @TS Tn A C B D *) intros. (* Goal: @TS Tn A C B D *) apply par_distincts in H. (* Goal: @TS Tn A C B D *) spliter. (* Goal: @TS Tn A C B D *) unfold Par in H. (* Goal: @TS Tn A C B D *) induction H. (* Goal: @TS Tn A C B D *) (* Goal: @TS Tn A C B D *) assert(A <> C). (* Goal: @TS Tn A C B D *) (* Goal: @TS Tn A C B D *) (* Goal: not (@eq (@Tpoint Tn) A C) *) intro. (* Goal: @TS Tn A C B D *) (* Goal: @TS Tn A C B D *) (* Goal: False *) subst C. (* Goal: @TS Tn A C B D *) (* Goal: @TS Tn A C B D *) (* Goal: False *) unfold Par_strict in H. (* Goal: @TS Tn A C B D *) (* Goal: @TS Tn A C B D *) (* Goal: False *) spliter. (* Goal: @TS Tn A C B D *) (* Goal: @TS Tn A C B D *) (* Goal: False *) apply H5. (* Goal: @TS Tn A C B D *) (* Goal: @TS Tn A C B D *) (* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A B) (@Col Tn X A D)) *) exists A. (* Goal: @TS Tn A C B D *) (* Goal: @TS Tn A C B D *) (* Goal: and (@Col Tn A A B) (@Col Tn A A D) *) split; apply col_trivial_1. (* Goal: @TS Tn A C B D *) (* Goal: @TS Tn A C B D *) unfold TS in *. (* Goal: @TS Tn A C B D *) (* Goal: and (not (@Col Tn B A C)) (and (not (@Col Tn D A C)) (@ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T A C) (@Bet Tn B T D)))) *) assert (~ Col A B D). (* Goal: @TS Tn A C B D *) (* Goal: and (not (@Col Tn B A C)) (and (not (@Col Tn D A C)) (@ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T A C) (@Bet Tn B T D)))) *) (* Goal: not (@Col Tn A B D) *) spliter. (* Goal: @TS Tn A C B D *) (* Goal: and (not (@Col Tn B A C)) (and (not (@Col Tn D A C)) (@ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T A C) (@Bet Tn B T D)))) *) (* Goal: not (@Col Tn A B D) *) assumption. (* Goal: @TS Tn A C B D *) (* Goal: and (not (@Col Tn B A C)) (and (not (@Col Tn D A C)) (@ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T A C) (@Bet Tn B T D)))) *) spliter. (* Goal: @TS Tn A C B D *) (* Goal: and (not (@Col Tn B A C)) (and (not (@Col Tn D A C)) (@ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T A C) (@Bet Tn B T D)))) *) ex_and H6 T. (* Goal: @TS Tn A C B D *) (* Goal: and (not (@Col Tn B A C)) (and (not (@Col Tn D A C)) (@ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T A C) (@Bet Tn B T D)))) *) repeat split. (* Goal: @TS Tn A C B D *) (* Goal: @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T A C) (@Bet Tn B T D)) *) (* Goal: not (@Col Tn D A C) *) (* Goal: not (@Col Tn B A C) *) intro. (* Goal: @TS Tn A C B D *) (* Goal: @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T A C) (@Bet Tn B T D)) *) (* Goal: not (@Col Tn D A C) *) (* Goal: False *) assert(Col T B C). (* Goal: @TS Tn A C B D *) (* Goal: @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T A C) (@Bet Tn B T D)) *) (* Goal: not (@Col Tn D A C) *) (* Goal: False *) (* Goal: @Col Tn T B C *) apply col_permutation_1. (* Goal: @TS Tn A C B D *) (* Goal: @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T A C) (@Bet Tn B T D)) *) (* Goal: not (@Col Tn D A C) *) (* Goal: False *) (* Goal: @Col Tn C T B *) eapply (col_transitivity_1 _ A). (* Goal: @TS Tn A C B D *) (* Goal: @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T A C) (@Bet Tn B T D)) *) (* Goal: not (@Col Tn D A C) *) (* Goal: False *) (* Goal: @Col Tn C A B *) (* Goal: @Col Tn C A T *) (* Goal: not (@eq (@Tpoint Tn) C A) *) auto. (* Goal: @TS Tn A C B D *) (* Goal: @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T A C) (@Bet Tn B T D)) *) (* Goal: not (@Col Tn D A C) *) (* Goal: False *) (* Goal: @Col Tn C A B *) (* Goal: @Col Tn C A T *) apply bet_col in H7. (* Goal: @TS Tn A C B D *) (* Goal: @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T A C) (@Bet Tn B T D)) *) (* Goal: not (@Col Tn D A C) *) (* Goal: False *) (* Goal: @Col Tn C A B *) (* Goal: @Col Tn C A T *) Col. (* Goal: @TS Tn A C B D *) (* Goal: @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T A C) (@Bet Tn B T D)) *) (* Goal: not (@Col Tn D A C) *) (* Goal: False *) (* Goal: @Col Tn C A B *) Col. (* Goal: @TS Tn A C B D *) (* Goal: @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T A C) (@Bet Tn B T D)) *) (* Goal: not (@Col Tn D A C) *) (* Goal: False *) apply H5. (* Goal: @TS Tn A C B D *) (* Goal: @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T A C) (@Bet Tn B T D)) *) (* Goal: not (@Col Tn D A C) *) (* Goal: @Col Tn C B D *) apply col_permutation_2. (* Goal: @TS Tn A C B D *) (* Goal: @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T A C) (@Bet Tn B T D)) *) (* Goal: not (@Col Tn D A C) *) (* Goal: @Col Tn B D C *) eapply (col_transitivity_1 _ T). (* Goal: @TS Tn A C B D *) (* Goal: @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T A C) (@Bet Tn B T D)) *) (* Goal: not (@Col Tn D A C) *) (* Goal: @Col Tn B T C *) (* Goal: @Col Tn B T D *) (* Goal: not (@eq (@Tpoint Tn) B T) *) intro. (* Goal: @TS Tn A C B D *) (* Goal: @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T A C) (@Bet Tn B T D)) *) (* Goal: not (@Col Tn D A C) *) (* Goal: @Col Tn B T C *) (* Goal: @Col Tn B T D *) (* Goal: False *) treat_equalities. (* Goal: @TS Tn A C B D *) (* Goal: @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T A C) (@Bet Tn B T D)) *) (* Goal: not (@Col Tn D A C) *) (* Goal: @Col Tn B T C *) (* Goal: @Col Tn B T D *) (* Goal: False *) unfold Par_strict in H. (* Goal: @TS Tn A C B D *) (* Goal: @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T A C) (@Bet Tn B T D)) *) (* Goal: not (@Col Tn D A C) *) (* Goal: @Col Tn B T C *) (* Goal: @Col Tn B T D *) (* Goal: False *) spliter. (* Goal: @TS Tn A C B D *) (* Goal: @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T A C) (@Bet Tn B T D)) *) (* Goal: not (@Col Tn D A C) *) (* Goal: @Col Tn B T C *) (* Goal: @Col Tn B T D *) (* Goal: False *) apply H9. (* Goal: @TS Tn A C B D *) (* Goal: @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T A C) (@Bet Tn B T D)) *) (* Goal: not (@Col Tn D A C) *) (* Goal: @Col Tn B T C *) (* Goal: @Col Tn B T D *) (* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A B) (@Col Tn X C D)) *) exists C. (* Goal: @TS Tn A C B D *) (* Goal: @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T A C) (@Bet Tn B T D)) *) (* Goal: not (@Col Tn D A C) *) (* Goal: @Col Tn B T C *) (* Goal: @Col Tn B T D *) (* Goal: and (@Col Tn C A B) (@Col Tn C C D) *) split. (* Goal: @TS Tn A C B D *) (* Goal: @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T A C) (@Bet Tn B T D)) *) (* Goal: not (@Col Tn D A C) *) (* Goal: @Col Tn B T C *) (* Goal: @Col Tn B T D *) (* Goal: @Col Tn C C D *) (* Goal: @Col Tn C A B *) Col. (* Goal: @TS Tn A C B D *) (* Goal: @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T A C) (@Bet Tn B T D)) *) (* Goal: not (@Col Tn D A C) *) (* Goal: @Col Tn B T C *) (* Goal: @Col Tn B T D *) (* Goal: @Col Tn C C D *) apply col_trivial_1. (* Goal: @TS Tn A C B D *) (* Goal: @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T A C) (@Bet Tn B T D)) *) (* Goal: not (@Col Tn D A C) *) (* Goal: @Col Tn B T C *) (* Goal: @Col Tn B T D *) Col. (* Goal: @TS Tn A C B D *) (* Goal: @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T A C) (@Bet Tn B T D)) *) (* Goal: not (@Col Tn D A C) *) (* Goal: @Col Tn B T C *) Col. (* Goal: @TS Tn A C B D *) (* Goal: @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T A C) (@Bet Tn B T D)) *) (* Goal: not (@Col Tn D A C) *) intro. (* Goal: @TS Tn A C B D *) (* Goal: @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T A C) (@Bet Tn B T D)) *) (* Goal: False *) assert(Col T C D). (* Goal: @TS Tn A C B D *) (* Goal: @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T A C) (@Bet Tn B T D)) *) (* Goal: False *) (* Goal: @Col Tn T C D *) apply col_permutation_2. (* Goal: @TS Tn A C B D *) (* Goal: @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T A C) (@Bet Tn B T D)) *) (* Goal: False *) (* Goal: @Col Tn C D T *) apply (col_transitivity_1 _ A). (* Goal: @TS Tn A C B D *) (* Goal: @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T A C) (@Bet Tn B T D)) *) (* Goal: False *) (* Goal: @Col Tn C A T *) (* Goal: @Col Tn C A D *) (* Goal: not (@eq (@Tpoint Tn) C A) *) auto. (* Goal: @TS Tn A C B D *) (* Goal: @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T A C) (@Bet Tn B T D)) *) (* Goal: False *) (* Goal: @Col Tn C A T *) (* Goal: @Col Tn C A D *) Col. (* Goal: @TS Tn A C B D *) (* Goal: @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T A C) (@Bet Tn B T D)) *) (* Goal: False *) (* Goal: @Col Tn C A T *) apply bet_col in H7. (* Goal: @TS Tn A C B D *) (* Goal: @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T A C) (@Bet Tn B T D)) *) (* Goal: False *) (* Goal: @Col Tn C A T *) Col. (* Goal: @TS Tn A C B D *) (* Goal: @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T A C) (@Bet Tn B T D)) *) (* Goal: False *) apply H5. (* Goal: @TS Tn A C B D *) (* Goal: @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T A C) (@Bet Tn B T D)) *) (* Goal: @Col Tn C B D *) apply col_permutation_1. (* Goal: @TS Tn A C B D *) (* Goal: @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T A C) (@Bet Tn B T D)) *) (* Goal: @Col Tn D C B *) apply (col_transitivity_1 _ T). (* Goal: @TS Tn A C B D *) (* Goal: @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T A C) (@Bet Tn B T D)) *) (* Goal: @Col Tn D T B *) (* Goal: @Col Tn D T C *) (* Goal: not (@eq (@Tpoint Tn) D T) *) intro. (* Goal: @TS Tn A C B D *) (* Goal: @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T A C) (@Bet Tn B T D)) *) (* Goal: @Col Tn D T B *) (* Goal: @Col Tn D T C *) (* Goal: False *) treat_equalities. (* Goal: @TS Tn A C B D *) (* Goal: @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T A C) (@Bet Tn B T D)) *) (* Goal: @Col Tn D T B *) (* Goal: @Col Tn D T C *) (* Goal: False *) unfold Par_strict in H. (* Goal: @TS Tn A C B D *) (* Goal: @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T A C) (@Bet Tn B T D)) *) (* Goal: @Col Tn D T B *) (* Goal: @Col Tn D T C *) (* Goal: False *) spliter. (* Goal: @TS Tn A C B D *) (* Goal: @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T A C) (@Bet Tn B T D)) *) (* Goal: @Col Tn D T B *) (* Goal: @Col Tn D T C *) (* Goal: False *) apply H9. (* Goal: @TS Tn A C B D *) (* Goal: @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T A C) (@Bet Tn B T D)) *) (* Goal: @Col Tn D T B *) (* Goal: @Col Tn D T C *) (* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A B) (@Col Tn X C D)) *) exists A. (* Goal: @TS Tn A C B D *) (* Goal: @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T A C) (@Bet Tn B T D)) *) (* Goal: @Col Tn D T B *) (* Goal: @Col Tn D T C *) (* Goal: and (@Col Tn A A B) (@Col Tn A C D) *) split. (* Goal: @TS Tn A C B D *) (* Goal: @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T A C) (@Bet Tn B T D)) *) (* Goal: @Col Tn D T B *) (* Goal: @Col Tn D T C *) (* Goal: @Col Tn A C D *) (* Goal: @Col Tn A A B *) apply col_trivial_1. (* Goal: @TS Tn A C B D *) (* Goal: @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T A C) (@Bet Tn B T D)) *) (* Goal: @Col Tn D T B *) (* Goal: @Col Tn D T C *) (* Goal: @Col Tn A C D *) Col. (* Goal: @TS Tn A C B D *) (* Goal: @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T A C) (@Bet Tn B T D)) *) (* Goal: @Col Tn D T B *) (* Goal: @Col Tn D T C *) Col. (* Goal: @TS Tn A C B D *) (* Goal: @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T A C) (@Bet Tn B T D)) *) (* Goal: @Col Tn D T B *) Col. (* Goal: @TS Tn A C B D *) (* Goal: @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T A C) (@Bet Tn B T D)) *) exists T. (* Goal: @TS Tn A C B D *) (* Goal: and (@Col Tn T A C) (@Bet Tn B T D) *) split. (* Goal: @TS Tn A C B D *) (* Goal: @Bet Tn B T D *) (* Goal: @Col Tn T A C *) apply bet_col in H7. (* Goal: @TS Tn A C B D *) (* Goal: @Bet Tn B T D *) (* Goal: @Col Tn T A C *) Col. (* Goal: @TS Tn A C B D *) (* Goal: @Bet Tn B T D *) unfold Col in H6. (* Goal: @TS Tn A C B D *) (* Goal: @Bet Tn B T D *) induction H6. (* Goal: @TS Tn A C B D *) (* Goal: @Bet Tn B T D *) (* Goal: @Bet Tn B T D *) assert(HH:= outer_pasch C D T A B (between_symmetry _ _ _ H7) (between_symmetry _ _ _ H6)). (* Goal: @TS Tn A C B D *) (* Goal: @Bet Tn B T D *) (* Goal: @Bet Tn B T D *) ex_and HH X. (* Goal: @TS Tn A C B D *) (* Goal: @Bet Tn B T D *) (* Goal: @Bet Tn B T D *) unfold Par_strict in H. (* Goal: @TS Tn A C B D *) (* Goal: @Bet Tn B T D *) (* Goal: @Bet Tn B T D *) spliter. (* Goal: @TS Tn A C B D *) (* Goal: @Bet Tn B T D *) (* Goal: @Bet Tn B T D *) apply False_ind. (* Goal: @TS Tn A C B D *) (* Goal: @Bet Tn B T D *) (* Goal: False *) apply H12. (* Goal: @TS Tn A C B D *) (* Goal: @Bet Tn B T D *) (* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A B) (@Col Tn X C D)) *) exists X. (* Goal: @TS Tn A C B D *) (* Goal: @Bet Tn B T D *) (* Goal: and (@Col Tn X A B) (@Col Tn X C D) *) apply bet_col in H8. (* Goal: @TS Tn A C B D *) (* Goal: @Bet Tn B T D *) (* Goal: and (@Col Tn X A B) (@Col Tn X C D) *) apply bet_col in H9. (* Goal: @TS Tn A C B D *) (* Goal: @Bet Tn B T D *) (* Goal: and (@Col Tn X A B) (@Col Tn X C D) *) split; Col. (* Goal: @TS Tn A C B D *) (* Goal: @Bet Tn B T D *) induction H6. (* Goal: @TS Tn A C B D *) (* Goal: @Bet Tn B T D *) (* Goal: @Bet Tn B T D *) assert(HH:= outer_pasch A B T C D H7 H6). (* Goal: @TS Tn A C B D *) (* Goal: @Bet Tn B T D *) (* Goal: @Bet Tn B T D *) ex_and HH X. (* Goal: @TS Tn A C B D *) (* Goal: @Bet Tn B T D *) (* Goal: @Bet Tn B T D *) apply False_ind. (* Goal: @TS Tn A C B D *) (* Goal: @Bet Tn B T D *) (* Goal: False *) unfold Par_strict in H. (* Goal: @TS Tn A C B D *) (* Goal: @Bet Tn B T D *) (* Goal: False *) spliter. (* Goal: @TS Tn A C B D *) (* Goal: @Bet Tn B T D *) (* Goal: False *) apply H12. (* Goal: @TS Tn A C B D *) (* Goal: @Bet Tn B T D *) (* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A B) (@Col Tn X C D)) *) exists X. (* Goal: @TS Tn A C B D *) (* Goal: @Bet Tn B T D *) (* Goal: and (@Col Tn X A B) (@Col Tn X C D) *) apply bet_col in H8. (* Goal: @TS Tn A C B D *) (* Goal: @Bet Tn B T D *) (* Goal: and (@Col Tn X A B) (@Col Tn X C D) *) apply bet_col in H9. (* Goal: @TS Tn A C B D *) (* Goal: @Bet Tn B T D *) (* Goal: and (@Col Tn X A B) (@Col Tn X C D) *) split; Col. (* Goal: @TS Tn A C B D *) (* Goal: @Bet Tn B T D *) apply between_symmetry. (* Goal: @TS Tn A C B D *) (* Goal: @Bet Tn D T B *) assumption. (* Goal: @TS Tn A C B D *) unfold TS in H0. (* Goal: @TS Tn A C B D *) spliter. (* Goal: @TS Tn A C B D *) apply False_ind. (* Goal: False *) apply H3. (* Goal: @Col Tn C B D *) apply col_permutation_1. (* Goal: @Col Tn D C B *) eapply (col_transitivity_1 _ C). (* Goal: @Col Tn D C B *) (* Goal: @Col Tn D C C *) (* Goal: not (@eq (@Tpoint Tn) D C) *) auto. (* Goal: @Col Tn D C B *) (* Goal: @Col Tn D C C *) Col. (* Goal: @Col Tn D C B *) Col. Qed. Lemma par_one_or_two_sides : forall A B C D, Par_strict A B C D -> TS A C B D /\ TS B D A C \/ OS A C B D /\ OS B D A C. Proof. (* Goal: forall (A B C D : @Tpoint Tn) (_ : @Par_strict Tn A B C D), or (and (@TS Tn A C B D) (@TS Tn B D A C)) (and (@OS Tn A C B D) (@OS Tn B D A C)) *) intros. (* Goal: or (and (@TS Tn A C B D) (@TS Tn B D A C)) (and (@OS Tn A C B D) (@OS Tn B D A C)) *) induction(two_sides_dec A C B D). (* Goal: or (and (@TS Tn A C B D) (@TS Tn B D A C)) (and (@OS Tn A C B D) (@OS Tn B D A C)) *) (* Goal: or (and (@TS Tn A C B D) (@TS Tn B D A C)) (and (@OS Tn A C B D) (@OS Tn B D A C)) *) left. (* Goal: or (and (@TS Tn A C B D) (@TS Tn B D A C)) (and (@OS Tn A C B D) (@OS Tn B D A C)) *) (* Goal: and (@TS Tn A C B D) (@TS Tn B D A C) *) split. (* Goal: or (and (@TS Tn A C B D) (@TS Tn B D A C)) (and (@OS Tn A C B D) (@OS Tn B D A C)) *) (* Goal: @TS Tn B D A C *) (* Goal: @TS Tn A C B D *) assumption. (* Goal: or (and (@TS Tn A C B D) (@TS Tn B D A C)) (and (@OS Tn A C B D) (@OS Tn B D A C)) *) (* Goal: @TS Tn B D A C *) apply par_two_sides_two_sides. (* Goal: or (and (@TS Tn A C B D) (@TS Tn B D A C)) (and (@OS Tn A C B D) (@OS Tn B D A C)) *) (* Goal: @TS Tn A C B D *) (* Goal: @Par Tn B A D C *) apply par_comm. (* Goal: or (and (@TS Tn A C B D) (@TS Tn B D A C)) (and (@OS Tn A C B D) (@OS Tn B D A C)) *) (* Goal: @TS Tn A C B D *) (* Goal: @Par Tn A B C D *) unfold Par. (* Goal: or (and (@TS Tn A C B D) (@TS Tn B D A C)) (and (@OS Tn A C B D) (@OS Tn B D A C)) *) (* Goal: @TS Tn A C B D *) (* Goal: or (@Par_strict Tn A B C D) (and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C D)) (and (@Col Tn A C D) (@Col Tn B C D)))) *) left. (* Goal: or (and (@TS Tn A C B D) (@TS Tn B D A C)) (and (@OS Tn A C B D) (@OS Tn B D A C)) *) (* Goal: @TS Tn A C B D *) (* Goal: @Par_strict Tn A B C D *) assumption. (* Goal: or (and (@TS Tn A C B D) (@TS Tn B D A C)) (and (@OS Tn A C B D) (@OS Tn B D A C)) *) (* Goal: @TS Tn A C B D *) assumption. (* Goal: or (and (@TS Tn A C B D) (@TS Tn B D A C)) (and (@OS Tn A C B D) (@OS Tn B D A C)) *) right. (* Goal: and (@OS Tn A C B D) (@OS Tn B D A C) *) assert(HH:=H). (* Goal: and (@OS Tn A C B D) (@OS Tn B D A C) *) unfold Par_strict in H. (* Goal: and (@OS Tn A C B D) (@OS Tn B D A C) *) spliter. (* Goal: and (@OS Tn A C B D) (@OS Tn B D A C) *) assert(A <> C). (* Goal: and (@OS Tn A C B D) (@OS Tn B D A C) *) (* Goal: not (@eq (@Tpoint Tn) A C) *) intro. (* Goal: and (@OS Tn A C B D) (@OS Tn B D A C) *) (* Goal: False *) subst C. (* Goal: and (@OS Tn A C B D) (@OS Tn B D A C) *) (* Goal: False *) apply H3. (* Goal: and (@OS Tn A C B D) (@OS Tn B D A C) *) (* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A B) (@Col Tn X A D)) *) exists A. (* Goal: and (@OS Tn A C B D) (@OS Tn B D A C) *) (* Goal: and (@Col Tn A A B) (@Col Tn A A D) *) split; Col. (* Goal: and (@OS Tn A C B D) (@OS Tn B D A C) *) assert(B <> D). (* Goal: and (@OS Tn A C B D) (@OS Tn B D A C) *) (* Goal: not (@eq (@Tpoint Tn) B D) *) intro. (* Goal: and (@OS Tn A C B D) (@OS Tn B D A C) *) (* Goal: False *) subst D. (* Goal: and (@OS Tn A C B D) (@OS Tn B D A C) *) (* Goal: False *) apply H3. (* Goal: and (@OS Tn A C B D) (@OS Tn B D A C) *) (* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A B) (@Col Tn X C B)) *) exists B. (* Goal: and (@OS Tn A C B D) (@OS Tn B D A C) *) (* Goal: and (@Col Tn B A B) (@Col Tn B C B) *) split; Col. (* Goal: and (@OS Tn A C B D) (@OS Tn B D A C) *) split. (* Goal: @OS Tn B D A C *) (* Goal: @OS Tn A C B D *) apply cop__not_two_sides_one_side; Cop. (* Goal: @OS Tn B D A C *) (* Goal: not (@Col Tn D A C) *) (* Goal: not (@Col Tn B A C) *) intro. (* Goal: @OS Tn B D A C *) (* Goal: not (@Col Tn D A C) *) (* Goal: False *) apply H3. (* Goal: @OS Tn B D A C *) (* Goal: not (@Col Tn D A C) *) (* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A B) (@Col Tn X C D)) *) exists C. (* Goal: @OS Tn B D A C *) (* Goal: not (@Col Tn D A C) *) (* Goal: and (@Col Tn C A B) (@Col Tn C C D) *) split; Col. (* Goal: @OS Tn B D A C *) (* Goal: not (@Col Tn D A C) *) intro. (* Goal: @OS Tn B D A C *) (* Goal: False *) apply H3. (* Goal: @OS Tn B D A C *) (* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A B) (@Col Tn X C D)) *) exists A. (* Goal: @OS Tn B D A C *) (* Goal: and (@Col Tn A A B) (@Col Tn A C D) *) split; Col. (* Goal: @OS Tn B D A C *) apply cop__not_two_sides_one_side; Cop. (* Goal: not (@TS Tn B D A C) *) (* Goal: not (@Col Tn C B D) *) (* Goal: not (@Col Tn A B D) *) intro. (* Goal: not (@TS Tn B D A C) *) (* Goal: not (@Col Tn C B D) *) (* Goal: False *) apply H3. (* Goal: not (@TS Tn B D A C) *) (* Goal: not (@Col Tn C B D) *) (* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A B) (@Col Tn X C D)) *) exists D. (* Goal: not (@TS Tn B D A C) *) (* Goal: not (@Col Tn C B D) *) (* Goal: and (@Col Tn D A B) (@Col Tn D C D) *) split; Col. (* Goal: not (@TS Tn B D A C) *) (* Goal: not (@Col Tn C B D) *) intro. (* Goal: not (@TS Tn B D A C) *) (* Goal: False *) apply H3. (* Goal: not (@TS Tn B D A C) *) (* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A B) (@Col Tn X C D)) *) exists B. (* Goal: not (@TS Tn B D A C) *) (* Goal: and (@Col Tn B A B) (@Col Tn B C D) *) split; Col. (* Goal: not (@TS Tn B D A C) *) intro. (* Goal: False *) apply H0. (* Goal: @TS Tn A C B D *) apply par_two_sides_two_sides. (* Goal: @TS Tn B D A C *) (* Goal: @Par Tn A B C D *) left. (* Goal: @TS Tn B D A C *) (* Goal: @Par_strict Tn A B C D *) assumption. (* Goal: @TS Tn B D A C *) assumption. Qed. Lemma l12_21_b : forall A B C D, TS A C B D -> CongA B A C D C A -> Par A B C D. Lemma l12_22_aux : forall A B C D P, P <> A -> A <> C -> Bet P A C -> OS P A B D -> CongA B A P D C P -> Par A B C D. Lemma l12_22_b : forall A B C D P, Out P A C -> OS P A B D -> CongA B A P D C P -> Par A B C D. Lemma par_strict_par : forall A B C D, Par_strict A B C D -> Par A B C D. Proof. (* Goal: forall (A B C D : @Tpoint Tn) (_ : @Par_strict Tn A B C D), @Par Tn A B C D *) intros. (* Goal: @Par Tn A B C D *) unfold Par. (* Goal: or (@Par_strict Tn A B C D) (and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C D)) (and (@Col Tn A C D) (@Col Tn B C D)))) *) tauto. Qed. Lemma par_strict_distinct : forall A B C D, Par_strict A B C D -> A<>B /\ A<>C /\ A<>D /\ B<>C /\ B<>D /\ C<>D. Proof. (* Goal: forall (A B C D : @Tpoint Tn) (_ : @Par_strict Tn A B C D), and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) A C)) (and (not (@eq (@Tpoint Tn) A D)) (and (not (@eq (@Tpoint Tn) B C)) (and (not (@eq (@Tpoint Tn) B D)) (not (@eq (@Tpoint Tn) C D)))))) *) unfold Par_strict. (* Goal: forall (A B C D : @Tpoint Tn) (_ : and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C D)) (and (@Coplanar Tn A B C D) (not (@ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A B) (@Col Tn X C D))))))), and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) A C)) (and (not (@eq (@Tpoint Tn) A D)) (and (not (@eq (@Tpoint Tn) B C)) (and (not (@eq (@Tpoint Tn) B D)) (not (@eq (@Tpoint Tn) C D)))))) *) intros; spliter. (* Goal: and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) A C)) (and (not (@eq (@Tpoint Tn) A D)) (and (not (@eq (@Tpoint Tn) B C)) (and (not (@eq (@Tpoint Tn) B D)) (not (@eq (@Tpoint Tn) C D)))))) *) repeat split; auto; intro; apply H2; [exists A..|exists B|exists B]; subst; split; Col. Qed. Lemma col_par : forall A B C, A <> B -> B <> C -> Col A B C -> Par A B B C. Proof. (* Goal: forall (A B C : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) A B)) (_ : not (@eq (@Tpoint Tn) B C)) (_ : @Col Tn A B C), @Par Tn A B B C *) intros. (* Goal: @Par Tn A B B C *) unfold Par. (* Goal: or (@Par_strict Tn A B B C) (and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) B C)) (and (@Col Tn A B C) (@Col Tn B B C)))) *) right. (* Goal: and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) B C)) (and (@Col Tn A B C) (@Col Tn B B C))) *) intuition Col. Qed. Lemma acute_col_perp__out : forall A B C A', Acute A B C -> Col B C A' -> Perp B C A A' -> Out B A' C. Proof. (* Goal: forall (A B C A' : @Tpoint Tn) (_ : @Acute Tn A B C) (_ : @Col Tn B C A') (_ : @Perp Tn B C A A'), @Out Tn B A' C *) intros A B C A' HacuteB HBCA' HPerp. (* Goal: @Out Tn B A' C *) assert(HUn := perp_not_col2 B C A A' HPerp). (* Goal: @Out Tn B A' C *) destruct HUn as [HNCol1|]; [|contradiction]. (* Goal: @Out Tn B A' C *) assert(HB' := l10_15 B C B A). (* Goal: @Out Tn B A' C *) destruct HB' as [B' []]; Col. (* Goal: @Out Tn B A' C *) assert_diffs. (* Goal: @Out Tn B A' C *) assert(HNCol2 : ~ Col B' B C ) by (apply per_not_col; Perp). (* Goal: @Out Tn B A' C *) assert(HNCol3 : ~ Col B B' A). (* Goal: @Out Tn B A' C *) (* Goal: not (@Col Tn B B' A) *) { (* Goal: not (@Col Tn B B' A) *) intro. (* Goal: False *) apply (nlta A B C). (* Goal: @LtA Tn A B C A B C *) apply acute_per__lta; auto. (* Goal: @Per Tn A B C *) apply (l8_3 B'); Col; Perp. (* BG Goal: @Out Tn B A' C *) } (* Goal: @Out Tn B A' C *) assert(HPars : Par_strict B B' A A'). (* Goal: @Out Tn B A' C *) (* Goal: @Par_strict Tn B B' A A' *) apply (par_not_col_strict _ _ _ _ A); Col; apply (l12_9 _ _ _ _ B C); Perp; Cop. (* Goal: @Out Tn B A' C *) assert(HNCol4 := par_strict_not_col_4 B B' A A' HPars). (* Goal: @Out Tn B A' C *) apply (col_one_side_out _ B'); Col. (* Goal: @OS Tn B B' A' C *) apply (one_side_transitivity _ _ _ A). (* Goal: @OS Tn B B' A C *) (* Goal: @OS Tn B B' A' A *) apply l12_6; Par. (* Goal: @OS Tn B B' A C *) apply invert_one_side. (* Goal: @OS Tn B' B A C *) apply in_angle_one_side; Col. (* Goal: @InAngle Tn A B' B C *) apply l11_24. (* Goal: @InAngle Tn A C B B' *) apply lea_in_angle; Side. (* Goal: @LeA Tn C B A C B B' *) apply lta_comm. (* Goal: @LtA Tn A B C B' B C *) apply acute_per__lta; Perp. Qed. Lemma acute_col_perp__out_1 : forall A B C A', Acute A B C -> Col B C A' -> Perp B A A A' -> Out B A' C. Proof. (* Goal: forall (A B C A' : @Tpoint Tn) (_ : @Acute Tn A B C) (_ : @Col Tn B C A') (_ : @Perp Tn B A A A'), @Out Tn B A' C *) intros A B C A' HAcute HCol HPerp. (* Goal: @Out Tn B A' C *) destruct (segment_construction A B A B) as [A0 [HA1 HA2]]. (* Goal: @Out Tn B A' C *) destruct (segment_construction C B C B) as [C0 [HC1 HC2]]. (* Goal: @Out Tn B A' C *) assert_diffs. (* Goal: @Out Tn B A' C *) assert (HNCol : ~ Col B A A') by (apply per_not_col; Perp). (* Goal: @Out Tn B A' C *) assert_diffs. (* Goal: @Out Tn B A' C *) apply l6_2 with C0; auto. (* Goal: @Bet Tn A' B C0 *) apply not_out_bet. (* Goal: not (@Out Tn B A' C0) *) (* Goal: @Col Tn A' B C0 *) ColR. (* Goal: not (@Out Tn B A' C0) *) intro. (* Goal: False *) apply (not_bet_and_out A B A0); split; trivial. (* Goal: @Out Tn B A A0 *) apply acute_col_perp__out with A'; Col. (* Goal: @Perp Tn B A0 A' A *) (* Goal: @Acute Tn A' B A0 *) apply acute_sym, (acute_conga__acute A B C); auto. (* Goal: @Perp Tn B A0 A' A *) (* Goal: @CongA Tn A B C A0 B A' *) apply l11_14; auto. (* Goal: @Perp Tn B A0 A' A *) (* Goal: @Bet Tn C B A' *) apply between_symmetry, l6_2 with C0; Between. (* Goal: @Perp Tn B A0 A' A *) (* Goal: @Out Tn B C0 A' *) apply l6_6; assumption. (* Goal: @Perp Tn B A0 A' A *) apply perp_col with A; Col; Perp. Qed. Lemma conga_cop_inangle_per2__inangle : forall A B C P T, Per A B C -> InAngle T A B C -> CongA P B A P B C -> Per B P T -> Coplanar A B C P -> InAngle P A B C. Proof. (* Goal: forall (A B C P T : @Tpoint Tn) (_ : @Per Tn A B C) (_ : @InAngle Tn T A B C) (_ : @CongA Tn P B A P B C) (_ : @Per Tn B P T) (_ : @Coplanar Tn A B C P), @InAngle Tn P A B C *) intros A B C P T HPer HInangle HConga HPerP HCop. (* Goal: @InAngle Tn P A B C *) destruct (eq_dec_points P T). (* Goal: @InAngle Tn P A B C *) (* Goal: @InAngle Tn P A B C *) subst; apply HInangle. (* Goal: @InAngle Tn P A B C *) assert_diffs. (* Goal: @InAngle Tn P A B C *) destruct (angle_bisector A B C) as [P' [HInangle' HConga']]; auto. (* Goal: @InAngle Tn P A B C *) assert_diffs. (* Goal: @InAngle Tn P A B C *) assert (HAcute : Acute P' B A). (* Goal: @InAngle Tn P A B C *) (* Goal: @Acute Tn P' B A *) apply acute_sym, conga_inangle_per__acute with C; trivial. (* Goal: @InAngle Tn P A B C *) apply l11_25 with P' A C; try (apply out_trivial); auto. (* Goal: @Out Tn B P P' *) assert (HNCol1 : ~ Col A B C) by (apply per_not_col; auto). (* Goal: @Out Tn B P P' *) assert (HCol : Col B P P'). (* Goal: @Out Tn B P P' *) (* Goal: @Col Tn B P P' *) apply conga2_cop2__col with A C; trivial. (* Goal: @Out Tn B P P' *) (* Goal: @Coplanar Tn B C P P' *) (* Goal: @Coplanar Tn A B P P' *) (* Goal: not (@Out Tn B A C) *) intro; apply HNCol1; Col. (* Goal: @Out Tn B P P' *) (* Goal: @Coplanar Tn B C P P' *) (* Goal: @Coplanar Tn A B P P' *) apply coplanar_trans_1 with C; Cop; Col. (* Goal: @Out Tn B P P' *) (* Goal: @Coplanar Tn B C P P' *) apply coplanar_trans_1 with A; Cop. (* Goal: @Out Tn B P P' *) apply (acute_col_perp__out T); Col. (* Goal: @Perp Tn B P' T P *) (* Goal: @Acute Tn T B P' *) { (* Goal: @Acute Tn T B P' *) apply acute_lea_acute with P' B A; trivial. (* Goal: @LeA Tn T B P' P' B A *) assert (HNCol2 : ~ Col P' B A). (* Goal: @LeA Tn T B P' P' B A *) (* Goal: not (@Col Tn P' B A) *) intro. (* Goal: @LeA Tn T B P' P' B A *) (* Goal: False *) assert (Col P' B C) by (apply (col_conga_col P' B A); assumption). (* Goal: @LeA Tn T B P' P' B A *) (* Goal: False *) apply HNCol1; ColR. (* Goal: @LeA Tn T B P' P' B A *) assert (Coplanar A B T P') by (apply coplanar_trans_1 with C; Cop; Col). (* Goal: @LeA Tn T B P' P' B A *) destruct (col_dec T B P'); [|assert_diffs; destruct (cop__one_or_two_sides B P' A T); Col; Cop]. (* Goal: @LeA Tn T B P' P' B A *) (* Goal: @LeA Tn T B P' P' B A *) (* Goal: @LeA Tn T B P' P' B A *) - (* Goal: @LeA Tn T B P' P' B A *) apply l11_31_1; auto. (* Goal: @Out Tn B T P' *) apply col_one_side_out with A; Col. (* Goal: @OS Tn B A T P' *) apply invert_one_side, inangle_one_side with C; Col. (* Goal: not (@Col Tn A B T) *) assert (~ Col B P T) by (apply per_not_col; auto). (* Goal: not (@Col Tn A B T) *) intro; assert_diffs; apply HNCol2; ColR. (* BG Goal: @Perp Tn B P' T P *) (* BG Goal: @LeA Tn T B P' P' B A *) (* BG Goal: @LeA Tn T B P' P' B A *) - (* Goal: @LeA Tn T B P' P' B A *) apply (l11_30 P' B T P' B C); CongA. (* Goal: @LeA Tn P' B T P' B C *) exists T; split; CongA. (* Goal: @InAngle Tn T P' B C *) apply l11_24 in HInangle; apply l11_24 in HInangle'. (* Goal: @InAngle Tn T P' B C *) destruct (col_dec B C T). (* Goal: @InAngle Tn T P' B C *) (* Goal: @InAngle Tn T P' B C *) apply out341__inangle; auto. (* Goal: @InAngle Tn T P' B C *) (* Goal: @Out Tn B C T *) apply col_in_angle_out with A; Col. (* Goal: @InAngle Tn T P' B C *) (* Goal: not (@Bet Tn C B A) *) intro; apply HNCol1; Col. (* Goal: @InAngle Tn T P' B C *) assert (HNCol3 : ~ Col P' B C) by (apply (ncol_conga_ncol P' B A); assumption). (* Goal: @InAngle Tn T P' B C *) apply os2__inangle. (* Goal: @OS Tn B C P' T *) (* Goal: @OS Tn B P' C T *) exists A; split; Side. (* Goal: @OS Tn B C P' T *) (* Goal: @TS Tn B P' C A *) apply invert_two_sides, in_angle_two_sides; Col. (* Goal: @OS Tn B C P' T *) apply invert_one_side, inangle_one_side with A; Col. (* BG Goal: @Perp Tn B P' T P *) (* BG Goal: @LeA Tn T B P' P' B A *) - (* Goal: @LeA Tn T B P' P' B A *) exists T; split; CongA. (* Goal: @InAngle Tn T P' B A *) destruct (col_dec B A T). (* Goal: @InAngle Tn T P' B A *) (* Goal: @InAngle Tn T P' B A *) apply out341__inangle; auto. (* Goal: @InAngle Tn T P' B A *) (* Goal: @Out Tn B A T *) apply col_in_angle_out with C; Col. (* Goal: @InAngle Tn T P' B A *) (* Goal: not (@Bet Tn A B C) *) intro; apply HNCol1; Col. (* Goal: @InAngle Tn T P' B A *) apply os2__inangle; trivial. (* Goal: @OS Tn B A P' T *) apply invert_one_side, inangle_one_side with C; Col. (* BG Goal: @Perp Tn B P' T P *) } (* Goal: @Perp Tn B P' T P *) apply perp_col with P; Col. (* Goal: @Perp Tn B P T P *) apply perp_right_comm, per_perp; auto. Qed. End T12_2'. Hint Resolve col_par par_strict_par : par. Hint Resolve l12_6 pars__os3412 : side. Section T12_3. Context `{TnEQD:Tarski_neutral_dimensionless_with_decidable_point_equality}. Lemma perp_not_par : forall A B X Y, Perp A B X Y -> ~ Par A B X Y. Proof. (* Goal: forall (A B X Y : @Tpoint Tn) (_ : @Perp Tn A B X Y), not (@Par Tn A B X Y) *) intros. (* Goal: not (@Par Tn A B X Y) *) assert(HH:=H). (* Goal: not (@Par Tn A B X Y) *) unfold Perp in HH. (* Goal: not (@Par Tn A B X Y) *) ex_and HH P. (* Goal: not (@Par Tn A B X Y) *) intro. (* Goal: False *) induction H1. (* Goal: False *) (* Goal: False *) apply H1. (* Goal: False *) (* Goal: @ex (@Tpoint Tn) (fun X0 : @Tpoint Tn => and (@Col Tn X0 A B) (@Col Tn X0 X Y)) *) exists P. (* Goal: False *) (* Goal: and (@Col Tn P A B) (@Col Tn P X Y) *) apply perp_in_col in H0. (* Goal: False *) (* Goal: and (@Col Tn P A B) (@Col Tn P X Y) *) spliter. (* Goal: False *) (* Goal: and (@Col Tn P A B) (@Col Tn P X Y) *) split; Col. (* Goal: False *) spliter. (* Goal: False *) induction(eq_dec_points A Y). (* Goal: False *) (* Goal: False *) subst Y. (* Goal: False *) (* Goal: False *) assert(P = A). (* Goal: False *) (* Goal: False *) (* Goal: @eq (@Tpoint Tn) P A *) eapply (l8_14_2_1b P A B X A); Col. (* Goal: False *) (* Goal: False *) subst P. (* Goal: False *) (* Goal: False *) apply perp_in_comm in H0. (* Goal: False *) (* Goal: False *) apply perp_in_per in H0. (* Goal: False *) (* Goal: False *) assert(~ Col B A X). (* Goal: False *) (* Goal: False *) (* Goal: not (@Col Tn B A X) *) eapply(per_not_col). (* Goal: False *) (* Goal: False *) (* Goal: @Per Tn B A X *) (* Goal: not (@eq (@Tpoint Tn) A X) *) (* Goal: not (@eq (@Tpoint Tn) B A) *) auto. (* Goal: False *) (* Goal: False *) (* Goal: @Per Tn B A X *) (* Goal: not (@eq (@Tpoint Tn) A X) *) auto. (* Goal: False *) (* Goal: False *) (* Goal: @Per Tn B A X *) assumption. (* Goal: False *) (* Goal: False *) apply H5. (* Goal: False *) (* Goal: @Col Tn B A X *) Col. (* Goal: False *) apply(l8_16_1 A B X A Y); Col. (* Goal: @Col Tn A B X *) (* Goal: @Col Tn A B Y *) ColR. (* Goal: @Col Tn A B X *) ColR. Qed. Lemma cong_conga_perp : forall A B C P, TS B P A C -> Cong A B C B -> CongA A B P C B P -> Perp A C B P. Proof. (* Goal: forall (A B C P : @Tpoint Tn) (_ : @TS Tn B P A C) (_ : @Cong Tn A B C B) (_ : @CongA Tn A B P C B P), @Perp Tn A C B P *) intros. (* Goal: @Perp Tn A C B P *) assert(HH:=H). (* Goal: @Perp Tn A C B P *) unfold TS in HH. (* Goal: @Perp Tn A C B P *) assert (~ Col A B P). (* Goal: @Perp Tn A C B P *) (* Goal: not (@Col Tn A B P) *) spliter. (* Goal: @Perp Tn A C B P *) (* Goal: not (@Col Tn A B P) *) assumption. (* Goal: @Perp Tn A C B P *) spliter. (* Goal: @Perp Tn A C B P *) ex_and H5 T. (* Goal: @Perp Tn A C B P *) assert(B <> P). (* Goal: @Perp Tn A C B P *) (* Goal: not (@eq (@Tpoint Tn) B P) *) intro. (* Goal: @Perp Tn A C B P *) (* Goal: False *) subst P. (* Goal: @Perp Tn A C B P *) (* Goal: False *) apply H3. (* Goal: @Perp Tn A C B P *) (* Goal: @Col Tn A B B *) Col. (* Goal: @Perp Tn A C B P *) assert(A <> B). (* Goal: @Perp Tn A C B P *) (* Goal: not (@eq (@Tpoint Tn) A B) *) intro. (* Goal: @Perp Tn A C B P *) (* Goal: False *) subst B. (* Goal: @Perp Tn A C B P *) (* Goal: False *) apply H3. (* Goal: @Perp Tn A C B P *) (* Goal: @Col Tn A A P *) Col. (* Goal: @Perp Tn A C B P *) assert(C <> B). (* Goal: @Perp Tn A C B P *) (* Goal: not (@eq (@Tpoint Tn) C B) *) intro. (* Goal: @Perp Tn A C B P *) (* Goal: False *) subst C. (* Goal: @Perp Tn A C B P *) (* Goal: False *) apply H4. (* Goal: @Perp Tn A C B P *) (* Goal: @Col Tn B B P *) Col. (* Goal: @Perp Tn A C B P *) assert(A <> C). (* Goal: @Perp Tn A C B P *) (* Goal: not (@eq (@Tpoint Tn) A C) *) intro. (* Goal: @Perp Tn A C B P *) (* Goal: False *) subst C. (* Goal: @Perp Tn A C B P *) (* Goal: False *) assert(OS B P A A). (* Goal: @Perp Tn A C B P *) (* Goal: False *) (* Goal: @OS Tn B P A A *) apply one_side_reflexivity. (* Goal: @Perp Tn A C B P *) (* Goal: False *) (* Goal: not (@Col Tn A B P) *) assumption. (* Goal: @Perp Tn A C B P *) (* Goal: False *) apply l9_9 in H. (* Goal: @Perp Tn A C B P *) (* Goal: False *) contradiction. (* Goal: @Perp Tn A C B P *) induction (bet_dec A B C). (* Goal: @Perp Tn A C B P *) (* Goal: @Perp Tn A C B P *) assert(Per P B A). (* Goal: @Perp Tn A C B P *) (* Goal: @Perp Tn A C B P *) (* Goal: @Per Tn P B A *) apply(l11_18_2 P B A C); auto. (* Goal: @Perp Tn A C B P *) (* Goal: @Perp Tn A C B P *) (* Goal: @CongA Tn P B A P B C *) apply conga_comm. (* Goal: @Perp Tn A C B P *) (* Goal: @Perp Tn A C B P *) (* Goal: @CongA Tn A B P C B P *) assumption. (* Goal: @Perp Tn A C B P *) (* Goal: @Perp Tn A C B P *) eapply (col_per_perp _ _ _ C) in H12; auto. (* Goal: @Perp Tn A C B P *) (* Goal: @Col Tn B A C *) (* Goal: @Perp Tn A C B P *) apply perp_right_comm. (* Goal: @Perp Tn A C B P *) (* Goal: @Col Tn B A C *) (* Goal: @Perp Tn A C P B *) assumption. (* Goal: @Perp Tn A C B P *) (* Goal: @Col Tn B A C *) apply bet_col in H11. (* Goal: @Perp Tn A C B P *) (* Goal: @Col Tn B A C *) Col. (* Goal: @Perp Tn A C B P *) assert(B <> T). (* Goal: @Perp Tn A C B P *) (* Goal: not (@eq (@Tpoint Tn) B T) *) intro. (* Goal: @Perp Tn A C B P *) (* Goal: False *) subst T. (* Goal: @Perp Tn A C B P *) (* Goal: False *) contradiction. (* Goal: @Perp Tn A C B P *) assert(CongA T B A T B C). (* Goal: @Perp Tn A C B P *) (* Goal: @CongA Tn T B A T B C *) induction H5. (* Goal: @Perp Tn A C B P *) (* Goal: @CongA Tn T B A T B C *) (* Goal: @CongA Tn T B A T B C *) eapply (l11_13 P _ _ P); Between. (* Goal: @Perp Tn A C B P *) (* Goal: @CongA Tn T B A T B C *) (* Goal: @CongA Tn P B A P B C *) apply conga_comm. (* Goal: @Perp Tn A C B P *) (* Goal: @CongA Tn T B A T B C *) (* Goal: @CongA Tn A B P C B P *) apply H1. (* Goal: @Perp Tn A C B P *) (* Goal: @CongA Tn T B A T B C *) assert(Out B P T). (* Goal: @Perp Tn A C B P *) (* Goal: @CongA Tn T B A T B C *) (* Goal: @Out Tn B P T *) repeat split; auto. (* Goal: @Perp Tn A C B P *) (* Goal: @CongA Tn T B A T B C *) (* Goal: or (@Bet Tn B P T) (@Bet Tn B T P) *) induction H5. (* Goal: @Perp Tn A C B P *) (* Goal: @CongA Tn T B A T B C *) (* Goal: or (@Bet Tn B P T) (@Bet Tn B T P) *) (* Goal: or (@Bet Tn B P T) (@Bet Tn B T P) *) left. (* Goal: @Perp Tn A C B P *) (* Goal: @CongA Tn T B A T B C *) (* Goal: or (@Bet Tn B P T) (@Bet Tn B T P) *) (* Goal: @Bet Tn B P T *) Between. (* Goal: @Perp Tn A C B P *) (* Goal: @CongA Tn T B A T B C *) (* Goal: or (@Bet Tn B P T) (@Bet Tn B T P) *) right. (* Goal: @Perp Tn A C B P *) (* Goal: @CongA Tn T B A T B C *) (* Goal: @Bet Tn B T P *) Between. (* Goal: @Perp Tn A C B P *) (* Goal: @CongA Tn T B A T B C *) apply conga_comm. (* Goal: @Perp Tn A C B P *) (* Goal: @CongA Tn A B T C B T *) eapply (out_conga A _ P C _ P); auto. (* Goal: @Perp Tn A C B P *) (* Goal: @Out Tn B C C *) (* Goal: @Out Tn B A A *) apply out_trivial. (* Goal: @Perp Tn A C B P *) (* Goal: @Out Tn B C C *) (* Goal: not (@eq (@Tpoint Tn) A B) *) auto. (* Goal: @Perp Tn A C B P *) (* Goal: @Out Tn B C C *) apply out_trivial. (* Goal: @Perp Tn A C B P *) (* Goal: not (@eq (@Tpoint Tn) C B) *) auto. (* Goal: @Perp Tn A C B P *) assert(Cong T A T C). (* Goal: @Perp Tn A C B P *) (* Goal: @Cong Tn T A T C *) apply (cong2_conga_cong T B A T B C); Cong. (* Goal: @Perp Tn A C B P *) assert(Midpoint T A C). (* Goal: @Perp Tn A C B P *) (* Goal: @Midpoint Tn T A C *) split; Cong. (* Goal: @Perp Tn A C B P *) assert(Per B T A). (* Goal: @Perp Tn A C B P *) (* Goal: @Per Tn B T A *) unfold Per. (* Goal: @Perp Tn A C B P *) (* Goal: @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => and (@Midpoint Tn T A C') (@Cong Tn B A B C')) *) exists C. (* Goal: @Perp Tn A C B P *) (* Goal: and (@Midpoint Tn T A C) (@Cong Tn B A B C) *) split; Cong. (* Goal: @Perp Tn A C B P *) eapply (col_per_perp _ _ _ C) in H16; auto. (* Goal: @Col Tn T A C *) (* Goal: not (@eq (@Tpoint Tn) C T) *) (* Goal: not (@eq (@Tpoint Tn) T A) *) (* Goal: @Perp Tn A C B P *) apply perp_sym. (* Goal: @Col Tn T A C *) (* Goal: not (@eq (@Tpoint Tn) C T) *) (* Goal: not (@eq (@Tpoint Tn) T A) *) (* Goal: @Perp Tn B P A C *) apply (perp_col _ T); Col. (* Goal: @Col Tn T A C *) (* Goal: not (@eq (@Tpoint Tn) C T) *) (* Goal: not (@eq (@Tpoint Tn) T A) *) (* Goal: @Perp Tn B T A C *) Perp. (* Goal: @Col Tn T A C *) (* Goal: not (@eq (@Tpoint Tn) C T) *) (* Goal: not (@eq (@Tpoint Tn) T A) *) intro. (* Goal: @Col Tn T A C *) (* Goal: not (@eq (@Tpoint Tn) C T) *) (* Goal: False *) subst T. (* Goal: @Col Tn T A C *) (* Goal: not (@eq (@Tpoint Tn) C T) *) (* Goal: False *) apply is_midpoint_id in H15. (* Goal: @Col Tn T A C *) (* Goal: not (@eq (@Tpoint Tn) C T) *) (* Goal: False *) contradiction. (* Goal: @Col Tn T A C *) (* Goal: not (@eq (@Tpoint Tn) C T) *) intro. (* Goal: @Col Tn T A C *) (* Goal: False *) subst T. (* Goal: @Col Tn T A C *) (* Goal: False *) apply l7_2 in H15. (* Goal: @Col Tn T A C *) (* Goal: False *) apply is_midpoint_id in H15. (* Goal: @Col Tn T A C *) (* Goal: False *) apply H10. (* Goal: @Col Tn T A C *) (* Goal: @eq (@Tpoint Tn) A C *) auto. (* Goal: @Col Tn T A C *) apply bet_col in H6. (* Goal: @Col Tn T A C *) Col. Qed. Lemma perp_inter_exists : forall A B C D, Perp A B C D -> exists P, Col A B P /\ Col C D P. Proof. (* Goal: forall (A B C D : @Tpoint Tn) (_ : @Perp Tn A B C D), @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@Col Tn A B P) (@Col Tn C D P)) *) intros A B C D HPerp. (* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@Col Tn A B P) (@Col Tn C D P)) *) destruct HPerp as [P [_ [_ [HCol1 [HCol2]]]]]. (* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@Col Tn A B P) (@Col Tn C D P)) *) exists P; split; Col. Qed. Lemma perp_inter_perp_in : forall A B C D, Perp A B C D -> exists P, Col A B P /\ Col C D P /\ Perp_at P A B C D. Proof. (* Goal: forall (A B C D : @Tpoint Tn) (_ : @Perp Tn A B C D), @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@Col Tn A B P) (and (@Col Tn C D P) (@Perp_at Tn P A B C D))) *) intros. (* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@Col Tn A B P) (and (@Col Tn C D P) (@Perp_at Tn P A B C D))) *) assert(HH:=perp_inter_exists A B C D H). (* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@Col Tn A B P) (and (@Col Tn C D P) (@Perp_at Tn P A B C D))) *) ex_and HH P. (* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@Col Tn A B P) (and (@Col Tn C D P) (@Perp_at Tn P A B C D))) *) exists P. (* Goal: and (@Col Tn A B P) (and (@Col Tn C D P) (@Perp_at Tn P A B C D)) *) split. (* Goal: and (@Col Tn C D P) (@Perp_at Tn P A B C D) *) (* Goal: @Col Tn A B P *) Col. (* Goal: and (@Col Tn C D P) (@Perp_at Tn P A B C D) *) split. (* Goal: @Perp_at Tn P A B C D *) (* Goal: @Col Tn C D P *) Col. (* Goal: @Perp_at Tn P A B C D *) apply l8_14_2_1b_bis; Col. Qed. End T12_3. Section T12_2D. Context `{T2D:Tarski_2D}. Lemma col_perp2__col : forall X1 X2 Y1 Y2 A B, Perp X1 X2 A B -> Perp Y1 Y2 A B -> Col X1 Y1 Y2 -> Col X2 Y1 Y2. Proof. (* Goal: forall (X1 X2 Y1 Y2 A B : @Tpoint Tn) (_ : @Perp Tn X1 X2 A B) (_ : @Perp Tn Y1 Y2 A B) (_ : @Col Tn X1 Y1 Y2), @Col Tn X2 Y1 Y2 *) intros. (* Goal: @Col Tn X2 Y1 Y2 *) apply col_cop2_perp2__col with X1 A B; trivial; apply all_coplanar. Qed. Lemma l12_9_2D : forall A1 A2 B1 B2 C1 C2, Perp A1 A2 C1 C2 -> Perp B1 B2 C1 C2 -> Par A1 A2 B1 B2. Proof. (* Goal: forall (A1 A2 B1 B2 C1 C2 : @Tpoint Tn) (_ : @Perp Tn A1 A2 C1 C2) (_ : @Perp Tn B1 B2 C1 C2), @Par Tn A1 A2 B1 B2 *) intros A1 A2 B1 B2 C1 C2. (* Goal: forall (_ : @Perp Tn A1 A2 C1 C2) (_ : @Perp Tn B1 B2 C1 C2), @Par Tn A1 A2 B1 B2 *) apply l12_9; apply all_coplanar. Qed. Lemma conga_inangle_per2__inangle : forall A B C P T, Per A B C -> InAngle T A B C -> CongA P B A P B C -> Per B P T -> InAngle P A B C. Proof. (* Goal: forall (A B C P T : @Tpoint Tn) (_ : @Per Tn A B C) (_ : @InAngle Tn T A B C) (_ : @CongA Tn P B A P B C) (_ : @Per Tn B P T), @InAngle Tn P A B C *) intros. (* Goal: @InAngle Tn P A B C *) assert (HCop := all_coplanar A B C P). (* Goal: @InAngle Tn P A B C *) apply conga_cop_inangle_per2__inangle with T; assumption. Qed. End T12_2D.
Require Import mathcomp.ssreflect.ssreflect. From mathcomp Require Import ssrfun ssrbool eqtype ssrnat seq. Set Implicit Arguments. Unset Strict Implicit. Unset Printing Implicit Defensive. Definition edivn_rec d := fix loop m q := if m - d is m'.+1 then loop m' q.+1 else (q, m). Definition edivn m d := if d > 0 then edivn_rec d.-1 m 0 else (0, m). Variant edivn_spec m d : nat * nat -> Type := EdivnSpec q r of m = q * d + r & (d > 0) ==> (r < d) : edivn_spec m d (q, r). Lemma edivnP m d : edivn_spec m d (edivn m d). Proof. (* Goal: edivn_spec m d (edivn m d) *) rewrite -{1}[m]/(0 * d + m) /edivn; case: d => //= d. (* Goal: edivn_spec (addn (muln O (S d)) m) (S d) (edivn_rec d m O) *) elim: m {-2}m 0 (leqnn m) => [|n IHn] [|m] q //= le_mn. (* Goal: edivn_spec (addn (muln q (S d)) (S m)) (S d) match subn (S m) d with | O => @pair nat nat q (S m) | S m' => edivn_rec d m' (S q) end *) have le_m'n: m - d <= n by rewrite (leq_trans (leq_subr d m)). (* Goal: edivn_spec (addn (muln q (S d)) (S m)) (S d) match subn (S m) d with | O => @pair nat nat q (S m) | S m' => edivn_rec d m' (S q) end *) rewrite subn_if_gt; case: ltnP => [// | le_dm]. (* Goal: edivn_spec (addn (muln q (S d)) (S m)) (S d) (edivn_rec d (subn m d) (S q)) *) by rewrite -{1}(subnKC le_dm) -addSn addnA -mulSnr; apply: IHn. Qed. Lemma edivn_eq d q r : r < d -> edivn (q * d + r) d = (q, r). Proof. (* Goal: forall _ : is_true (leq (S r) d), @eq (prod nat nat) (edivn (addn (muln q d) r) d) (@pair nat nat q r) *) move=> lt_rd; have d_gt0: 0 < d by apply: leq_trans lt_rd. (* Goal: @eq (prod nat nat) (edivn (addn (muln q d) r) d) (@pair nat nat q r) *) case: edivnP lt_rd => q' r'; rewrite d_gt0 /=. (* Goal: forall (_ : @eq nat (addn (muln q d) r) (addn (muln q' d) r')) (_ : is_true (leq (S r') d)) (_ : is_true (leq (S r) d)), @eq (prod nat nat) (@pair nat nat q' r') (@pair nat nat q r) *) wlog: q q' r r' / q <= q' by case/orP: (leq_total q q'); last symmetry; eauto. (* Goal: forall (_ : is_true (leq q q')) (_ : @eq nat (addn (muln q d) r) (addn (muln q' d) r')) (_ : is_true (leq (S r') d)) (_ : is_true (leq (S r) d)), @eq (prod nat nat) (@pair nat nat q' r') (@pair nat nat q r) *) rewrite leq_eqVlt; case/predU1P => [-> /addnI-> |] //=. (* Goal: forall (_ : is_true (leq (S q) q')) (_ : @eq nat (addn (muln q d) r) (addn (muln q' d) r')) (_ : is_true (leq (S r') d)) (_ : is_true (leq (S r) d)), @eq (prod nat nat) (@pair nat nat q' r') (@pair nat nat q r) *) rewrite -(leq_pmul2r d_gt0) => /leq_add lt_qr eq_qr _ /lt_qr {lt_qr}. (* Goal: forall _ : is_true (leq (addn (muln (S q) d) (S r)) (addn (muln q' d) d)), @eq (prod nat nat) (@pair nat nat q' r') (@pair nat nat q r) *) by rewrite addnS ltnNge mulSn -addnA eq_qr addnCA addnA leq_addr. Qed. Definition divn m d := (edivn m d).1. Notation "m %/ d" := (divn m d) : nat_scope. Definition modn_rec d := fix loop m := if m - d is m'.+1 then loop m' else m. Definition modn m d := if d > 0 then modn_rec d.-1 m else m. Notation "m %% d" := (modn m d) : nat_scope. Notation "m = n %[mod d ]" := (m %% d = n %% d) : nat_scope. Notation "m == n %[mod d ]" := (m %% d == n %% d) : nat_scope. Notation "m <> n %[mod d ]" := (m %% d <> n %% d) : nat_scope. Notation "m != n %[mod d ]" := (m %% d != n %% d) : nat_scope. Lemma modn_def m d : m %% d = (edivn m d).2. Proof. (* Goal: @eq nat (modn m d) (@snd nat nat (edivn m d)) *) case: d => //= d; rewrite /modn /edivn /=. (* Goal: @eq nat (modn_rec d m) (@snd nat nat (edivn_rec d m O)) *) elim: m {-2}m 0 (leqnn m) => [|n IHn] [|m] q //=. (* Goal: forall _ : is_true (leq (S m) (S n)), @eq nat match subn (S m) d with | O => S m | S m' => modn_rec d m' end (@snd nat nat match subn (S m) d with | O => @pair nat nat q (S m) | S m' => edivn_rec d m' (S q) end) *) rewrite ltnS !subn_if_gt; case: (d <= m) => // le_mn. (* Goal: @eq nat (modn_rec d (subn m d)) (@snd nat nat (edivn_rec d (subn m d) (S q))) *) by apply: IHn; apply: leq_trans le_mn; apply: leq_subr. Qed. Lemma edivn_def m d : edivn m d = (m %/ d, m %% d). Proof. (* Goal: @eq (prod nat nat) (edivn m d) (@pair nat nat (divn m d) (modn m d)) *) by rewrite /divn modn_def; case: (edivn m d). Qed. Lemma divn_eq m d : m = m %/ d * d + m %% d. Proof. (* Goal: @eq nat m (addn (muln (divn m d) d) (modn m d)) *) by rewrite /divn modn_def; case: edivnP. Qed. Lemma div0n d : 0 %/ d = 0. Proof. by case: d. Qed. Proof. (* Goal: @eq nat (divn O d) O *) by case: d. Qed. Lemma mod0n d : 0 %% d = 0. Proof. by case: d. Qed. Proof. (* Goal: @eq nat (modn O d) O *) by case: d. Qed. Lemma divn_small m d : m < d -> m %/ d = 0. Proof. (* Goal: forall _ : is_true (leq (S m) d), @eq nat (divn m d) O *) by move=> lt_md; rewrite /divn (edivn_eq 0). Qed. Lemma divnMDl q m d : 0 < d -> (q * d + m) %/ d = q + m %/ d. Proof. (* Goal: forall _ : is_true (leq (S O) d), @eq nat (divn (addn (muln q d) m) d) (addn q (divn m d)) *) move=> d_gt0; rewrite {1}(divn_eq m d) addnA -mulnDl. (* Goal: @eq nat (divn (addn (muln (addn q (divn m d)) d) (modn m d)) d) (addn q (divn m d)) *) by rewrite /divn edivn_eq // modn_def; case: edivnP; rewrite d_gt0. Qed. Lemma mulnK m d : 0 < d -> m * d %/ d = m. Proof. (* Goal: forall _ : is_true (leq (S O) d), @eq nat (divn (muln m d) d) m *) by move=> d_gt0; rewrite -[m * d]addn0 divnMDl // div0n addn0. Qed. Lemma mulKn m d : 0 < d -> d * m %/ d = m. Proof. (* Goal: forall _ : is_true (leq (S O) d), @eq nat (divn (muln d m) d) m *) by move=> d_gt0; rewrite mulnC mulnK. Qed. Lemma expnB p m n : p > 0 -> m >= n -> p ^ (m - n) = p ^ m %/ p ^ n. Proof. (* Goal: forall (_ : is_true (leq (S O) p)) (_ : is_true (leq n m)), @eq nat (expn p (subn m n)) (divn (expn p m) (expn p n)) *) by move=> p_gt0 /subnK{2}<-; rewrite expnD mulnK // expn_gt0 p_gt0. Qed. Lemma modn1 m : m %% 1 = 0. Proof. (* Goal: @eq nat (modn m (S O)) O *) by rewrite modn_def; case: edivnP => ? []. Qed. Lemma divn1 m : m %/ 1 = m. Proof. (* Goal: @eq nat (divn m (S O)) m *) by rewrite {2}(@divn_eq m 1) // modn1 addn0 muln1. Qed. Lemma divnn d : d %/ d = (0 < d). Proof. (* Goal: @eq nat (divn d d) (nat_of_bool (leq (S O) d)) *) by case: d => // d; rewrite -{1}[d.+1]muln1 mulKn. Qed. Lemma divnMl p m d : p > 0 -> p * m %/ (p * d) = m %/ d. Proof. (* Goal: forall _ : is_true (leq (S O) p), @eq nat (divn (muln p m) (muln p d)) (divn m d) *) move=> p_gt0; case: (posnP d) => [-> | d_gt0]; first by rewrite muln0. (* Goal: @eq nat (divn (muln p m) (muln p d)) (divn m d) *) rewrite {2}/divn; case: edivnP; rewrite d_gt0 /= => q r ->{m} lt_rd. (* Goal: @eq nat (divn (muln p (addn (muln q d) r)) (muln p d)) q *) rewrite mulnDr mulnCA divnMDl; last by rewrite muln_gt0 p_gt0. (* Goal: @eq nat (addn q (divn (muln p r) (muln p d))) q *) by rewrite addnC divn_small // ltn_pmul2l. Qed. Arguments divnMl [p m d]. Lemma divnMr p m d : p > 0 -> m * p %/ (d * p) = m %/ d. Proof. (* Goal: forall _ : is_true (leq (S O) p), @eq nat (divn (muln m p) (muln d p)) (divn m d) *) by move=> p_gt0; rewrite -!(mulnC p) divnMl. Qed. Arguments divnMr [p m d]. Lemma ltn_mod m d : (m %% d < d) = (0 < d). Proof. (* Goal: @eq bool (leq (S (modn m d)) d) (leq (S O) d) *) by case: d => // d; rewrite modn_def; case: edivnP. Qed. Lemma ltn_pmod m d : 0 < d -> m %% d < d. Proof. (* Goal: forall _ : is_true (leq (S O) d), is_true (leq (S (modn m d)) d) *) by rewrite ltn_mod. Qed. Lemma leq_trunc_div m d : m %/ d * d <= m. Proof. (* Goal: is_true (leq (muln (divn m d) d) m) *) by rewrite {2}(divn_eq m d) leq_addr. Qed. Lemma leq_mod m d : m %% d <= m. Proof. (* Goal: is_true (leq (modn m d) m) *) by rewrite {2}(divn_eq m d) leq_addl. Qed. Lemma leq_div m d : m %/ d <= m. Proof. (* Goal: is_true (leq (divn m d) m) *) by case: d => // d; apply: leq_trans (leq_pmulr _ _) (leq_trunc_div _ _). Qed. Lemma ltn_ceil m d : 0 < d -> m < (m %/ d).+1 * d. Proof. (* Goal: forall _ : is_true (leq (S O) d), is_true (leq (S m) (muln (S (divn m d)) d)) *) by move=> d_gt0; rewrite {1}(divn_eq m d) -addnS mulSnr leq_add2l ltn_mod. Qed. Lemma ltn_divLR m n d : d > 0 -> (m %/ d < n) = (m < n * d). Lemma leq_divRL m n d : d > 0 -> (m <= n %/ d) = (m * d <= n). Proof. (* Goal: forall _ : is_true (leq (S O) d), @eq bool (leq m (divn n d)) (leq (muln m d) n) *) by move=> d_gt0; rewrite leqNgt ltn_divLR // -leqNgt. Qed. Lemma ltn_Pdiv m d : 1 < d -> 0 < m -> m %/ d < m. Proof. (* Goal: forall (_ : is_true (leq (S (S O)) d)) (_ : is_true (leq (S O) m)), is_true (leq (S (divn m d)) m) *) by move=> d_gt1 m_gt0; rewrite ltn_divLR ?ltn_Pmulr // ltnW. Qed. Lemma divn_gt0 d m : 0 < d -> (0 < m %/ d) = (d <= m). Proof. (* Goal: forall _ : is_true (leq (S O) d), @eq bool (leq (S O) (divn m d)) (leq d m) *) by move=> d_gt0; rewrite leq_divRL ?mul1n. Qed. Lemma leq_div2r d m n : m <= n -> m %/ d <= n %/ d. Proof. (* Goal: forall _ : is_true (leq m n), is_true (leq (divn m d) (divn n d)) *) have [-> //| d_gt0 le_mn] := posnP d. (* Goal: is_true (leq (divn m d) (divn n d)) *) by rewrite leq_divRL // (leq_trans _ le_mn) -?leq_divRL. Qed. Lemma leq_div2l m d e : 0 < d -> d <= e -> m %/ e <= m %/ d. Proof. (* Goal: forall (_ : is_true (leq (S O) d)) (_ : is_true (leq d e)), is_true (leq (divn m e) (divn m d)) *) move/leq_divRL=> -> le_de. (* Goal: is_true (leq (muln (divn m e) d) m) *) by apply: leq_trans (leq_trunc_div m e); apply: leq_mul. Qed. Lemma leq_divDl p m n : (m + n) %/ p <= m %/ p + n %/ p + 1. Proof. (* Goal: is_true (leq (divn (addn m n) p) (addn (addn (divn m p) (divn n p)) (S O))) *) have [-> //| p_gt0] := posnP p; rewrite -ltnS -addnS ltn_divLR // ltnW //. (* Goal: is_true (leq (S (S (addn m n))) (muln (addn (addn (divn m p) (divn n p)) (S (S O))) p)) *) rewrite {1}(divn_eq n p) {1}(divn_eq m p) addnACA !mulnDl -3!addnS leq_add2l. (* Goal: is_true (leq (S (addn (modn m p) (S (modn n p)))) (muln (S (S O)) p)) *) by rewrite mul2n -addnn -addSn leq_add // ltn_mod. Qed. Lemma geq_divBl k m p : k %/ p - m %/ p <= (k - m) %/ p + 1. Lemma divnMA m n p : m %/ (n * p) = m %/ n %/ p. Proof. (* Goal: @eq nat (divn m (muln n p)) (divn (divn m n) p) *) case: n p => [|n] [|p]; rewrite ?muln0 ?div0n //. (* Goal: @eq nat (divn m (muln (S n) (S p))) (divn (divn m (S n)) (S p)) *) rewrite {2}(divn_eq m (n.+1 * p.+1)) mulnA mulnAC !divnMDl //. (* Goal: @eq nat (divn m (muln (S n) (S p))) (addn (divn m (muln (S n) (S p))) (divn (divn (modn m (muln (S n) (S p))) (S n)) (S p))) *) by rewrite [_ %/ p.+1]divn_small ?addn0 // ltn_divLR // mulnC ltn_mod. Qed. Lemma divnAC m n p : m %/ n %/ p = m %/ p %/ n. Proof. (* Goal: @eq nat (divn (divn m n) p) (divn (divn m p) n) *) by rewrite -!divnMA mulnC. Qed. Lemma modn_small m d : m < d -> m %% d = m. Proof. (* Goal: forall _ : is_true (leq (S m) d), @eq nat (modn m d) m *) by move=> lt_md; rewrite {2}(divn_eq m d) divn_small. Qed. Lemma modn_mod m d : m %% d = m %[mod d]. Proof. (* Goal: @eq nat (modn (modn m d) d) (modn m d) *) by case: d => // d; apply: modn_small; rewrite ltn_mod. Qed. Lemma modnMDl p m d : p * d + m = m %[mod d]. Proof. (* Goal: @eq nat (modn (addn (muln p d) m) d) (modn m d) *) case: (posnP d) => [-> | d_gt0]; first by rewrite muln0. (* Goal: @eq nat (modn (addn (muln p d) m) d) (modn m d) *) by rewrite {1}(divn_eq m d) addnA -mulnDl modn_def edivn_eq // ltn_mod. Qed. Lemma muln_modr {p m d} : 0 < p -> p * (m %% d) = (p * m) %% (p * d). Lemma muln_modl {p m d} : 0 < p -> (m %% d) * p = (m * p) %% (d * p). Proof. (* Goal: forall _ : is_true (leq (S O) p), @eq nat (muln (modn m d) p) (modn (muln m p) (muln d p)) *) by rewrite -!(mulnC p); apply: muln_modr. Qed. Lemma modnDl m d : d + m = m %[mod d]. Proof. (* Goal: @eq nat (modn (addn d m) d) (modn m d) *) by rewrite -{1}[d]mul1n modnMDl. Qed. Lemma modnDr m d : m + d = m %[mod d]. Proof. (* Goal: @eq nat (modn (addn m d) d) (modn m d) *) by rewrite addnC modnDl. Qed. Lemma modnn d : d %% d = 0. Proof. (* Goal: @eq nat (modn d d) O *) by rewrite -{1}[d]addn0 modnDl mod0n. Qed. Lemma modnMl p d : p * d %% d = 0. Proof. (* Goal: @eq nat (modn (muln p d) d) O *) by rewrite -[p * d]addn0 modnMDl mod0n. Qed. Lemma modnMr p d : d * p %% d = 0. Proof. (* Goal: @eq nat (modn (muln d p) d) O *) by rewrite mulnC modnMl. Qed. Lemma modnDml m n d : m %% d + n = m + n %[mod d]. Proof. (* Goal: @eq nat (modn (addn (modn m d) n) d) (modn (addn m n) d) *) by rewrite {2}(divn_eq m d) -addnA modnMDl. Qed. Lemma modnDmr m n d : m + n %% d = m + n %[mod d]. Proof. (* Goal: @eq nat (modn (addn m (modn n d)) d) (modn (addn m n) d) *) by rewrite !(addnC m) modnDml. Qed. Lemma modnDm m n d : m %% d + n %% d = m + n %[mod d]. Proof. (* Goal: @eq nat (modn (addn (modn m d) (modn n d)) d) (modn (addn m n) d) *) by rewrite modnDml modnDmr. Qed. Lemma eqn_modDl p m n d : (p + m == p + n %[mod d]) = (m == n %[mod d]). Proof. (* Goal: @eq bool (@eq_op nat_eqType (modn (addn p m) d) (modn (addn p n) d)) (@eq_op nat_eqType (modn m d) (modn n d)) *) case: d => [|d]; first by rewrite !modn0 eqn_add2l. (* Goal: @eq bool (@eq_op nat_eqType (modn (addn p m) (S d)) (modn (addn p n) (S d))) (@eq_op nat_eqType (modn m (S d)) (modn n (S d))) *) apply/eqP/eqP=> eq_mn; last by rewrite -modnDmr eq_mn modnDmr. (* Goal: @eq (Equality.sort nat_eqType) (modn m (S d)) (modn n (S d)) *) rewrite -(modnMDl p m) -(modnMDl p n) !mulnSr -!addnA. (* Goal: @eq (Equality.sort nat_eqType) (modn (addn (muln p d) (addn p m)) (S d)) (modn (addn (muln p d) (addn p n)) (S d)) *) by rewrite -modnDmr eq_mn modnDmr. Qed. Lemma eqn_modDr p m n d : (m + p == n + p %[mod d]) = (m == n %[mod d]). Proof. (* Goal: @eq bool (@eq_op nat_eqType (modn (addn m p) d) (modn (addn n p) d)) (@eq_op nat_eqType (modn m d) (modn n d)) *) by rewrite -!(addnC p) eqn_modDl. Qed. Lemma modnMml m n d : m %% d * n = m * n %[mod d]. Proof. (* Goal: @eq nat (modn (muln (modn m d) n) d) (modn (muln m n) d) *) by rewrite {2}(divn_eq m d) mulnDl mulnAC modnMDl. Qed. Lemma modnMmr m n d : m * (n %% d) = m * n %[mod d]. Proof. (* Goal: @eq nat (modn (muln m (modn n d)) d) (modn (muln m n) d) *) by rewrite !(mulnC m) modnMml. Qed. Lemma modnMm m n d : m %% d * (n %% d) = m * n %[mod d]. Proof. (* Goal: @eq nat (modn (muln (modn m d) (modn n d)) d) (modn (muln m n) d) *) by rewrite modnMml modnMmr. Qed. Lemma modn2 m : m %% 2 = odd m. Proof. (* Goal: @eq nat (modn m (S (S O))) (nat_of_bool (odd m)) *) by elim: m => //= m IHm; rewrite -addn1 -modnDml IHm; case odd. Qed. Lemma divn2 m : m %/ 2 = m./2. Proof. (* Goal: @eq nat (divn m (S (S O))) (half m) *) by rewrite {2}(divn_eq m 2) modn2 muln2 addnC half_bit_double. Qed. Lemma odd_mod m d : odd d = false -> odd (m %% d) = odd m. Proof. (* Goal: forall _ : @eq bool (odd d) false, @eq bool (odd (modn m d)) (odd m) *) by move=> d_even; rewrite {2}(divn_eq m d) odd_add odd_mul d_even andbF. Qed. Lemma modnXm m n a : (a %% n) ^ m = a ^ m %[mod n]. Proof. (* Goal: @eq nat (modn (expn (modn a n) m) n) (modn (expn a m) n) *) by elim: m => // m IHm; rewrite !expnS -modnMmr IHm modnMml modnMmr. Qed. Definition dvdn d m := m %% d == 0. Notation "m %| d" := (dvdn m d) : nat_scope. Lemma dvdnP d m : reflect (exists k, m = k * d) (d %| m). Proof. (* Goal: Bool.reflect (@ex nat (fun k : nat => @eq nat m (muln k d))) (dvdn d m) *) apply: (iffP eqP) => [md0 | [k ->]]; last by rewrite modnMl. (* Goal: @ex nat (fun k : nat => @eq nat m (muln k d)) *) by exists (m %/ d); rewrite {1}(divn_eq m d) md0 addn0. Qed. Arguments dvdnP {d m}. Lemma dvdn0 d : d %| 0. Proof. (* Goal: is_true (dvdn d O) *) by case: d. Qed. Lemma dvd0n n : (0 %| n) = (n == 0). Proof. (* Goal: @eq bool (dvdn O n) (@eq_op nat_eqType n O) *) by case: n. Qed. Lemma dvdn1 d : (d %| 1) = (d == 1). Proof. (* Goal: @eq bool (dvdn d (S O)) (@eq_op nat_eqType d (S O)) *) by case: d => [|[|d]] //; rewrite /dvdn modn_small. Qed. Lemma dvd1n m : 1 %| m. Proof. (* Goal: is_true (dvdn (S O) m) *) by rewrite /dvdn modn1. Qed. Lemma dvdn_gt0 d m : m > 0 -> d %| m -> d > 0. Proof. (* Goal: forall (_ : is_true (leq (S O) m)) (_ : is_true (dvdn d m)), is_true (leq (S O) d) *) by case: d => // /prednK <-. Qed. Lemma dvdnn m : m %| m. Proof. (* Goal: is_true (dvdn m m) *) by rewrite /dvdn modnn. Qed. Lemma dvdn_mull d m n : d %| n -> d %| m * n. Proof. (* Goal: forall _ : is_true (dvdn d n), is_true (dvdn d (muln m n)) *) by case/dvdnP=> n' ->; rewrite /dvdn mulnA modnMl. Qed. Lemma dvdn_mulr d m n : d %| m -> d %| m * n. Proof. (* Goal: forall _ : is_true (dvdn d m), is_true (dvdn d (muln m n)) *) by move=> d_m; rewrite mulnC dvdn_mull. Qed. Hint Resolve dvdn0 dvd1n dvdnn dvdn_mull dvdn_mulr : core. Lemma dvdn_mul d1 d2 m1 m2 : d1 %| m1 -> d2 %| m2 -> d1 * d2 %| m1 * m2. Proof. (* Goal: forall (_ : is_true (dvdn d1 m1)) (_ : is_true (dvdn d2 m2)), is_true (dvdn (muln d1 d2) (muln m1 m2)) *) by move=> /dvdnP[q1 ->] /dvdnP[q2 ->]; rewrite mulnCA -mulnA 2?dvdn_mull. Qed. Lemma dvdn_trans n d m : d %| n -> n %| m -> d %| m. Proof. (* Goal: forall (_ : is_true (dvdn d n)) (_ : is_true (dvdn n m)), is_true (dvdn d m) *) by move=> d_dv_n /dvdnP[n1 ->]; apply: dvdn_mull. Qed. Lemma dvdn_eq d m : (d %| m) = (m %/ d * d == m). Proof. (* Goal: @eq bool (dvdn d m) (@eq_op nat_eqType (muln (divn m d) d) m) *) apply/eqP/eqP=> [modm0 | <-]; last exact: modnMl. (* Goal: @eq (Equality.sort nat_eqType) (muln (divn m d) d) m *) by rewrite {2}(divn_eq m d) modm0 addn0. Qed. Lemma dvdn2 n : (2 %| n) = ~~ odd n. Proof. (* Goal: @eq bool (dvdn (S (S O)) n) (negb (odd n)) *) by rewrite /dvdn modn2; case (odd n). Qed. Lemma dvdn_odd m n : m %| n -> odd n -> odd m. Proof. (* Goal: forall (_ : is_true (dvdn m n)) (_ : is_true (odd n)), is_true (odd m) *) by move=> m_dv_n; apply: contraTT; rewrite -!dvdn2 => /dvdn_trans->. Qed. Lemma divnK d m : d %| m -> m %/ d * d = m. Proof. (* Goal: forall _ : is_true (dvdn d m), @eq nat (muln (divn m d) d) m *) by rewrite dvdn_eq; move/eqP. Qed. Lemma leq_divLR d m n : d %| m -> (m %/ d <= n) = (m <= n * d). Proof. (* Goal: forall _ : is_true (dvdn d m), @eq bool (leq (divn m d) n) (leq m (muln n d)) *) by case: d m => [|d] [|m] ///divnK=> {2}<-; rewrite leq_pmul2r. Qed. Lemma ltn_divRL d m n : d %| m -> (n < m %/ d) = (n * d < m). Proof. (* Goal: forall _ : is_true (dvdn d m), @eq bool (leq (S n) (divn m d)) (leq (S (muln n d)) m) *) by move=> dv_d_m; rewrite !ltnNge leq_divLR. Qed. Lemma eqn_div d m n : d > 0 -> d %| m -> (n == m %/ d) = (n * d == m). Proof. (* Goal: forall (_ : is_true (leq (S O) d)) (_ : is_true (dvdn d m)), @eq bool (@eq_op nat_eqType n (divn m d)) (@eq_op nat_eqType (muln n d) m) *) by move=> d_gt0 dv_d_m; rewrite -(eqn_pmul2r d_gt0) divnK. Qed. Lemma eqn_mul d m n : d > 0 -> d %| m -> (m == n * d) = (m %/ d == n). Proof. (* Goal: forall (_ : is_true (leq (S O) d)) (_ : is_true (dvdn d m)), @eq bool (@eq_op nat_eqType m (muln n d)) (@eq_op nat_eqType (divn m d) n) *) by move=> d_gt0 dv_d_m; rewrite eq_sym -eqn_div // eq_sym. Qed. Lemma divn_mulAC d m n : d %| m -> m %/ d * n = m * n %/ d. Lemma muln_divA d m n : d %| n -> m * (n %/ d) = m * n %/ d. Proof. (* Goal: forall _ : is_true (dvdn d n), @eq nat (muln m (divn n d)) (divn (muln m n) d) *) by move=> dv_d_m; rewrite !(mulnC m) divn_mulAC. Qed. Lemma muln_divCA d m n : d %| m -> d %| n -> m * (n %/ d) = n * (m %/ d). Proof. (* Goal: forall (_ : is_true (dvdn d m)) (_ : is_true (dvdn d n)), @eq nat (muln m (divn n d)) (muln n (divn m d)) *) by move=> dv_d_m dv_d_n; rewrite mulnC divn_mulAC ?muln_divA. Qed. Lemma divnA m n p : p %| n -> m %/ (n %/ p) = m * p %/ n. Proof. (* Goal: forall _ : is_true (dvdn p n), @eq nat (divn m (divn n p)) (divn (muln m p) n) *) by case: p => [|p] dv_n; rewrite -{2}(divnK dv_n) // divnMr. Qed. Lemma modn_dvdm m n d : d %| m -> n %% m = n %[mod d]. Proof. (* Goal: forall _ : is_true (dvdn d m), @eq nat (modn (modn n m) d) (modn n d) *) by case/dvdnP=> q def_m; rewrite {2}(divn_eq n m) {3}def_m mulnA modnMDl. Qed. Lemma dvdn_leq d m : 0 < m -> d %| m -> d <= m. Proof. (* Goal: forall (_ : is_true (leq (S O) m)) (_ : is_true (dvdn d m)), is_true (leq d m) *) by move=> m_gt0 /dvdnP[[|k] Dm]; rewrite Dm // leq_addr in m_gt0 *. Qed. Qed. Lemma gtnNdvd n d : 0 < n -> n < d -> (d %| n) = false. Proof. (* Goal: forall (_ : is_true (leq (S O) n)) (_ : is_true (leq (S n) d)), @eq bool (dvdn d n) false *) by move=> n_gt0 lt_nd; rewrite /dvdn eqn0Ngt modn_small ?n_gt0. Qed. Lemma eqn_dvd m n : (m == n) = (m %| n) && (n %| m). Lemma dvdn_pmul2l p d m : 0 < p -> (p * d %| p * m) = (d %| m). Proof. (* Goal: forall _ : is_true (leq (S O) p), @eq bool (dvdn (muln p d) (muln p m)) (dvdn d m) *) by case: p => // p _; rewrite /dvdn -muln_modr // muln_eq0. Qed. Arguments dvdn_pmul2l [p d m]. Lemma dvdn_pmul2r p d m : 0 < p -> (d * p %| m * p) = (d %| m). Proof. (* Goal: forall _ : is_true (leq (S O) p), @eq bool (dvdn (muln d p) (muln m p)) (dvdn d m) *) by move=> p_gt0; rewrite -!(mulnC p) dvdn_pmul2l. Qed. Arguments dvdn_pmul2r [p d m]. Lemma dvdn_divLR p d m : 0 < p -> p %| d -> (d %/ p %| m) = (d %| m * p). Proof. (* Goal: forall (_ : is_true (leq (S O) p)) (_ : is_true (dvdn p d)), @eq bool (dvdn (divn d p) m) (dvdn d (muln m p)) *) by move=> /(@dvdn_pmul2r p _ m) <- /divnK->. Qed. Lemma dvdn_divRL p d m : p %| m -> (d %| m %/ p) = (d * p %| m). Proof. (* Goal: forall _ : is_true (dvdn p m), @eq bool (dvdn d (divn m p)) (dvdn (muln d p) m) *) have [-> | /(@dvdn_pmul2r p d) <- /divnK-> //] := posnP p. (* Goal: forall _ : is_true (dvdn O m), @eq bool (dvdn d (divn m O)) (dvdn (muln d O) m) *) by rewrite divn0 muln0 dvdn0. Qed. Lemma dvdn_div d m : d %| m -> m %/ d %| m. Proof. (* Goal: forall _ : is_true (dvdn d m), is_true (dvdn (divn m d) m) *) by move/divnK=> {2}<-; apply: dvdn_mulr. Qed. Lemma dvdn_exp2l p m n : m <= n -> p ^ m %| p ^ n. Proof. (* Goal: forall _ : is_true (leq m n), is_true (dvdn (expn p m) (expn p n)) *) by move/subnK <-; rewrite expnD dvdn_mull. Qed. Lemma dvdn_Pexp2l p m n : p > 1 -> (p ^ m %| p ^ n) = (m <= n). Proof. (* Goal: forall _ : is_true (leq (S (S O)) p), @eq bool (dvdn (expn p m) (expn p n)) (leq m n) *) move=> p_gt1; case: leqP => [|gt_n_m]; first exact: dvdn_exp2l. (* Goal: @eq bool (dvdn (expn p m) (expn p n)) false *) by rewrite gtnNdvd ?ltn_exp2l ?expn_gt0 // ltnW. Qed. Lemma dvdn_exp2r m n k : m %| n -> m ^ k %| n ^ k. Proof. (* Goal: forall _ : is_true (dvdn m n), is_true (dvdn (expn m k) (expn n k)) *) by case/dvdnP=> q ->; rewrite expnMn dvdn_mull. Qed. Lemma dvdn_addr m d n : d %| m -> (d %| m + n) = (d %| n). Proof. (* Goal: forall _ : is_true (dvdn d m), @eq bool (dvdn d (addn m n)) (dvdn d n) *) by case/dvdnP=> q ->; rewrite /dvdn modnMDl. Qed. Lemma dvdn_addl n d m : d %| n -> (d %| m + n) = (d %| m). Proof. (* Goal: forall _ : is_true (dvdn d n), @eq bool (dvdn d (addn m n)) (dvdn d m) *) by rewrite addnC; apply: dvdn_addr. Qed. Lemma dvdn_add d m n : d %| m -> d %| n -> d %| m + n. Proof. (* Goal: forall (_ : is_true (dvdn d m)) (_ : is_true (dvdn d n)), is_true (dvdn d (addn m n)) *) by move/dvdn_addr->. Qed. Lemma dvdn_add_eq d m n : d %| m + n -> (d %| m) = (d %| n). Proof. (* Goal: forall _ : is_true (dvdn d (addn m n)), @eq bool (dvdn d m) (dvdn d n) *) by move=> dv_d_mn; apply/idP/idP => [/dvdn_addr | /dvdn_addl] <-. Qed. Lemma dvdn_subr d m n : n <= m -> d %| m -> (d %| m - n) = (d %| n). Proof. (* Goal: forall (_ : is_true (leq n m)) (_ : is_true (dvdn d m)), @eq bool (dvdn d (subn m n)) (dvdn d n) *) by move=> le_n_m dv_d_m; apply: dvdn_add_eq; rewrite subnK. Qed. Lemma dvdn_subl d m n : n <= m -> d %| n -> (d %| m - n) = (d %| m). Proof. (* Goal: forall (_ : is_true (leq n m)) (_ : is_true (dvdn d n)), @eq bool (dvdn d (subn m n)) (dvdn d m) *) by move=> le_n_m dv_d_m; rewrite -(dvdn_addl _ dv_d_m) subnK. Qed. Lemma dvdn_sub d m n : d %| m -> d %| n -> d %| m - n. Proof. (* Goal: forall (_ : is_true (dvdn d m)) (_ : is_true (dvdn d n)), is_true (dvdn d (subn m n)) *) by case: (leqP n m) => [le_nm /dvdn_subr <- // | /ltnW/eqnP ->]; rewrite dvdn0. Qed. Lemma dvdn_exp k d m : 0 < k -> d %| m -> d %| (m ^ k). Proof. (* Goal: forall (_ : is_true (leq (S O) k)) (_ : is_true (dvdn d m)), is_true (dvdn d (expn m k)) *) by case: k => // k _ d_dv_m; rewrite expnS dvdn_mulr. Qed. Lemma dvdn_fact m n : 0 < m <= n -> m %| n`!. Proof. (* Goal: forall _ : is_true (andb (leq (S O) m) (leq m n)), is_true (dvdn m (factorial n)) *) case: m => //= m; elim: n => //= n IHn; rewrite ltnS leq_eqVlt. (* Goal: forall _ : is_true (orb (@eq_op nat_eqType m n) (leq (S m) n)), is_true (dvdn (S m) (factorial (S n))) *) by case/predU1P=> [-> | /IHn]; [apply: dvdn_mulr | apply: dvdn_mull]. Qed. Hint Resolve dvdn_add dvdn_sub dvdn_exp : core. Lemma eqn_mod_dvd d m n : n <= m -> (m == n %[mod d]) = (d %| m - n). Proof. (* Goal: forall _ : is_true (leq n m), @eq bool (@eq_op nat_eqType (modn m d) (modn n d)) (dvdn d (subn m n)) *) by move=> le_mn; rewrite -{1}[n]add0n -{1}(subnK le_mn) eqn_modDr mod0n. Qed. Lemma divnDl m n d : d %| m -> (m + n) %/ d = m %/ d + n %/ d. Proof. (* Goal: forall _ : is_true (dvdn d m), @eq nat (divn (addn m n) d) (addn (divn m d) (divn n d)) *) by case: d => // d /divnK{1}<-; rewrite divnMDl. Qed. Lemma divnDr m n d : d %| n -> (m + n) %/ d = m %/ d + n %/ d. Proof. (* Goal: forall _ : is_true (dvdn d n), @eq nat (divn (addn m n) d) (addn (divn m d) (divn n d)) *) by move=> dv_n; rewrite addnC divnDl // addnC. Qed. Fixpoint gcdn_rec m n := let n' := n %% m in if n' is 0 then m else if m - n'.-1 is m'.+1 then gcdn_rec (m' %% n') n' else n'. Definition gcdn := nosimpl gcdn_rec. Lemma gcdnE m n : gcdn m n = if m == 0 then n else gcdn (n %% m) m. Lemma gcdnn : idempotent gcdn. Proof. (* Goal: @idempotent nat gcdn *) by case=> // n; rewrite gcdnE modnn. Qed. Lemma gcdnC : commutative gcdn. Proof. (* Goal: @commutative nat nat gcdn *) move=> m n; wlog lt_nm: m n / n < m. (* Goal: @eq nat (gcdn m n) (gcdn n m) *) (* Goal: forall _ : forall (m n : nat) (_ : is_true (leq (S n) m)), @eq nat (gcdn m n) (gcdn n m), @eq nat (gcdn m n) (gcdn n m) *) by case: (ltngtP n m) => [||-> //]; last symmetry; auto. (* Goal: @eq nat (gcdn m n) (gcdn n m) *) by rewrite gcdnE -{1}(ltn_predK lt_nm) modn_small. Qed. Lemma gcd0n : left_id 0 gcdn. Proof. by case. Qed. Proof. (* Goal: @left_id nat nat O gcdn *) by case. Qed. Lemma gcd1n : left_zero 1 gcdn. Proof. (* Goal: @left_zero nat nat (S O) gcdn *) by move=> n; rewrite gcdnE modn1. Qed. Lemma gcdn1 : right_zero 1 gcdn. Proof. (* Goal: @right_zero nat nat (S O) gcdn *) by move=> n; rewrite gcdnC gcd1n. Qed. Lemma dvdn_gcdr m n : gcdn m n %| n. Proof. (* Goal: is_true (dvdn (gcdn m n) n) *) elim: m {-2}m (leqnn m) n => [|s IHs] [|m] le_ms [|n] //. (* Goal: is_true (dvdn (gcdn (S m) (S n)) (S n)) *) rewrite gcdnE; case def_n': (_ %% _) => [|n']; first by rewrite /dvdn def_n'. (* Goal: is_true (dvdn (if @eq_op nat_eqType (S m) O then S n else gcdn (S n') (S m)) (S n)) *) have lt_n's: n' < s by rewrite -ltnS (leq_trans _ le_ms) // -def_n' ltn_pmod. (* Goal: is_true (dvdn (if @eq_op nat_eqType (S m) O then S n else gcdn (S n') (S m)) (S n)) *) rewrite /= (divn_eq n.+1 m.+1) def_n' dvdn_addr ?dvdn_mull //; last exact: IHs. (* Goal: is_true (dvdn (gcdn (S n') (S m)) (S n')) *) by rewrite gcdnE /= IHs // (leq_trans _ lt_n's) // ltnW // ltn_pmod. Qed. Lemma dvdn_gcdl m n : gcdn m n %| m. Proof. (* Goal: is_true (dvdn (gcdn m n) m) *) by rewrite gcdnC dvdn_gcdr. Qed. Lemma gcdn_gt0 m n : (0 < gcdn m n) = (0 < m) || (0 < n). Proof. (* Goal: @eq bool (leq (S O) (gcdn m n)) (orb (leq (S O) m) (leq (S O) n)) *) by case: m n => [|m] [|n] //; apply: (@dvdn_gt0 _ m.+1) => //; apply: dvdn_gcdl. Qed. Lemma gcdnMDl k m n : gcdn m (k * m + n) = gcdn m n. Proof. (* Goal: @eq nat (gcdn m (addn (muln k m) n)) (gcdn m n) *) by rewrite !(gcdnE m) modnMDl mulnC; case: m. Qed. Lemma gcdnDl m n : gcdn m (m + n) = gcdn m n. Proof. (* Goal: @eq nat (gcdn m (addn m n)) (gcdn m n) *) by rewrite -{2}(mul1n m) gcdnMDl. Qed. Lemma gcdnDr m n : gcdn m (n + m) = gcdn m n. Proof. (* Goal: @eq nat (gcdn m (addn n m)) (gcdn m n) *) by rewrite addnC gcdnDl. Qed. Lemma gcdnMl n m : gcdn n (m * n) = n. Proof. (* Goal: @eq nat (gcdn n (muln m n)) n *) by case: n => [|n]; rewrite gcdnE modnMl gcd0n. Qed. Lemma gcdnMr n m : gcdn n (n * m) = n. Proof. (* Goal: @eq nat (gcdn n (muln n m)) n *) by rewrite mulnC gcdnMl. Qed. Lemma gcdn_idPl {m n} : reflect (gcdn m n = m) (m %| n). Proof. (* Goal: Bool.reflect (@eq nat (gcdn m n) m) (dvdn m n) *) by apply: (iffP idP) => [/dvdnP[q ->] | <-]; rewrite (gcdnMl, dvdn_gcdr). Qed. Lemma gcdn_idPr {m n} : reflect (gcdn m n = n) (n %| m). Proof. (* Goal: Bool.reflect (@eq nat (gcdn m n) n) (dvdn n m) *) by rewrite gcdnC; apply: gcdn_idPl. Qed. Lemma expn_min e m n : e ^ minn m n = gcdn (e ^ m) (e ^ n). Proof. (* Goal: @eq nat (expn e (minn m n)) (gcdn (expn e m) (expn e n)) *) rewrite /minn; case: leqP; [rewrite gcdnC | move/ltnW]; by move/(dvdn_exp2l e)/gcdn_idPl. Qed. Lemma gcdn_modr m n : gcdn m (n %% m) = gcdn m n. Proof. (* Goal: @eq nat (gcdn m (modn n m)) (gcdn m n) *) by rewrite {2}(divn_eq n m) gcdnMDl. Qed. Lemma gcdn_modl m n : gcdn (m %% n) n = gcdn m n. Proof. (* Goal: @eq nat (gcdn (modn m n) n) (gcdn m n) *) by rewrite !(gcdnC _ n) gcdn_modr. Qed. Fixpoint Bezout_rec km kn qs := if qs is q :: qs' then Bezout_rec kn (NatTrec.add_mul q kn km) qs' else (km, kn). Fixpoint egcdn_rec m n s qs := if s is s'.+1 then let: (q, r) := edivn m n in if r > 0 then egcdn_rec n r s' (q :: qs) else if odd (size qs) then qs else q.-1 :: qs else [::0]. Definition egcdn m n := Bezout_rec 0 1 (egcdn_rec m n n [::]). Variant egcdn_spec m n : nat * nat -> Type := EgcdnSpec km kn of km * m = kn * n + gcdn m n & kn * gcdn m n < m : egcdn_spec m n (km, kn). Lemma egcd0n n : egcdn 0 n = (1, 0). Proof. (* Goal: @eq (prod nat nat) (egcdn O n) (@pair nat nat (S O) O) *) by case: n. Qed. Lemma egcdnP m n : m > 0 -> egcdn_spec m n (egcdn m n). Lemma Bezoutl m n : m > 0 -> {a | a < m & m %| gcdn m n + a * n}. Proof. (* Goal: forall _ : is_true (leq (S O) m), @sig2 nat (fun a : nat => is_true (leq (S a) m)) (fun a : nat => is_true (dvdn m (addn (gcdn m n) (muln a n)))) *) move=> m_gt0; case: (egcdnP n m_gt0) => km kn def_d lt_kn_m. (* Goal: @sig2 nat (fun a : nat => is_true (leq (S a) m)) (fun a : nat => is_true (dvdn m (addn (gcdn m n) (muln a n)))) *) exists kn; last by rewrite addnC -def_d dvdn_mull. (* Goal: is_true (leq (S kn) m) *) apply: leq_ltn_trans lt_kn_m. (* Goal: is_true (leq kn (muln kn (gcdn m n))) *) by rewrite -{1}[kn]muln1 leq_mul2l gcdn_gt0 m_gt0 orbT. Qed. Lemma Bezoutr m n : n > 0 -> {a | a < n & n %| gcdn m n + a * m}. Proof. (* Goal: forall _ : is_true (leq (S O) n), @sig2 nat (fun a : nat => is_true (leq (S a) n)) (fun a : nat => is_true (dvdn n (addn (gcdn m n) (muln a m)))) *) by rewrite gcdnC; apply: Bezoutl. Qed. Lemma dvdn_gcd p m n : p %| gcdn m n = (p %| m) && (p %| n). Proof. (* Goal: @eq bool (dvdn p (gcdn m n)) (andb (dvdn p m) (dvdn p n)) *) apply/idP/andP=> [dv_pmn | [dv_pm dv_pn]]. (* Goal: is_true (dvdn p (gcdn m n)) *) (* Goal: and (is_true (dvdn p m)) (is_true (dvdn p n)) *) by rewrite !(dvdn_trans dv_pmn) ?dvdn_gcdl ?dvdn_gcdr. (* Goal: is_true (dvdn p (gcdn m n)) *) case (posnP n) => [->|n_gt0]; first by rewrite gcdn0. (* Goal: is_true (dvdn p (gcdn m n)) *) case: (Bezoutr m n_gt0) => // km _ /(dvdn_trans dv_pn). (* Goal: forall _ : is_true (dvdn p (addn (gcdn m n) (muln km m))), is_true (dvdn p (gcdn m n)) *) by rewrite dvdn_addl // dvdn_mull. Qed. Lemma gcdnAC : right_commutative gcdn. Proof. (* Goal: @right_commutative nat nat gcdn *) suffices dvd m n p: gcdn (gcdn m n) p %| gcdn (gcdn m p) n. (* Goal: is_true (dvdn (gcdn (gcdn m n) p) (gcdn (gcdn m p) n)) *) (* Goal: @right_commutative nat nat gcdn *) by move=> m n p; apply/eqP; rewrite eqn_dvd !dvd. (* Goal: is_true (dvdn (gcdn (gcdn m n) p) (gcdn (gcdn m p) n)) *) rewrite !dvdn_gcd dvdn_gcdr. (* Goal: is_true (andb (andb (dvdn (gcdn (gcdn m n) p) m) true) (dvdn (gcdn (gcdn m n) p) n)) *) by rewrite !(dvdn_trans (dvdn_gcdl _ p)) ?dvdn_gcdl ?dvdn_gcdr. Qed. Lemma gcdnA : associative gcdn. Proof. (* Goal: @associative nat gcdn *) by move=> m n p; rewrite !(gcdnC m) gcdnAC. Qed. Lemma gcdnCA : left_commutative gcdn. Proof. (* Goal: @left_commutative nat nat gcdn *) by move=> m n p; rewrite !gcdnA (gcdnC m). Qed. Lemma gcdnACA : interchange gcdn gcdn. Proof. (* Goal: @interchange nat gcdn gcdn *) by move=> m n p q; rewrite -!gcdnA (gcdnCA n). Qed. Lemma muln_gcdr : right_distributive muln gcdn. Proof. (* Goal: @right_distributive nat nat muln gcdn *) move=> p m n; case: (posnP p) => [-> //| p_gt0]. (* Goal: @eq nat (muln p (gcdn m n)) (gcdn (muln p m) (muln p n)) *) elim: {m}m.+1 {-2}m n (ltnSn m) => // s IHs m n; rewrite ltnS => le_ms. (* Goal: @eq nat (muln p (gcdn m n)) (gcdn (muln p m) (muln p n)) *) rewrite gcdnE [rhs in _ = rhs]gcdnE muln_eq0 (gtn_eqF p_gt0) -muln_modr //=. (* Goal: @eq nat (muln p (if @eq_op nat_eqType m O then n else gcdn (modn n m) m)) (if @eq_op nat_eqType m O then muln p n else gcdn (muln p (modn n m)) (muln p m)) *) by case: posnP => // m_gt0; apply: IHs; apply: leq_trans le_ms; apply: ltn_pmod. Qed. Lemma muln_gcdl : left_distributive muln gcdn. Proof. (* Goal: @left_distributive nat nat muln gcdn *) by move=> m n p; rewrite -!(mulnC p) muln_gcdr. Qed. Lemma gcdn_def d m n : d %| m -> d %| n -> (forall d', d' %| m -> d' %| n -> d' %| d) -> gcdn m n = d. Lemma muln_divCA_gcd n m : n * (m %/ gcdn n m) = m * (n %/ gcdn n m). Proof. (* Goal: @eq nat (muln n (divn m (gcdn n m))) (muln m (divn n (gcdn n m))) *) by rewrite muln_divCA ?dvdn_gcdl ?dvdn_gcdr. Qed. Definition lcmn m n := m * n %/ gcdn m n. Lemma lcmnC : commutative lcmn. Proof. (* Goal: @commutative nat nat lcmn *) by move=> m n; rewrite /lcmn mulnC gcdnC. Qed. Lemma lcm0n : left_zero 0 lcmn. Proof. by move=> n; apply: div0n. Qed. Proof. (* Goal: @left_zero nat nat O lcmn *) by move=> n; apply: div0n. Qed. Lemma lcm1n : left_id 1 lcmn. Proof. (* Goal: @left_id nat nat (S O) lcmn *) by move=> n; rewrite /lcmn gcd1n mul1n divn1. Qed. Lemma lcmn1 : right_id 1 lcmn. Proof. (* Goal: @right_id nat nat (S O) lcmn *) by move=> n; rewrite lcmnC lcm1n. Qed. Lemma muln_lcm_gcd m n : lcmn m n * gcdn m n = m * n. Proof. (* Goal: @eq nat (muln (lcmn m n) (gcdn m n)) (muln m n) *) by apply/eqP; rewrite divnK ?dvdn_mull ?dvdn_gcdr. Qed. Lemma lcmn_gt0 m n : (0 < lcmn m n) = (0 < m) && (0 < n). Proof. (* Goal: @eq bool (leq (S O) (lcmn m n)) (andb (leq (S O) m) (leq (S O) n)) *) by rewrite -muln_gt0 ltn_divRL ?dvdn_mull ?dvdn_gcdr. Qed. Lemma muln_lcmr : right_distributive muln lcmn. Proof. (* Goal: @right_distributive nat nat muln lcmn *) case=> // m n p; rewrite /lcmn -muln_gcdr -!mulnA divnMl // mulnCA. (* Goal: @eq nat (muln (S m) (divn (muln n p) (gcdn n p))) (divn (muln (S m) (muln n p)) (gcdn n p)) *) by rewrite muln_divA ?dvdn_mull ?dvdn_gcdr. Qed. Lemma muln_lcml : left_distributive muln lcmn. Proof. (* Goal: @left_distributive nat nat muln lcmn *) by move=> m n p; rewrite -!(mulnC p) muln_lcmr. Qed. Lemma lcmnA : associative lcmn. Proof. (* Goal: @associative nat lcmn *) move=> m n p; rewrite {1 3}/lcmn mulnC !divn_mulAC ?dvdn_mull ?dvdn_gcdr //. (* Goal: @eq nat (divn (divn (muln (muln n p) m) (gcdn n p)) (gcdn m (lcmn n p))) (divn (divn (muln (muln m n) p) (gcdn m n)) (gcdn (lcmn m n) p)) *) rewrite -!divnMA ?dvdn_mulr ?dvdn_gcdl // mulnC mulnA !muln_gcdr. (* Goal: @eq nat (divn (muln (muln m n) p) (gcdn (muln (gcdn n p) m) (muln (gcdn n p) (lcmn n p)))) (divn (muln (muln m n) p) (gcdn (muln (gcdn m n) (lcmn m n)) (muln (gcdn m n) p))) *) by rewrite ![_ * lcmn _ _]mulnC !muln_lcm_gcd !muln_gcdl -!(mulnC m) gcdnA. Qed. Lemma lcmnCA : left_commutative lcmn. Proof. (* Goal: @left_commutative nat nat lcmn *) by move=> m n p; rewrite !lcmnA (lcmnC m). Qed. Lemma lcmnAC : right_commutative lcmn. Proof. (* Goal: @right_commutative nat nat lcmn *) by move=> m n p; rewrite -!lcmnA (lcmnC n). Qed. Lemma lcmnACA : interchange lcmn lcmn. Proof. (* Goal: @interchange nat lcmn lcmn *) by move=> m n p q; rewrite -!lcmnA (lcmnCA n). Qed. Lemma dvdn_lcml d1 d2 : d1 %| lcmn d1 d2. Proof. (* Goal: is_true (dvdn d1 (lcmn d1 d2)) *) by rewrite /lcmn -muln_divA ?dvdn_gcdr ?dvdn_mulr. Qed. Lemma dvdn_lcmr d1 d2 : d2 %| lcmn d1 d2. Proof. (* Goal: is_true (dvdn d2 (lcmn d1 d2)) *) by rewrite lcmnC dvdn_lcml. Qed. Lemma dvdn_lcm d1 d2 m : lcmn d1 d2 %| m = (d1 %| m) && (d2 %| m). Proof. (* Goal: @eq bool (dvdn (lcmn d1 d2) m) (andb (dvdn d1 m) (dvdn d2 m)) *) case: d1 d2 => [|d1] [|d2]; try by case: m => [|m]; rewrite ?lcmn0 ?andbF. (* Goal: @eq bool (dvdn (lcmn (S d1) (S d2)) m) (andb (dvdn (S d1) m) (dvdn (S d2) m)) *) rewrite -(@dvdn_pmul2r (gcdn d1.+1 d2.+1)) ?gcdn_gt0 // muln_lcm_gcd. (* Goal: @eq bool (dvdn (muln (S d1) (S d2)) (muln m (gcdn (S d1) (S d2)))) (andb (dvdn (S d1) m) (dvdn (S d2) m)) *) by rewrite muln_gcdr dvdn_gcd {1}mulnC andbC !dvdn_pmul2r. Qed. Lemma lcmnMl m n : lcmn m (m * n) = m * n. Proof. (* Goal: @eq nat (lcmn m (muln m n)) (muln m n) *) by case: m => // m; rewrite /lcmn gcdnMr mulKn. Qed. Lemma lcmnMr m n : lcmn n (m * n) = m * n. Proof. (* Goal: @eq nat (lcmn n (muln m n)) (muln m n) *) by rewrite mulnC lcmnMl. Qed. Lemma lcmn_idPr {m n} : reflect (lcmn m n = n) (m %| n). Proof. (* Goal: Bool.reflect (@eq nat (lcmn m n) n) (dvdn m n) *) by apply: (iffP idP) => [/dvdnP[q ->] | <-]; rewrite (lcmnMr, dvdn_lcml). Qed. Lemma lcmn_idPl {m n} : reflect (lcmn m n = m) (n %| m). Proof. (* Goal: Bool.reflect (@eq nat (lcmn m n) m) (dvdn n m) *) by rewrite lcmnC; apply: lcmn_idPr. Qed. Lemma expn_max e m n : e ^ maxn m n = lcmn (e ^ m) (e ^ n). Proof. (* Goal: @eq nat (expn e (maxn m n)) (lcmn (expn e m) (expn e n)) *) rewrite /maxn; case: leqP; [rewrite lcmnC | move/ltnW]; by move/(dvdn_exp2l e)/lcmn_idPr. Qed. Definition coprime m n := gcdn m n == 1. Lemma coprime1n n : coprime 1 n. Proof. (* Goal: is_true (coprime (S O) n) *) by rewrite /coprime gcd1n. Qed. Lemma coprimen1 n : coprime n 1. Proof. (* Goal: is_true (coprime n (S O)) *) by rewrite /coprime gcdn1. Qed. Lemma coprime_sym m n : coprime m n = coprime n m. Proof. (* Goal: @eq bool (coprime m n) (coprime n m) *) by rewrite /coprime gcdnC. Qed. Lemma coprime_modl m n : coprime (m %% n) n = coprime m n. Proof. (* Goal: @eq bool (coprime (modn m n) n) (coprime m n) *) by rewrite /coprime gcdn_modl. Qed. Lemma coprime_modr m n : coprime m (n %% m) = coprime m n. Proof. (* Goal: @eq bool (coprime m (modn n m)) (coprime m n) *) by rewrite /coprime gcdn_modr. Qed. Lemma coprime2n n : coprime 2 n = odd n. Proof. (* Goal: @eq bool (coprime (S (S O)) n) (odd n) *) by rewrite -coprime_modr modn2; case: (odd n). Qed. Lemma coprimen2 n : coprime n 2 = odd n. Proof. (* Goal: @eq bool (coprime n (S (S O))) (odd n) *) by rewrite coprime_sym coprime2n. Qed. Lemma coprimeSn n : coprime n.+1 n. Proof. (* Goal: is_true (coprime (S n) n) *) by rewrite -coprime_modl (modnDr 1) coprime_modl coprime1n. Qed. Lemma coprimenS n : coprime n n.+1. Proof. (* Goal: is_true (coprime n (S n)) *) by rewrite coprime_sym coprimeSn. Qed. Lemma coprimePn n : n > 0 -> coprime n.-1 n. Proof. (* Goal: forall _ : is_true (leq (S O) n), is_true (coprime (Nat.pred n) n) *) by case: n => // n _; rewrite coprimenS. Qed. Lemma coprimenP n : n > 0 -> coprime n n.-1. Proof. (* Goal: forall _ : is_true (leq (S O) n), is_true (coprime n (Nat.pred n)) *) by case: n => // n _; rewrite coprimeSn. Qed. Lemma coprimeP n m : n > 0 -> reflect (exists u, u.1 * n - u.2 * m = 1) (coprime n m). Proof. (* Goal: forall _ : is_true (leq (S O) n), Bool.reflect (@ex (prod nat nat) (fun u : prod nat nat => @eq nat (subn (muln (@fst nat nat u) n) (muln (@snd nat nat u) m)) (S O))) (coprime n m) *) move=> n_gt0; apply: (iffP eqP) => [<-| [[kn km] /= kn_km_1]]. (* Goal: @eq nat (gcdn n m) (S O) *) (* Goal: @ex (prod nat nat) (fun u : prod nat nat => @eq nat (subn (muln (@fst nat nat u) n) (muln (@snd nat nat u) m)) (gcdn n m)) *) by have [kn km kg _] := egcdnP m n_gt0; exists (kn, km); rewrite kg addKn. (* Goal: @eq nat (gcdn n m) (S O) *) apply gcdn_def; rewrite ?dvd1n // => d dv_d_n dv_d_m. (* Goal: is_true (dvdn d (S O)) *) by rewrite -kn_km_1 dvdn_subr ?dvdn_mull // ltnW // -subn_gt0 kn_km_1. Qed. Lemma modn_coprime k n : 0 < k -> (exists u, (k * u) %% n = 1) -> coprime k n. Lemma Gauss_dvd m n p : coprime m n -> (m * n %| p) = (m %| p) && (n %| p). Proof. (* Goal: forall _ : is_true (coprime m n), @eq bool (dvdn (muln m n) p) (andb (dvdn m p) (dvdn n p)) *) by move=> co_mn; rewrite -muln_lcm_gcd (eqnP co_mn) muln1 dvdn_lcm. Qed. Lemma Gauss_dvdr m n p : coprime m n -> (m %| n * p) = (m %| p). Proof. (* Goal: forall _ : is_true (coprime m n), @eq bool (dvdn m (muln n p)) (dvdn m p) *) case: n => [|n] co_mn; first by case: m co_mn => [|[]] // _; rewrite !dvd1n. (* Goal: @eq bool (dvdn m (muln (S n) p)) (dvdn m p) *) by symmetry; rewrite mulnC -(@dvdn_pmul2r n.+1) ?Gauss_dvd // andbC dvdn_mull. Qed. Lemma Gauss_dvdl m n p : coprime m p -> (m %| n * p) = (m %| n). Proof. (* Goal: forall _ : is_true (coprime m p), @eq bool (dvdn m (muln n p)) (dvdn m n) *) by rewrite mulnC; apply: Gauss_dvdr. Qed. Lemma dvdn_double_leq m n : m %| n -> odd m -> ~~ odd n -> 0 < n -> m.*2 <= n. Proof. (* Goal: forall (_ : is_true (dvdn m n)) (_ : is_true (odd m)) (_ : is_true (negb (odd n))) (_ : is_true (leq (S O) n)), is_true (leq (double m) n) *) move=> m_dv_n odd_m even_n n_gt0. (* Goal: is_true (leq (double m) n) *) by rewrite -muln2 dvdn_leq // Gauss_dvd ?coprimen2 ?m_dv_n ?dvdn2. Qed. Lemma dvdn_double_ltn m n : m %| n.-1 -> odd m -> odd n -> 1 < n -> m.*2 < n. Proof. (* Goal: forall (_ : is_true (dvdn m (Nat.pred n))) (_ : is_true (odd m)) (_ : is_true (odd n)) (_ : is_true (leq (S (S O)) n)), is_true (leq (S (double m)) n) *) by case: n => //; apply: dvdn_double_leq. Qed. Lemma Gauss_gcdr p m n : coprime p m -> gcdn p (m * n) = gcdn p n. Proof. (* Goal: forall _ : is_true (coprime p m), @eq nat (gcdn p (muln m n)) (gcdn p n) *) move=> co_pm; apply/eqP; rewrite eqn_dvd !dvdn_gcd !dvdn_gcdl /=. (* Goal: is_true (andb (dvdn (gcdn p (muln m n)) n) (dvdn (gcdn p n) (muln m n))) *) rewrite andbC dvdn_mull ?dvdn_gcdr //= -(@Gauss_dvdr _ m) ?dvdn_gcdr //. (* Goal: is_true (coprime (gcdn p (muln m n)) m) *) by rewrite /coprime gcdnAC (eqnP co_pm) gcd1n. Qed. Lemma Gauss_gcdl p m n : coprime p n -> gcdn p (m * n) = gcdn p m. Proof. (* Goal: forall _ : is_true (coprime p n), @eq nat (gcdn p (muln m n)) (gcdn p m) *) by move=> co_pn; rewrite mulnC Gauss_gcdr. Qed. Lemma coprime_mulr p m n : coprime p (m * n) = coprime p m && coprime p n. Proof. (* Goal: @eq bool (coprime p (muln m n)) (andb (coprime p m) (coprime p n)) *) case co_pm: (coprime p m) => /=; first by rewrite /coprime Gauss_gcdr. (* Goal: @eq bool (coprime p (muln m n)) false *) apply/eqP=> co_p_mn; case/eqnP: co_pm; apply gcdn_def => // d dv_dp dv_dm. (* Goal: is_true (dvdn d (S O)) *) by rewrite -co_p_mn dvdn_gcd dv_dp dvdn_mulr. Qed. Lemma coprime_mull p m n : coprime (m * n) p = coprime m p && coprime n p. Proof. (* Goal: @eq bool (coprime (muln m n) p) (andb (coprime m p) (coprime n p)) *) by rewrite -!(coprime_sym p) coprime_mulr. Qed. Lemma coprime_pexpl k m n : 0 < k -> coprime (m ^ k) n = coprime m n. Proof. (* Goal: forall _ : is_true (leq (S O) k), @eq bool (coprime (expn m k) n) (coprime m n) *) case: k => // k _; elim: k => [|k IHk]; first by rewrite expn1. (* Goal: @eq bool (coprime (expn m (S (S k))) n) (coprime m n) *) by rewrite expnS coprime_mull -IHk; case coprime. Qed. Lemma coprime_pexpr k m n : 0 < k -> coprime m (n ^ k) = coprime m n. Proof. (* Goal: forall _ : is_true (leq (S O) k), @eq bool (coprime m (expn n k)) (coprime m n) *) by move=> k_gt0; rewrite !(coprime_sym m) coprime_pexpl. Qed. Lemma coprime_expl k m n : coprime m n -> coprime (m ^ k) n. Proof. (* Goal: forall _ : is_true (coprime m n), is_true (coprime (expn m k) n) *) by case: k => [|k] co_pm; rewrite ?coprime1n // coprime_pexpl. Qed. Lemma coprime_expr k m n : coprime m n -> coprime m (n ^ k). Proof. (* Goal: forall _ : is_true (coprime m n), is_true (coprime m (expn n k)) *) by rewrite !(coprime_sym m); apply: coprime_expl. Qed. Lemma coprime_dvdl m n p : m %| n -> coprime n p -> coprime m p. Proof. (* Goal: forall (_ : is_true (dvdn m n)) (_ : is_true (coprime n p)), is_true (coprime m p) *) by case/dvdnP=> d ->; rewrite coprime_mull => /andP[]. Qed. Lemma coprime_dvdr m n p : m %| n -> coprime p n -> coprime p m. Proof. (* Goal: forall (_ : is_true (dvdn m n)) (_ : is_true (coprime p n)), is_true (coprime p m) *) by rewrite !(coprime_sym p); apply: coprime_dvdl. Qed. Lemma coprime_egcdn n m : n > 0 -> coprime (egcdn n m).1 (egcdn n m).2. Proof. (* Goal: forall _ : is_true (leq (S O) n), is_true (coprime (@fst nat nat (egcdn n m)) (@snd nat nat (egcdn n m))) *) move=> n_gt0; case: (egcdnP m n_gt0) => kn km /= /eqP. (* Goal: forall (_ : is_true (@eq_op nat_eqType (muln kn n) (addn (muln km m) (gcdn n m)))) (_ : is_true (leq (S (muln km (gcdn n m))) n)), is_true (coprime kn km) *) have [/dvdnP[u defn] /dvdnP[v defm]] := (dvdn_gcdl n m, dvdn_gcdr n m). (* Goal: forall (_ : is_true (@eq_op nat_eqType (muln kn n) (addn (muln km m) (gcdn n m)))) (_ : is_true (leq (S (muln km (gcdn n m))) n)), is_true (coprime kn km) *) rewrite -[gcdn n m]mul1n {1}defm {1}defn !mulnA -mulnDl addnC. (* Goal: forall (_ : is_true (@eq_op nat_eqType (muln (muln kn u) (gcdn n m)) (muln (addn (S O) (muln km v)) (gcdn n m)))) (_ : is_true (leq (S (muln (muln km (S O)) (gcdn n m))) n)), is_true (coprime kn km) *) rewrite eqn_pmul2r ?gcdn_gt0 ?n_gt0 //; case: kn => // kn /eqP def_knu _. (* Goal: is_true (coprime (S kn) km) *) by apply/coprimeP=> //; exists (u, v); rewrite mulnC def_knu mulnC addnK. Qed. Lemma dvdn_pexp2r m n k : k > 0 -> (m ^ k %| n ^ k) = (m %| n). Proof. (* Goal: forall _ : is_true (leq (S O) k), @eq bool (dvdn (expn m k) (expn n k)) (dvdn m n) *) move=> k_gt0; apply/idP/idP=> [dv_mn_k|]; last exact: dvdn_exp2r. (* Goal: is_true (dvdn m n) *) case: (posnP n) => [-> | n_gt0]; first by rewrite dvdn0. (* Goal: is_true (dvdn m n) *) have [n' def_n] := dvdnP (dvdn_gcdr m n); set d := gcdn m n in def_n. (* Goal: is_true (dvdn m n) *) have [m' def_m] := dvdnP (dvdn_gcdl m n); rewrite -/d in def_m. (* Goal: is_true (dvdn m n) *) have d_gt0: d > 0 by rewrite gcdn_gt0 n_gt0 orbT. (* Goal: is_true (dvdn m n) *) rewrite def_m def_n !expnMn dvdn_pmul2r ?expn_gt0 ?d_gt0 // in dv_mn_k. (* Goal: is_true (dvdn m n) *) have: coprime (m' ^ k) (n' ^ k). (* Goal: forall _ : is_true (coprime (expn m' k) (expn n' k)), is_true (dvdn m n) *) (* Goal: is_true (coprime (expn m' k) (expn n' k)) *) rewrite coprime_pexpl // coprime_pexpr // /coprime -(eqn_pmul2r d_gt0) mul1n. (* Goal: forall _ : is_true (coprime (expn m' k) (expn n' k)), is_true (dvdn m n) *) (* Goal: is_true (@eq_op nat_eqType (muln (gcdn m' n') d) d) *) by rewrite muln_gcdl -def_m -def_n. (* Goal: forall _ : is_true (coprime (expn m' k) (expn n' k)), is_true (dvdn m n) *) rewrite /coprime -gcdn_modr (eqnP dv_mn_k) gcdn0 -(exp1n k). (* Goal: forall _ : is_true (@eq_op nat_eqType (expn m' k) (expn (S O) k)), is_true (dvdn m n) *) by rewrite (inj_eq (expIn k_gt0)) def_m; move/eqP->; rewrite mul1n dvdn_gcdr. Qed. Section Chinese. Variables m1 m2 : nat. Hypothesis co_m12 : coprime m1 m2. Lemma chinese_remainder x y : (x == y %[mod m1 * m2]) = (x == y %[mod m1]) && (x == y %[mod m2]). Proof. (* Goal: @eq bool (@eq_op nat_eqType (modn x (muln m1 m2)) (modn y (muln m1 m2))) (andb (@eq_op nat_eqType (modn x m1) (modn y m1)) (@eq_op nat_eqType (modn x m2) (modn y m2))) *) wlog le_yx : x y / y <= x; last by rewrite !eqn_mod_dvd // Gauss_dvd. (* Goal: forall _ : forall (x y : nat) (_ : is_true (leq y x)), @eq bool (@eq_op nat_eqType (modn x (muln m1 m2)) (modn y (muln m1 m2))) (andb (@eq_op nat_eqType (modn x m1) (modn y m1)) (@eq_op nat_eqType (modn x m2) (modn y m2))), @eq bool (@eq_op nat_eqType (modn x (muln m1 m2)) (modn y (muln m1 m2))) (andb (@eq_op nat_eqType (modn x m1) (modn y m1)) (@eq_op nat_eqType (modn x m2) (modn y m2))) *) by case/orP: (leq_total y x); last rewrite !(eq_sym (x %% _)); auto. Qed. Definition chinese r1 r2 := r1 * m2 * (egcdn m2 m1).1 + r2 * m1 * (egcdn m1 m2).1. Lemma chinese_modl r1 r2 : chinese r1 r2 = r1 %[mod m1]. Proof. (* Goal: @eq nat (modn (chinese r1 r2) m1) (modn r1 m1) *) rewrite /chinese; case: (posnP m2) co_m12 => [-> /eqnP | m2_gt0 _]. (* Goal: @eq nat (modn (addn (muln (muln r1 m2) (@fst nat nat (egcdn m2 m1))) (muln (muln r2 m1) (@fst nat nat (egcdn m1 m2)))) m1) (modn r1 m1) *) (* Goal: forall _ : @eq nat (gcdn m1 O) (S O), @eq nat (modn (addn (muln (muln r1 O) (@fst nat nat (egcdn O m1))) (muln (muln r2 m1) (@fst nat nat (egcdn m1 O)))) m1) (modn r1 m1) *) by rewrite gcdn0 => ->; rewrite !modn1. (* Goal: @eq nat (modn (addn (muln (muln r1 m2) (@fst nat nat (egcdn m2 m1))) (muln (muln r2 m1) (@fst nat nat (egcdn m1 m2)))) m1) (modn r1 m1) *) case: egcdnP => // k2 k1 def_m1 _. (* Goal: @eq nat (modn (addn (muln (muln r1 m2) (@fst nat nat (@pair nat nat k2 k1))) (muln (muln r2 m1) (@fst nat nat (egcdn m1 m2)))) m1) (modn r1 m1) *) rewrite mulnAC -mulnA def_m1 gcdnC (eqnP co_m12) mulnDr mulnA muln1. (* Goal: @eq nat (modn (addn (addn (muln (muln r1 k1) m1) r1) (muln (muln r2 m1) (@fst nat nat (egcdn m1 m2)))) m1) (modn r1 m1) *) by rewrite addnAC (mulnAC _ m1) -mulnDl modnMDl. Qed. Lemma chinese_modr r1 r2 : chinese r1 r2 = r2 %[mod m2]. Proof. (* Goal: @eq nat (modn (chinese r1 r2) m2) (modn r2 m2) *) rewrite /chinese; case: (posnP m1) co_m12 => [-> /eqnP | m1_gt0 _]. (* Goal: @eq nat (modn (addn (muln (muln r1 m2) (@fst nat nat (egcdn m2 m1))) (muln (muln r2 m1) (@fst nat nat (egcdn m1 m2)))) m2) (modn r2 m2) *) (* Goal: forall _ : @eq nat (gcdn O m2) (S O), @eq nat (modn (addn (muln (muln r1 m2) (@fst nat nat (egcdn m2 O))) (muln (muln r2 O) (@fst nat nat (egcdn O m2)))) m2) (modn r2 m2) *) by rewrite gcd0n => ->; rewrite !modn1. (* Goal: @eq nat (modn (addn (muln (muln r1 m2) (@fst nat nat (egcdn m2 m1))) (muln (muln r2 m1) (@fst nat nat (egcdn m1 m2)))) m2) (modn r2 m2) *) case: (egcdnP m2) => // k1 k2 def_m2 _. (* Goal: @eq nat (modn (addn (muln (muln r1 m2) (@fst nat nat (egcdn m2 m1))) (muln (muln r2 m1) (@fst nat nat (@pair nat nat k1 k2)))) m2) (modn r2 m2) *) rewrite addnC mulnAC -mulnA def_m2 (eqnP co_m12) mulnDr mulnA muln1. (* Goal: @eq nat (modn (addn (addn (muln (muln r2 k2) m2) r2) (muln (muln r1 m2) (@fst nat nat (egcdn m2 m1)))) m2) (modn r2 m2) *) by rewrite addnAC (mulnAC _ m2) -mulnDl modnMDl. Qed. Lemma chinese_mod x : x = chinese (x %% m1) (x %% m2) %[mod m1 * m2]. Proof. (* Goal: @eq nat (modn x (muln m1 m2)) (modn (chinese (modn x m1) (modn x m2)) (muln m1 m2)) *) apply/eqP; rewrite chinese_remainder //. (* Goal: is_true (andb (@eq_op nat_eqType (modn x m1) (modn (chinese (modn x m1) (modn x m2)) m1)) (@eq_op nat_eqType (modn x m2) (modn (chinese (modn x m1) (modn x m2)) m2))) *) by rewrite chinese_modl chinese_modr !modn_mod !eqxx. Qed. End Chinese.
Require Import mathcomp.ssreflect.ssreflect. From mathcomp Require Import ssrfun ssrbool eqtype ssrnat seq div. From mathcomp Require Import fintype bigop finset prime fingroup ssralg finalg countalg. Set Implicit Arguments. Unset Strict Implicit. Unset Printing Implicit Defensive. Local Open Scope ring_scope. Section ZpDef. Variable p' : nat. Local Notation p := p'.+1. Implicit Types x y z : 'I_p. Definition inZp i := Ordinal (ltn_pmod i (ltn0Sn p')). Lemma modZp x : x %% p = x. Proof. (* Goal: @eq nat (modn (@nat_of_ord (S p') x) (S p')) (@nat_of_ord (S p') x) *) by rewrite modn_small ?ltn_ord. Qed. Lemma valZpK x : inZp x = x. Proof. (* Goal: @eq (ordinal (S p')) (inZp (@nat_of_ord (S p') x)) x *) by apply: val_inj; rewrite /= modZp. Qed. Definition Zp0 : 'I_p := ord0. Definition Zp1 := inZp 1. Definition Zp_opp x := inZp (p - x). Definition Zp_add x y := inZp (x + y). Definition Zp_mul x y := inZp (x * y). Definition Zp_inv x := if coprime p x then inZp (egcdn x p).1 else x. Lemma Zp_add0z : left_id Zp0 Zp_add. Proof. (* Goal: @left_id (ordinal (S p')) (ordinal (S p')) Zp0 Zp_add *) exact: valZpK. Qed. Lemma Zp_addNz : left_inverse Zp0 Zp_opp Zp_add. Proof. (* Goal: @left_inverse (ordinal (S p')) (ordinal (S p')) (ordinal (S p')) Zp0 Zp_opp Zp_add *) by move=> x; apply: val_inj; rewrite /= modnDml subnK ?modnn // ltnW. Qed. Lemma Zp_addA : associative Zp_add. Proof. (* Goal: @associative (ordinal (S p')) Zp_add *) by move=> x y z; apply: val_inj; rewrite /= modnDml modnDmr addnA. Qed. Lemma Zp_addC : commutative Zp_add. Proof. (* Goal: @commutative (ordinal (S p')) (ordinal (S p')) Zp_add *) by move=> x y; apply: val_inj; rewrite /= addnC. Qed. Definition Zp_zmodMixin := ZmodMixin Zp_addA Zp_addC Zp_add0z Zp_addNz. Canonical Zp_zmodType := Eval hnf in ZmodType 'I_p Zp_zmodMixin. Canonical Zp_finZmodType := Eval hnf in [finZmodType of 'I_p]. Canonical Zp_baseFinGroupType := Eval hnf in [baseFinGroupType of 'I_p for +%R]. Canonical Zp_finGroupType := Eval hnf in [finGroupType of 'I_p for +%R]. Lemma Zp_mul1z : left_id Zp1 Zp_mul. Proof. (* Goal: @left_id (ordinal (S p')) (ordinal (S p')) Zp1 Zp_mul *) by move=> x; apply: val_inj; rewrite /= modnMml mul1n modZp. Qed. Lemma Zp_mulC : commutative Zp_mul. Proof. (* Goal: @commutative (ordinal (S p')) (ordinal (S p')) Zp_mul *) by move=> x y; apply: val_inj; rewrite /= mulnC. Qed. Lemma Zp_mulz1 : right_id Zp1 Zp_mul. Proof. (* Goal: @right_id (ordinal (S p')) (ordinal (S p')) Zp1 Zp_mul *) by move=> x; rewrite Zp_mulC Zp_mul1z. Qed. Lemma Zp_mulA : associative Zp_mul. Proof. (* Goal: @associative (ordinal (S p')) Zp_mul *) by move=> x y z; apply: val_inj; rewrite /= modnMml modnMmr mulnA. Qed. Lemma Zp_mul_addr : right_distributive Zp_mul Zp_add. Proof. (* Goal: @right_distributive (ordinal (S p')) (ordinal (S p')) Zp_mul Zp_add *) by move=> x y z; apply: val_inj; rewrite /= modnMmr modnDm mulnDr. Qed. Lemma Zp_mul_addl : left_distributive Zp_mul Zp_add. Proof. (* Goal: @left_distributive (ordinal (S p')) (ordinal (S p')) Zp_mul Zp_add *) by move=> x y z; rewrite -!(Zp_mulC z) Zp_mul_addr. Qed. Lemma Zp_mulVz x : coprime p x -> Zp_mul (Zp_inv x) x = Zp1. Proof. (* Goal: forall _ : is_true (coprime (S p') (@nat_of_ord (S p') x)), @eq (ordinal (S p')) (Zp_mul (Zp_inv x) x) Zp1 *) move=> co_p_x; apply: val_inj; rewrite /Zp_inv co_p_x /= modnMml. (* Goal: @eq nat (modn (muln (@fst nat nat (egcdn (@nat_of_ord (S p') x) (S p'))) (@nat_of_ord (S p') x)) (S p')) (modn (S O) (S p')) *) by rewrite -(chinese_modl co_p_x 1 0) /chinese addn0 mul1n mulnC. Qed. Lemma Zp_mulzV x : coprime p x -> Zp_mul x (Zp_inv x) = Zp1. Proof. (* Goal: forall _ : is_true (coprime (S p') (@nat_of_ord (S p') x)), @eq (ordinal (S p')) (Zp_mul x (Zp_inv x)) Zp1 *) by move=> Ux; rewrite /= Zp_mulC Zp_mulVz. Qed. Lemma Zp_intro_unit x y : Zp_mul y x = Zp1 -> coprime p x. Proof. (* Goal: forall _ : @eq (ordinal (S p')) (Zp_mul y x) Zp1, is_true (coprime (S p') (@nat_of_ord (S p') x)) *) case=> yx1; have:= coprimen1 p. (* Goal: forall _ : is_true (coprime (S p') (S O)), is_true (coprime (S p') (@nat_of_ord (S p') x)) *) by rewrite -coprime_modr -yx1 coprime_modr coprime_mulr; case/andP. Qed. Lemma Zp_inv_out x : ~~ coprime p x -> Zp_inv x = x. Proof. (* Goal: forall _ : is_true (negb (coprime (S p') (@nat_of_ord (S p') x))), @eq (ordinal (S p')) (Zp_inv x) x *) by rewrite /Zp_inv => /negPf->. Qed. Lemma Zp_mulrn x n : x *+ n = inZp (x * n). Proof. (* Goal: @eq (GRing.Zmodule.sort Zp_zmodType) (@GRing.natmul Zp_zmodType x n) (inZp (muln (@nat_of_ord (S p') x) n)) *) apply: val_inj => /=; elim: n => [|n IHn]; first by rewrite muln0 modn_small. (* Goal: @eq nat (@nat_of_ord (S p') (@GRing.natmul Zp_zmodType x (S n))) (modn (muln (@nat_of_ord (S p') x) (S n)) (S p')) *) by rewrite !GRing.mulrS /= IHn modnDmr mulnS. Qed. Import GroupScope. Lemma Zp_mulgC : @commutative 'I_p _ mulg. Proof. (* Goal: @commutative (ordinal (S p')) (FinGroup.sort Zp_baseFinGroupType) (@mulg Zp_baseFinGroupType) *) exact: Zp_addC. Qed. Lemma Zp_abelian : abelian [set: 'I_p]. Proof. (* Goal: is_true (@abelian Zp_finGroupType (@setTfor (ordinal_finType (S p')) (Phant (ordinal (S p'))))) *) exact: FinRing.zmod_abelian. Qed. Lemma Zp_expg x n : x ^+ n = inZp (x * n). Proof. (* Goal: @eq (FinGroup.sort Zp_baseFinGroupType) (@expgn Zp_baseFinGroupType x n) (inZp (muln (@nat_of_ord (S p') x) n)) *) exact: Zp_mulrn. Qed. Lemma Zp1_expgz x : Zp1 ^+ x = x. Proof. (* Goal: @eq (FinGroup.sort Zp_baseFinGroupType) (@expgn Zp_baseFinGroupType Zp1 (@nat_of_ord (S p') x)) x *) by rewrite Zp_expg; apply: Zp_mul1z. Qed. Lemma Zp_cycle : setT = <[Zp1]>. Proof. (* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base Zp_finGroupType)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base Zp_finGroupType))))) (@setTfor (FinGroup.arg_finType (FinGroup.base Zp_finGroupType)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base Zp_finGroupType))))) (@cycle Zp_finGroupType Zp1) *) by apply/setP=> x; rewrite -[x]Zp1_expgz inE groupX ?mem_gen ?set11. Qed. Lemma order_Zp1 : #[Zp1] = p. Proof. (* Goal: @eq nat (@order Zp_finGroupType Zp1) (S p') *) by rewrite orderE -Zp_cycle cardsT card_ord. Qed. End ZpDef. Arguments Zp0 {p'}. Arguments Zp1 {p'}. Arguments inZp {p'} i. Arguments valZpK {p'} x. Lemma ord1 : all_equal_to (0 : 'I_1). Proof. (* Goal: @all_equal_to (ordinal (S O)) (GRing.zero (Zp_zmodType O) : ordinal (S O)) *) by case=> [[] // ?]; apply: val_inj. Qed. Lemma lshift0 m n : lshift m (0 : 'I_n.+1) = (0 : 'I_(n + m).+1). Proof. (* Goal: @eq (ordinal (addn (S n) m)) (@lshift (S n) m (GRing.zero (Zp_zmodType n) : ordinal (S n))) (GRing.zero (Zp_zmodType (addn n m)) : ordinal (S (addn n m))) *) exact: val_inj. Qed. Lemma rshift1 n : @rshift 1 n =1 lift (0 : 'I_n.+1). Proof. (* Goal: @eqfun (ordinal (addn (S O) n)) (ordinal n) (@rshift (S O) n) (@lift (S n) (GRing.zero (Zp_zmodType n) : ordinal (S n))) *) by move=> i; apply: val_inj. Qed. Lemma split1 n i : split (i : 'I_(1 + n)) = oapp (@inr _ _) (inl _ 0) (unlift 0 i). Proof. (* Goal: @eq (sum (ordinal (S O)) (ordinal n)) (@split (S O) n (i : ordinal (addn (S O) n))) (@Option.apply (ordinal (Nat.pred (S n))) (sum (GRing.Zmodule.sort (Zp_zmodType O)) (ordinal (Nat.pred (S n)))) (@inr (GRing.Zmodule.sort (Zp_zmodType O)) (ordinal (Nat.pred (S n)))) (@inl (GRing.Zmodule.sort (Zp_zmodType O)) (ordinal (Nat.pred (S n))) (GRing.zero (Zp_zmodType O))) (@unlift (S n) (GRing.zero (Zp_zmodType n)) i)) *) case: unliftP => [i'|] -> /=. (* Goal: @eq (sum (ordinal (S O)) (ordinal n)) (@split (S O) n (GRing.zero (Zp_zmodType n))) (@inl (ordinal (S O)) (ordinal n) (GRing.zero (Zp_zmodType O))) *) (* Goal: @eq (sum (ordinal (S O)) (ordinal n)) (@split (S O) n (@lift (S n) (GRing.zero (Zp_zmodType n)) i')) (@inr (ordinal (S O)) (ordinal n) i') *) by rewrite -rshift1 (unsplitK (inr _ _)). (* Goal: @eq (sum (ordinal (S O)) (ordinal n)) (@split (S O) n (GRing.zero (Zp_zmodType n))) (@inl (ordinal (S O)) (ordinal n) (GRing.zero (Zp_zmodType O))) *) by rewrite -(lshift0 n 0) (unsplitK (inl _ _)). Qed. Lemma big_ord1 R idx (op : @Monoid.law R idx) F : Proof. (* Goal: @eq R (@BigOp.bigop R (Finite.sort (ordinal_finType (S O))) idx (index_enum (ordinal_finType (S O))) (fun i : ordinal (S O) => @BigBody R (ordinal (S O)) i (@Monoid.operator R idx op) true (F i))) (F (GRing.zero (Zp_zmodType O))) *) by rewrite big_ord_recl big_ord0 Monoid.mulm1. Qed. Lemma big_ord1_cond R idx (op : @Monoid.law R idx) P F : Proof. (* Goal: @eq R (@BigOp.bigop R (Finite.sort (ordinal_finType (S O))) idx (index_enum (ordinal_finType (S O))) (fun i : ordinal (S O) => @BigBody R (ordinal (S O)) i (@Monoid.operator R idx op) (P i) (F i))) (if P (GRing.zero (Zp_zmodType O)) then F (GRing.zero (Zp_zmodType O)) else idx) *) by rewrite big_mkcond big_ord1. Qed. Definition Zp_ringMixin := ComRingMixin (@Zp_mulA _) (@Zp_mulC _) (@Zp_mul1z _) (@Zp_mul_addl _) Zp_nontrivial. Canonical Zp_ringType := Eval hnf in RingType 'I_p Zp_ringMixin. Canonical Zp_finRingType := Eval hnf in [finRingType of 'I_p]. Canonical Zp_comRingType := Eval hnf in ComRingType 'I_p (@Zp_mulC _). Canonical Zp_finComRingType := Eval hnf in [finComRingType of 'I_p]. Definition Zp_unitRingMixin := ComUnitRingMixin (@Zp_mulVz _) (@Zp_intro_unit _) (@Zp_inv_out _). Canonical Zp_unitRingType := Eval hnf in UnitRingType 'I_p Zp_unitRingMixin. Canonical Zp_finUnitRingType := Eval hnf in [finUnitRingType of 'I_p]. Canonical Zp_comUnitRingType := Eval hnf in [comUnitRingType of 'I_p]. Canonical Zp_finComUnitRingType := Eval hnf in [finComUnitRingType of 'I_p]. Lemma Zp_nat n : n%:R = inZp n :> 'I_p. Proof. (* Goal: @eq (ordinal (S (S p'))) (@GRing.natmul (GRing.Ring.zmodType Zp_ringType) (GRing.one Zp_ringType) n) (@inZp (S p') n) *) by apply: val_inj; rewrite [n%:R]Zp_mulrn /= modnMml mul1n. Qed. Lemma natr_Zp (x : 'I_p) : x%:R = x. Proof. (* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType Zp_ringType)) (@GRing.natmul (GRing.Ring.zmodType Zp_ringType) (GRing.one Zp_ringType) (@nat_of_ord (S (S p')) x)) x *) by rewrite Zp_nat valZpK. Qed. Lemma natr_negZp (x : 'I_p) : (- x)%:R = - x. Proof. (* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType Zp_ringType)) (@GRing.natmul (GRing.Ring.zmodType Zp_ringType) (GRing.one Zp_ringType) (@nat_of_ord (S (S p')) (@GRing.opp (Zp_zmodType (S p')) x))) (@GRing.opp (Zp_zmodType (S p')) x) *) by apply: val_inj; rewrite /= Zp_nat /= modn_mod. Qed. Import GroupScope. Lemma unit_Zp_mulgC : @commutative {unit 'I_p} _ mulg. Proof. (* Goal: @commutative (@FinRing.unit_of Zp_finUnitRingType (Phant (ordinal (S (S p'))))) (FinGroup.sort (FinRing.unit_baseFinGroupType Zp_finUnitRingType)) (@mulg (FinRing.unit_baseFinGroupType Zp_finUnitRingType)) *) by move=> u v; apply: val_inj; rewrite /= GRing.mulrC. Qed. Lemma unit_Zp_expg (u : {unit 'I_p}) n : val (u ^+ n) = inZp (val u ^ n) :> 'I_p. Proof. (* Goal: @eq (ordinal (S (S p'))) (@val (FinRing.UnitRing.sort Zp_finUnitRingType) (fun x : FinRing.UnitRing.sort Zp_finUnitRingType => @in_mem (FinRing.UnitRing.sort Zp_finUnitRingType) x (@mem (GRing.UnitRing.sort (FinRing.UnitRing.unitRingType Zp_finUnitRingType)) (predPredType (GRing.UnitRing.sort (FinRing.UnitRing.unitRingType Zp_finUnitRingType))) (@has_quality (S O) (GRing.UnitRing.sort (FinRing.UnitRing.unitRingType Zp_finUnitRingType)) (@GRing.unit (FinRing.UnitRing.unitRingType Zp_finUnitRingType))))) (FinRing.unit_subType Zp_finUnitRingType) (@expgn (FinRing.unit_baseFinGroupType Zp_finUnitRingType) u n)) (@inZp (S p') (expn (@nat_of_ord (S (S p')) (@val (FinRing.UnitRing.sort Zp_finUnitRingType) (fun x : FinRing.UnitRing.sort Zp_finUnitRingType => @in_mem (FinRing.UnitRing.sort Zp_finUnitRingType) x (@mem (GRing.UnitRing.sort (FinRing.UnitRing.unitRingType Zp_finUnitRingType)) (predPredType (GRing.UnitRing.sort (FinRing.UnitRing.unitRingType Zp_finUnitRingType))) (@has_quality (S O) (GRing.UnitRing.sort (FinRing.UnitRing.unitRingType Zp_finUnitRingType)) (@GRing.unit (FinRing.UnitRing.unitRingType Zp_finUnitRingType))))) (FinRing.unit_subType Zp_finUnitRingType) u)) n)) *) apply: val_inj => /=; elim: n => [|n IHn] //. (* Goal: @eq nat (@nat_of_ord (S (S p')) (@FinRing.uval Zp_finUnitRingType (@expgn (FinRing.unit_baseFinGroupType Zp_finUnitRingType) u (S n)))) (modn (expn (@nat_of_ord (S (S p')) (@FinRing.uval Zp_finUnitRingType u)) (S n)) (S (S p'))) *) by rewrite expgS /= IHn expnS modnMmr. Qed. End ZpRing. Definition Zp_trunc p := p.-2. Notation "''Z_' p" := 'I_(Zp_trunc p).+2 (at level 8, p at level 2, format "''Z_' p") : type_scope. Notation "''F_' p" := 'Z_(pdiv p) (at level 8, p at level 2, format "''F_' p") : type_scope. Arguments natr_Zp {p'} x. Section Groups. Variable p : nat. Definition Zp := if p > 1 then [set: 'Z_p] else 1%g. Definition units_Zp := [set: {unit 'Z_p}]. Lemma Zp_cast : p > 1 -> (Zp_trunc p).+2 = p. Proof. (* Goal: forall _ : is_true (leq (S (S O)) p), @eq nat (S (S (Zp_trunc p))) p *) by case: p => [|[]]. Qed. Lemma val_Zp_nat (p_gt1 : p > 1) n : (n%:R : 'Z_p) = (n %% p)%N :> nat. Proof. (* Goal: @eq nat (@nat_of_ord (S (S (Zp_trunc p))) (@GRing.natmul (GRing.Ring.zmodType (Zp_ringType (Zp_trunc p))) (GRing.one (Zp_ringType (Zp_trunc p))) n : ordinal (S (S (Zp_trunc p))))) (modn n p) *) by rewrite Zp_nat /= Zp_cast. Qed. Lemma Zp_nat_mod (p_gt1 : p > 1)m : (m %% p)%:R = m%:R :> 'Z_p. Proof. (* Goal: @eq (ordinal (S (S (Zp_trunc p)))) (@GRing.natmul (GRing.Ring.zmodType (Zp_ringType (Zp_trunc p))) (GRing.one (Zp_ringType (Zp_trunc p))) (modn m p)) (@GRing.natmul (GRing.Ring.zmodType (Zp_ringType (Zp_trunc p))) (GRing.one (Zp_ringType (Zp_trunc p))) m) *) by apply: ord_inj; rewrite !val_Zp_nat // modn_mod. Qed. Lemma char_Zp : p > 1 -> p%:R = 0 :> 'Z_p. Proof. (* Goal: forall _ : is_true (leq (S (S O)) p), @eq (ordinal (S (S (Zp_trunc p)))) (@GRing.natmul (GRing.Ring.zmodType (Zp_ringType (Zp_trunc p))) (GRing.one (Zp_ringType (Zp_trunc p))) p) (GRing.zero (Zp_zmodType (S (Zp_trunc p)))) *) by move=> p_gt1; rewrite -Zp_nat_mod ?modnn. Qed. Lemma unitZpE x : p > 1 -> ((x%:R : 'Z_p) \is a GRing.unit) = coprime p x. Proof. (* Goal: forall _ : is_true (leq (S (S O)) p), @eq bool (@in_mem (ordinal (S (S (Zp_trunc p)))) (@GRing.natmul (GRing.Ring.zmodType (Zp_ringType (Zp_trunc p))) (GRing.one (Zp_ringType (Zp_trunc p))) x : ordinal (S (S (Zp_trunc p)))) (@mem (GRing.UnitRing.sort (Zp_unitRingType (Zp_trunc p))) (predPredType (GRing.UnitRing.sort (Zp_unitRingType (Zp_trunc p)))) (@has_quality (S O) (GRing.UnitRing.sort (Zp_unitRingType (Zp_trunc p))) (@GRing.unit (Zp_unitRingType (Zp_trunc p)))))) (coprime p x) *) by move=> p_gt1; rewrite qualifE /= val_Zp_nat ?Zp_cast ?coprime_modr. Qed. Lemma Zp_group_set : group_set Zp. Proof. (* Goal: is_true (@group_set (Zp_finGroupType (S (Zp_trunc p))) Zp) *) by rewrite /Zp; case: (p > 1); apply: groupP. Qed. Canonical Zp_group := Group Zp_group_set. Lemma card_Zp : p > 0 -> #|Zp| = p. Proof. (* Goal: forall _ : is_true (leq (S O) p), @eq nat (@card (ordinal_finType (S (S (Zp_trunc p)))) (@mem (Finite.sort (ordinal_finType (S (S (Zp_trunc p))))) (predPredType (Finite.sort (ordinal_finType (S (S (Zp_trunc p)))))) (@SetDef.pred_of_set (ordinal_finType (S (S (Zp_trunc p)))) Zp))) p *) rewrite /Zp; case: p => [|[|p']] //= _; first by rewrite cards1. (* Goal: @eq nat (@card (ordinal_finType (S (S (Zp_trunc (S (S p')))))) (@mem (ordinal (S (S (Zp_trunc (S (S p')))))) (predPredType (ordinal (S (S (Zp_trunc (S (S p'))))))) (@SetDef.pred_of_set (ordinal_finType (S (S (Zp_trunc (S (S p')))))) (@setTfor (ordinal_finType (S (S (Zp_trunc (S (S p')))))) (Phant (ordinal (S (S (Zp_trunc (S (S p'))))))))))) (S (S p')) *) by rewrite cardsT card_ord. Qed. Canonical units_Zp_group := [group of units_Zp]. Lemma card_units_Zp : p > 0 -> #|units_Zp| = totient p. Proof. (* Goal: forall _ : is_true (leq (S O) p), @eq nat (@card (FinRing.unit_finType (Zp_finUnitRingType (Zp_trunc p))) (@mem (Finite.sort (FinRing.unit_finType (Zp_finUnitRingType (Zp_trunc p)))) (predPredType (Finite.sort (FinRing.unit_finType (Zp_finUnitRingType (Zp_trunc p))))) (@SetDef.pred_of_set (FinRing.unit_finType (Zp_finUnitRingType (Zp_trunc p))) units_Zp))) (totient p) *) move=> p_gt0; transitivity (totient p.-2.+2); last by case: p p_gt0 => [|[|p']]. (* Goal: @eq nat (@card (FinRing.unit_finType (Zp_finUnitRingType (Zp_trunc p))) (@mem (Finite.sort (FinRing.unit_finType (Zp_finUnitRingType (Zp_trunc p)))) (predPredType (Finite.sort (FinRing.unit_finType (Zp_finUnitRingType (Zp_trunc p))))) (@SetDef.pred_of_set (FinRing.unit_finType (Zp_finUnitRingType (Zp_trunc p))) units_Zp))) (totient (S (S (Nat.pred (Nat.pred p))))) *) rewrite cardsT card_sub -sum1_card big_mkcond /=. (* Goal: @eq nat (@BigOp.bigop nat (ordinal (S (S (Zp_trunc p)))) O (index_enum (FinRing.UnitRing.finType (Zp_finUnitRingType (Zp_trunc p)))) (fun i : ordinal (S (S (Zp_trunc p))) => @BigBody nat (ordinal (S (S (Zp_trunc p)))) i addn true (if @in_mem (ordinal (S (S (Zp_trunc p)))) i (@mem (ordinal (S (S (Zp_trunc p)))) (predPredType (ordinal (S (S (Zp_trunc p))))) (@pred_of_simpl (ordinal (S (S (Zp_trunc p)))) (@SimplPred (ordinal (S (S (Zp_trunc p)))) (fun x : ordinal (S (S (Zp_trunc p))) => @in_mem (ordinal (S (S (Zp_trunc p)))) x (@mem (ordinal (S (S (Zp_trunc p)))) (predPredType (ordinal (S (S (Zp_trunc p))))) (@has_quality (S O) (ordinal (S (S (Zp_trunc p)))) (@GRing.unit (FinRing.UnitRing.unitRingType (Zp_finUnitRingType (Zp_trunc p)))))))))) then S O else O))) (totient (S (S (Nat.pred (Nat.pred p))))) *) by rewrite totient_count_coprime big_mkord. Qed. Lemma units_Zp_abelian : abelian units_Zp. Proof. (* Goal: is_true (@abelian (FinRing.unit_finGroupType (Zp_finUnitRingType (Zp_trunc p))) units_Zp) *) by apply/centsP=> u _ v _; apply: unit_Zp_mulgC. Qed. End Groups. Section PrimeField. Open Scope ring_scope. Variable p : nat. Section F_prime. Hypothesis p_pr : prime p. Lemma Fp_Zcast : (Zp_trunc (pdiv p)).+2 = (Zp_trunc p).+2. Proof. (* Goal: @eq nat (S (S (Zp_trunc (pdiv p)))) (S (S (Zp_trunc p))) *) by rewrite /pdiv primes_prime. Qed. Lemma Fp_cast : (Zp_trunc (pdiv p)).+2 = p. Proof. (* Goal: @eq nat (S (S (Zp_trunc (pdiv p)))) p *) by rewrite Fp_Zcast ?Zp_cast ?prime_gt1. Qed. Lemma card_Fp : #|'F_p| = p. Proof. (* Goal: @eq nat (@card (ordinal_finType (S (S (Zp_trunc (pdiv p))))) (@mem (ordinal (S (S (Zp_trunc (pdiv p))))) (predPredType (ordinal (S (S (Zp_trunc (pdiv p)))))) (@sort_of_simpl_pred (ordinal (S (S (Zp_trunc (pdiv p))))) (pred_of_argType (ordinal (S (S (Zp_trunc (pdiv p))))))))) p *) by rewrite card_ord Fp_cast. Qed. Lemma val_Fp_nat n : (n%:R : 'F_p) = (n %% p)%N :> nat. Proof. (* Goal: @eq nat (@nat_of_ord (S (S (Zp_trunc (pdiv p)))) (@GRing.natmul (GRing.Ring.zmodType (Zp_ringType (Zp_trunc (pdiv p)))) (GRing.one (Zp_ringType (Zp_trunc (pdiv p)))) n : ordinal (S (S (Zp_trunc (pdiv p)))))) (modn n p) *) by rewrite Zp_nat /= Fp_cast. Qed. Lemma Fp_nat_mod m : (m %% p)%:R = m%:R :> 'F_p. Proof. (* Goal: @eq (ordinal (S (S (Zp_trunc (pdiv p))))) (@GRing.natmul (GRing.Ring.zmodType (Zp_ringType (Zp_trunc (pdiv p)))) (GRing.one (Zp_ringType (Zp_trunc (pdiv p)))) (modn m p)) (@GRing.natmul (GRing.Ring.zmodType (Zp_ringType (Zp_trunc (pdiv p)))) (GRing.one (Zp_ringType (Zp_trunc (pdiv p)))) m) *) by apply: ord_inj; rewrite !val_Fp_nat // modn_mod. Qed. Lemma char_Fp : p \in [char 'F_p]. Proof. (* Goal: is_true (@in_mem nat p (@mem nat nat_pred_pred (@GRing.char (Zp_ringType (Zp_trunc (pdiv p))) (Phant (ordinal (S (S (Zp_trunc (pdiv p))))))))) *) by rewrite !inE -Fp_nat_mod p_pr ?modnn. Qed. Lemma char_Fp_0 : p%:R = 0 :> 'F_p. Proof. (* Goal: @eq (ordinal (S (S (Zp_trunc (pdiv p))))) (@GRing.natmul (GRing.Ring.zmodType (Zp_ringType (Zp_trunc (pdiv p)))) (GRing.one (Zp_ringType (Zp_trunc (pdiv p)))) p) (GRing.zero (Zp_zmodType (S (Zp_trunc (pdiv p))))) *) exact: GRing.charf0 char_Fp. Qed. Lemma unitFpE x : ((x%:R : 'F_p) \is a GRing.unit) = coprime p x. Proof. (* Goal: @eq bool (@in_mem (ordinal (S (S (Zp_trunc (pdiv p))))) (@GRing.natmul (GRing.Ring.zmodType (Zp_ringType (Zp_trunc (pdiv p)))) (GRing.one (Zp_ringType (Zp_trunc (pdiv p)))) x : ordinal (S (S (Zp_trunc (pdiv p))))) (@mem (GRing.UnitRing.sort (Zp_unitRingType (Zp_trunc (pdiv p)))) (predPredType (GRing.UnitRing.sort (Zp_unitRingType (Zp_trunc (pdiv p))))) (@has_quality (S O) (GRing.UnitRing.sort (Zp_unitRingType (Zp_trunc (pdiv p)))) (@GRing.unit (Zp_unitRingType (Zp_trunc (pdiv p))))))) (coprime p x) *) by rewrite pdiv_id // unitZpE // prime_gt1. Qed. End F_prime. Lemma Fp_fieldMixin : GRing.Field.mixin_of [the unitRingType of 'F_p]. Proof. (* Goal: GRing.Field.mixin_of (@TheCanonical.get predArgType GRing.UnitRing.type (ordinal (S (S (Zp_trunc (pdiv p))))) (Zp_unitRingType (Zp_trunc (pdiv p))) ((fun s : GRing.UnitRing.type => @TheCanonical.Put predArgType GRing.UnitRing.type (ordinal (S (S (Zp_trunc (pdiv p))))) (Equality.sort (GRing.UnitRing.eqType s)) s) (Zp_unitRingType (Zp_trunc (pdiv p))))) *) move=> x nzx; rewrite qualifE /= prime_coprime ?gtnNdvd ?lt0n //. (* Goal: is_true (prime (S (S (Zp_trunc (pdiv p))))) *) case: (ltnP 1 p) => [lt1p | ]; last by case: p => [|[|p']]. (* Goal: is_true (prime (S (S (Zp_trunc (pdiv p))))) *) by rewrite Zp_cast ?prime_gt1 ?pdiv_prime. Qed. Definition Fp_idomainMixin := FieldIdomainMixin Fp_fieldMixin. Canonical Fp_idomainType := Eval hnf in IdomainType 'F_p Fp_idomainMixin. Canonical Fp_finIdomainType := Eval hnf in [finIdomainType of 'F_p]. Canonical Fp_fieldType := Eval hnf in FieldType 'F_p Fp_fieldMixin. Canonical Fp_finFieldType := Eval hnf in [finFieldType of 'F_p]. Canonical Fp_decFieldType := Eval hnf in [decFieldType of 'F_p for Fp_finFieldType]. End PrimeField. Canonical Zp_countZmodType m := [countZmodType of 'I_m.+1]. Canonical Zp_countRingType m := [countRingType of 'I_m.+2]. Canonical Zp_countComRingType m := [countComRingType of 'I_m.+2]. Canonical Zp_countUnitRingType m := [countUnitRingType of 'I_m.+2]. Canonical Zp_countComUnitRingType m := [countComUnitRingType of 'I_m.+2]. Canonical Fp_countIdomainType p := [countIdomainType of 'F_p]. Canonical Fp_countFieldType p := [countFieldType of 'F_p]. Canonical Fp_countDecFieldType p := [countDecFieldType of 'F_p].
Require Export GeoCoq.Meta_theory.Decidability.equivalence_between_decidability_properties_of_basic_relations. Section T5. Context `{TnEQD:Tarski_neutral_dimensionless_with_decidable_point_equality}. Lemma l5_1 : forall A B C D, A<>B -> Bet A B C -> Bet A B D -> Bet A C D \/ Bet A D C. Proof. (* Goal: forall (A B C D : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) A B)) (_ : @Bet Tn A B C) (_ : @Bet Tn A B D), or (@Bet Tn A C D) (@Bet Tn A D C) *) apply eq_dec_implies_l5_1; apply eq_dec_points. Qed. Lemma l5_2 : forall A B C D, A<>B -> Bet A B C -> Bet A B D -> Bet B C D \/ Bet B D C. Proof. (* Goal: forall (A B C D : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) A B)) (_ : @Bet Tn A B C) (_ : @Bet Tn A B D), or (@Bet Tn B C D) (@Bet Tn B D C) *) apply eq_dec_implies_l5_2; apply eq_dec_points. Qed. Lemma segment_construction_2 : forall A Q B C, A<>Q -> exists X, (Bet Q A X \/ Bet Q X A) /\ Cong Q X B C. Proof. (* Goal: forall (A Q B C : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) A Q)), @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (or (@Bet Tn Q A X) (@Bet Tn Q X A)) (@Cong Tn Q X B C)) *) apply eq_dec_implies_segment_construction_2; apply eq_dec_points. Qed. Lemma l5_3 : forall A B C D, Bet A B D -> Bet A C D -> Bet A B C \/ Bet A C B. Proof. (* Goal: forall (A B C D : @Tpoint Tn) (_ : @Bet Tn A B D) (_ : @Bet Tn A C D), or (@Bet Tn A B C) (@Bet Tn A C B) *) intros. (* Goal: or (@Bet Tn A B C) (@Bet Tn A C B) *) assert (exists P, Bet D A P /\ A<>P) by (apply point_construction_different). (* Goal: or (@Bet Tn A B C) (@Bet Tn A C B) *) ex_and H1 P. (* Goal: or (@Bet Tn A B C) (@Bet Tn A C B) *) assert (Bet P A B) by eBetween. (* Goal: or (@Bet Tn A B C) (@Bet Tn A C B) *) assert (Bet P A C) by eBetween. (* Goal: or (@Bet Tn A B C) (@Bet Tn A C B) *) apply (l5_2 P);auto. Qed. Lemma bet3__bet : forall A B C D E, Bet A B E -> Bet A D E -> Bet B C D -> Bet A C E. Proof. (* Goal: forall (A B C D E : @Tpoint Tn) (_ : @Bet Tn A B E) (_ : @Bet Tn A D E) (_ : @Bet Tn B C D), @Bet Tn A C E *) intros. (* Goal: @Bet Tn A C E *) destruct (l5_3 A B D E H H0). (* Goal: @Bet Tn A C E *) (* Goal: @Bet Tn A C E *) apply between_exchange4 with D; trivial. (* Goal: @Bet Tn A C E *) (* Goal: @Bet Tn A C D *) apply between_exchange2 with B; assumption. (* Goal: @Bet Tn A C E *) apply between_exchange4 with B; trivial. (* Goal: @Bet Tn A C B *) apply between_exchange2 with D; Between. Qed. Lemma le_bet : forall A B C D, Le C D A B -> exists X, Bet A X B /\ Cong A X C D. Proof. (* Goal: forall (A B C D : @Tpoint Tn) (_ : @Le Tn C D A B), @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Bet Tn A X B) (@Cong Tn A X C D)) *) intros. (* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Bet Tn A X B) (@Cong Tn A X C D)) *) unfold Le in H. (* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Bet Tn A X B) (@Cong Tn A X C D)) *) ex_and H Y. (* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Bet Tn A X B) (@Cong Tn A X C D)) *) exists Y;split;Cong. Qed. Lemma l5_5_1 : forall A B C D, Le A B C D -> exists x, Bet A B x /\ Cong A x C D. Proof. (* Goal: forall (A B C D : @Tpoint Tn) (_ : @Le Tn A B C D), @ex (@Tpoint Tn) (fun x : @Tpoint Tn => and (@Bet Tn A B x) (@Cong Tn A x C D)) *) unfold Le. (* Goal: forall (A B C D : @Tpoint Tn) (_ : @ex (@Tpoint Tn) (fun E : @Tpoint Tn => and (@Bet Tn C E D) (@Cong Tn A B C E))), @ex (@Tpoint Tn) (fun x : @Tpoint Tn => and (@Bet Tn A B x) (@Cong Tn A x C D)) *) intros. (* Goal: @ex (@Tpoint Tn) (fun x : @Tpoint Tn => and (@Bet Tn A B x) (@Cong Tn A x C D)) *) ex_and H P. (* Goal: @ex (@Tpoint Tn) (fun x : @Tpoint Tn => and (@Bet Tn A B x) (@Cong Tn A x C D)) *) prolong A B x P D. (* Goal: @ex (@Tpoint Tn) (fun x : @Tpoint Tn => and (@Bet Tn A B x) (@Cong Tn A x C D)) *) exists x. (* Goal: and (@Bet Tn A B x) (@Cong Tn A x C D) *) split. (* Goal: @Cong Tn A x C D *) (* Goal: @Bet Tn A B x *) assumption. (* Goal: @Cong Tn A x C D *) eapply l2_11;eauto. Qed. Lemma l5_5_2 : forall A B C D, (exists x, Bet A B x /\ Cong A x C D) -> Le A B C D. Proof. (* Goal: forall (A B C D : @Tpoint Tn) (_ : @ex (@Tpoint Tn) (fun x : @Tpoint Tn => and (@Bet Tn A B x) (@Cong Tn A x C D))), @Le Tn A B C D *) intros. (* Goal: @Le Tn A B C D *) ex_and H P. (* Goal: @Le Tn A B C D *) unfold Le. (* Goal: @ex (@Tpoint Tn) (fun E : @Tpoint Tn => and (@Bet Tn C E D) (@Cong Tn A B C E)) *) assert (exists B' : Tpoint, Bet C B' D /\ Cong_3 A B P C B' D) by (eapply l4_5;auto). (* Goal: @ex (@Tpoint Tn) (fun E : @Tpoint Tn => and (@Bet Tn C E D) (@Cong Tn A B C E)) *) ex_and H1 y. (* Goal: @ex (@Tpoint Tn) (fun E : @Tpoint Tn => and (@Bet Tn C E D) (@Cong Tn A B C E)) *) exists y. (* Goal: and (@Bet Tn C y D) (@Cong Tn A B C y) *) unfold Cong_3 in *;intuition. Qed. Lemma l5_6 : forall A B C D A' B' C' D', Le A B C D -> Cong A B A' B' -> Cong C D C' D' -> Le A' B' C' D'. Proof. (* Goal: forall (A B C D A' B' C' D' : @Tpoint Tn) (_ : @Le Tn A B C D) (_ : @Cong Tn A B A' B') (_ : @Cong Tn C D C' D'), @Le Tn A' B' C' D' *) unfold Le. (* Goal: forall (A B C D A' B' C' D' : @Tpoint Tn) (_ : @ex (@Tpoint Tn) (fun E : @Tpoint Tn => and (@Bet Tn C E D) (@Cong Tn A B C E))) (_ : @Cong Tn A B A' B') (_ : @Cong Tn C D C' D'), @ex (@Tpoint Tn) (fun E : @Tpoint Tn => and (@Bet Tn C' E D') (@Cong Tn A' B' C' E)) *) intros. (* Goal: @ex (@Tpoint Tn) (fun E : @Tpoint Tn => and (@Bet Tn C' E D') (@Cong Tn A' B' C' E)) *) spliter. (* Goal: @ex (@Tpoint Tn) (fun E : @Tpoint Tn => and (@Bet Tn C' E D') (@Cong Tn A' B' C' E)) *) ex_and H y. (* Goal: @ex (@Tpoint Tn) (fun E : @Tpoint Tn => and (@Bet Tn C' E D') (@Cong Tn A' B' C' E)) *) assert (exists z : Tpoint, Bet C' z D' /\ Cong_3 C y D C' z D') by (eapply l4_5;auto). (* Goal: @ex (@Tpoint Tn) (fun E : @Tpoint Tn => and (@Bet Tn C' E D') (@Cong Tn A' B' C' E)) *) ex_and H3 z. (* Goal: @ex (@Tpoint Tn) (fun E : @Tpoint Tn => and (@Bet Tn C' E D') (@Cong Tn A' B' C' E)) *) exists z. (* Goal: and (@Bet Tn C' z D') (@Cong Tn A' B' C' z) *) split. (* Goal: @Cong Tn A' B' C' z *) (* Goal: @Bet Tn C' z D' *) assumption. (* Goal: @Cong Tn A' B' C' z *) unfold Cong_3 in *; spliter. (* Goal: @Cong Tn A' B' C' z *) apply cong_transitivity with A B; try Cong. (* Goal: @Cong Tn A B C' z *) apply cong_transitivity with C y; assumption. Qed. Lemma le_reflexivity : forall A B, Le A B A B. Proof. (* Goal: forall A B : @Tpoint Tn, @Le Tn A B A B *) unfold Le. (* Goal: forall A B : @Tpoint Tn, @ex (@Tpoint Tn) (fun E : @Tpoint Tn => and (@Bet Tn A E B) (@Cong Tn A B A E)) *) intros. (* Goal: @ex (@Tpoint Tn) (fun E : @Tpoint Tn => and (@Bet Tn A E B) (@Cong Tn A B A E)) *) exists B. (* Goal: and (@Bet Tn A B B) (@Cong Tn A B A B) *) split; Between; Cong. Qed. Lemma le_transitivity : forall A B C D E F, Le A B C D -> Le C D E F -> Le A B E F. Proof. (* Goal: forall (A B C D E F : @Tpoint Tn) (_ : @Le Tn A B C D) (_ : @Le Tn C D E F), @Le Tn A B E F *) unfold Le. (* Goal: forall (A B C D E F : @Tpoint Tn) (_ : @ex (@Tpoint Tn) (fun E0 : @Tpoint Tn => and (@Bet Tn C E0 D) (@Cong Tn A B C E0))) (_ : @ex (@Tpoint Tn) (fun E0 : @Tpoint Tn => and (@Bet Tn E E0 F) (@Cong Tn C D E E0))), @ex (@Tpoint Tn) (fun E0 : @Tpoint Tn => and (@Bet Tn E E0 F) (@Cong Tn A B E E0)) *) intros. (* Goal: @ex (@Tpoint Tn) (fun E0 : @Tpoint Tn => and (@Bet Tn E E0 F) (@Cong Tn A B E E0)) *) ex_and H y. (* Goal: @ex (@Tpoint Tn) (fun E0 : @Tpoint Tn => and (@Bet Tn E E0 F) (@Cong Tn A B E E0)) *) ex_and H0 z. (* Goal: @ex (@Tpoint Tn) (fun E0 : @Tpoint Tn => and (@Bet Tn E E0 F) (@Cong Tn A B E E0)) *) assert (exists P : Tpoint, Bet E P z /\ Cong_3 C y D E P z) by (eapply l4_5;assumption). (* Goal: @ex (@Tpoint Tn) (fun E0 : @Tpoint Tn => and (@Bet Tn E E0 F) (@Cong Tn A B E E0)) *) ex_and H3 P. (* Goal: @ex (@Tpoint Tn) (fun E0 : @Tpoint Tn => and (@Bet Tn E E0 F) (@Cong Tn A B E E0)) *) exists P. (* Goal: and (@Bet Tn E P F) (@Cong Tn A B E P) *) split. (* Goal: @Cong Tn A B E P *) (* Goal: @Bet Tn E P F *) eBetween. (* Goal: @Cong Tn A B E P *) unfold Cong_3 in H4; spliter; apply cong_transitivity with C y; Cong. Qed. Lemma between_cong : forall A B C, Bet A C B -> Cong A C A B -> C=B. Proof. (* Goal: forall (A B C : @Tpoint Tn) (_ : @Bet Tn A C B) (_ : @Cong Tn A C A B), @eq (@Tpoint Tn) C B *) apply eq_dec_implies_between_cong; apply eq_dec_points. Qed. Lemma cong3_symmetry : forall A B C A' B' C' : Tpoint , 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)) *) intros. (* Goal: and (@Cong Tn A' B' A B) (and (@Cong Tn A' C' A C) (@Cong Tn B' C' B C)) *) intuition. Qed. Lemma between_cong_2 : forall A B D E, Bet A D B -> Bet A E B -> Cong A D A E -> D = E. Proof. (* Goal: forall (A B D E : @Tpoint Tn) (_ : @Bet Tn A D B) (_ : @Bet Tn A E B) (_ : @Cong Tn A D A E), @eq (@Tpoint Tn) D E *) intros. (* Goal: @eq (@Tpoint Tn) D E *) apply cong3_bet_eq with A B; unfold Cong_3; repeat split; Cong. (* Goal: @Cong Tn E B D B *) eapply (l4_2 B E A B B D A B). (* Goal: @IFSC Tn B E A B B D A B *) unfold IFSC; repeat split; Cong; Between. Qed. Lemma between_cong_3 : forall A B D E, A <> B -> Bet A B D -> Bet A B E -> Cong B D B E -> D = E. Proof. (* Goal: forall (A B D E : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) A B)) (_ : @Bet Tn A B D) (_ : @Bet Tn A B E) (_ : @Cong Tn B D B E), @eq (@Tpoint Tn) D E *) apply eq_dec_implies_between_cong_3; apply eq_dec_points. Qed. Lemma le_anti_symmetry : forall A B C D, Le A B C D -> Le C D A B -> Cong A B C D. Proof. (* Goal: forall (A B C D : @Tpoint Tn) (_ : @Le Tn A B C D) (_ : @Le Tn C D A B), @Cong Tn A B C D *) intros. (* Goal: @Cong Tn A B C D *) assert (exists T, Bet C D T /\ Cong C T A B) by (apply l5_5_1;assumption). (* Goal: @Cong Tn A B C D *) unfold Le in H. (* Goal: @Cong Tn A B C D *) ex_and H Y. (* Goal: @Cong Tn A B C D *) ex_and H1 T. (* Goal: @Cong Tn A B C D *) assert (Cong C Y C T) by eCong. (* Goal: @Cong Tn A B C D *) assert (Bet C Y T) by eBetween. (* Goal: @Cong Tn A B C D *) assert (Y=T) by (eapply between_cong;eauto). (* Goal: @Cong Tn A B C D *) subst Y. (* Goal: @Cong Tn A B C D *) assert (T=D) by (eapply between_equality;eBetween). (* Goal: @Cong Tn A B C D *) subst T. (* Goal: @Cong Tn A B C D *) Cong. Qed. Lemma cong_dec : forall A B C D, Cong A B C D \/ ~ Cong A B C D. Proof. (* Goal: forall A B C D : @Tpoint Tn, or (@Cong Tn A B C D) (not (@Cong Tn A B C D)) *) apply eq_dec_cong_dec; apply eq_dec_points. Qed. Lemma bet_dec : forall A B C, Bet A B C \/ ~ Bet A B C. Proof. (* Goal: forall A B C : @Tpoint Tn, or (@Bet Tn A B C) (not (@Bet Tn A B C)) *) apply eq_dec_bet_dec; apply eq_dec_points. Qed. Lemma col_dec : forall A B C, Col A B C \/ ~ Col A B C. Proof. (* Goal: forall A B C : @Tpoint Tn, or (@Col Tn A B C) (not (@Col Tn A B C)) *) intros. (* Goal: or (@Col Tn A B C) (not (@Col Tn A B C)) *) unfold Col. (* Goal: or (or (@Bet Tn A B C) (or (@Bet Tn B C A) (@Bet Tn C A B))) (not (or (@Bet Tn A B C) (or (@Bet Tn B C A) (@Bet Tn C A B)))) *) elim (bet_dec A B C); intro; elim (bet_dec B C A); intro; elim (bet_dec C A B); intro; tauto. Qed. Lemma le_trivial : forall A C D, Le A A C D . Proof. (* Goal: forall A C D : @Tpoint Tn, @Le Tn A A C D *) intros. (* Goal: @Le Tn A A C D *) unfold Le. (* Goal: @ex (@Tpoint Tn) (fun E : @Tpoint Tn => and (@Bet Tn C E D) (@Cong Tn A A C E)) *) exists C. (* Goal: and (@Bet Tn C C D) (@Cong Tn A A C C) *) split; Between; Cong. Qed. Lemma le_cases : forall A B C D, Le A B C D \/ Le C D A B. Proof. (* Goal: forall A B C D : @Tpoint Tn, or (@Le Tn A B C D) (@Le Tn C D A B) *) intros. (* Goal: or (@Le Tn A B C D) (@Le Tn C D A B) *) induction(eq_dec_points A B). (* Goal: or (@Le Tn A B C D) (@Le Tn C D A B) *) (* Goal: or (@Le Tn A B C D) (@Le Tn C D A B) *) subst B; left; apply le_trivial. (* Goal: or (@Le Tn A B C D) (@Le Tn C D A B) *) assert (exists X : Tpoint, (Bet A B X \/ Bet A X B) /\ Cong A X C D) by (eapply (segment_construction_2 B A C D);auto). (* Goal: or (@Le Tn A B C D) (@Le Tn C D A B) *) ex_and H0 X. (* Goal: or (@Le Tn A B C D) (@Le Tn C D A B) *) induction H0. (* Goal: or (@Le Tn A B C D) (@Le Tn C D A B) *) (* Goal: or (@Le Tn A B C D) (@Le Tn C D A B) *) left; apply l5_5_2; exists X; split; assumption. (* Goal: or (@Le Tn A B C D) (@Le Tn C D A B) *) right; unfold Le; exists X; split; Cong. Qed. Lemma le_zero : forall A B C, Le A B C C -> A=B. Proof. (* Goal: forall (A B C : @Tpoint Tn) (_ : @Le Tn A B C C), @eq (@Tpoint Tn) A B *) intros. (* Goal: @eq (@Tpoint Tn) A B *) assert (Le C C A B) by apply le_trivial. (* Goal: @eq (@Tpoint Tn) A B *) assert (Cong A B C C) by (apply le_anti_symmetry;assumption). (* Goal: @eq (@Tpoint Tn) A B *) treat_equalities;auto. Qed. Lemma le_diff : forall A B C D, A <> B -> Le A B C D -> C <> D. Proof. (* Goal: forall (A B C D : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) A B)) (_ : @Le Tn A B C D), not (@eq (@Tpoint Tn) C D) *) intros A B C D HAB HLe Heq. (* Goal: False *) subst D; apply HAB, le_zero with C; assumption. Qed. Lemma lt_diff : forall A B C D, Lt A B C D -> C <> D. Proof. (* Goal: forall (A B C D : @Tpoint Tn) (_ : @Lt Tn A B C D), not (@eq (@Tpoint Tn) C D) *) intros A B C D HLt Heq. (* Goal: False *) subst D. (* Goal: False *) destruct HLt as [HLe HNCong]. (* Goal: False *) assert (A = B) by (apply le_zero with C; assumption). (* Goal: False *) subst B; Cong. Qed. Lemma bet_cong_eq : forall A B C D, Bet A B C -> Bet A C D -> Cong B C A D -> C = D /\ A = B. Proof. (* Goal: forall (A B C D : @Tpoint Tn) (_ : @Bet Tn A B C) (_ : @Bet Tn A C D) (_ : @Cong Tn B C A D), and (@eq (@Tpoint Tn) C D) (@eq (@Tpoint Tn) A B) *) intros. (* Goal: and (@eq (@Tpoint Tn) C D) (@eq (@Tpoint Tn) A B) *) assert(C = D). (* Goal: and (@eq (@Tpoint Tn) C D) (@eq (@Tpoint Tn) A B) *) (* Goal: @eq (@Tpoint Tn) C D *) assert(Le A C A D) by (eapply l5_5_2; exists D; split; Cong). (* Goal: and (@eq (@Tpoint Tn) C D) (@eq (@Tpoint Tn) A B) *) (* Goal: @eq (@Tpoint Tn) C D *) assert(Le C B C A) by (eapply l5_5_2; exists A; split; Between; Cong). (* Goal: and (@eq (@Tpoint Tn) C D) (@eq (@Tpoint Tn) A B) *) (* Goal: @eq (@Tpoint Tn) C D *) assert(Cong A C A D) by (eapply le_anti_symmetry; try assumption; apply l5_6 with C B C A; Cong). (* Goal: and (@eq (@Tpoint Tn) C D) (@eq (@Tpoint Tn) A B) *) (* Goal: @eq (@Tpoint Tn) C D *) apply between_cong with A; assumption. (* Goal: and (@eq (@Tpoint Tn) C D) (@eq (@Tpoint Tn) A B) *) split; try assumption. (* Goal: @eq (@Tpoint Tn) A B *) subst D; apply sym_equal. (* Goal: @eq (@Tpoint Tn) B A *) eapply (between_cong C); Between; Cong. Qed. Lemma cong__le : forall A B C D, Cong A B C D -> Le A B C D. Proof. (* Goal: forall (A B C D : @Tpoint Tn) (_ : @Cong Tn A B C D), @Le Tn A B C D *) intros A B C D H. (* Goal: @Le Tn A B C D *) exists D. (* Goal: and (@Bet Tn C D D) (@Cong Tn A B C D) *) split. (* Goal: @Cong Tn A B C D *) (* Goal: @Bet Tn C D D *) Between. (* Goal: @Cong Tn A B C D *) Cong. Qed. Lemma cong__le3412 : forall A B C D, Cong A B C D -> Le C D A B. Proof. (* Goal: forall (A B C D : @Tpoint Tn) (_ : @Cong Tn A B C D), @Le Tn C D A B *) intros A B C D HCong. (* Goal: @Le Tn C D A B *) apply cong__le. (* Goal: @Cong Tn C D A B *) Cong. Qed. Lemma le1221 : forall A B, Le A B B A. Proof. (* Goal: forall A B : @Tpoint Tn, @Le Tn A B B A *) intros A B. (* Goal: @Le Tn A B B A *) apply cong__le; Cong. Qed. Lemma le_left_comm : forall A B C D, Le A B C D -> Le B A C D. Proof. (* Goal: forall (A B C D : @Tpoint Tn) (_ : @Le Tn A B C D), @Le Tn B A C D *) intros A B C D Hle. (* Goal: @Le Tn B A C D *) apply (le_transitivity _ _ A B); auto. (* Goal: @Le Tn B A A B *) apply le1221; auto. Qed. Lemma le_right_comm : forall A B C D, Le A B C D -> Le A B D C. Proof. (* Goal: forall (A B C D : @Tpoint Tn) (_ : @Le Tn A B C D), @Le Tn A B D C *) intros A B C D Hle. (* Goal: @Le Tn A B D C *) apply (le_transitivity _ _ C D); auto. (* Goal: @Le Tn C D D C *) apply le1221; auto. Qed. Lemma le_comm : forall A B C D, Le A B C D -> Le B A D C. Proof. (* Goal: forall (A B C D : @Tpoint Tn) (_ : @Le Tn A B C D), @Le Tn B A D C *) intros. (* Goal: @Le Tn B A D C *) apply le_left_comm. (* Goal: @Le Tn A B D C *) apply le_right_comm. (* Goal: @Le Tn A B C D *) assumption. Qed. Lemma ge_left_comm : forall A B C D, Ge A B C D -> Ge B A C D. Proof. (* Goal: forall (A B C D : @Tpoint Tn) (_ : @Ge Tn A B C D), @Ge Tn B A C D *) intros. (* Goal: @Ge Tn B A C D *) unfold Ge in *. (* Goal: @Le Tn C D B A *) apply le_right_comm. (* Goal: @Le Tn C D A B *) assumption. Qed. Lemma ge_right_comm : forall A B C D, Ge A B C D -> Ge A B D C. Proof. (* Goal: forall (A B C D : @Tpoint Tn) (_ : @Ge Tn A B C D), @Ge Tn A B D C *) intros. (* Goal: @Ge Tn A B D C *) unfold Ge in *. (* Goal: @Le Tn D C A B *) apply le_left_comm. (* Goal: @Le Tn C D A B *) assumption. Qed. Lemma ge_comm : forall A B C D, Ge A B C D -> Ge B A D C. Proof. (* Goal: forall (A B C D : @Tpoint Tn) (_ : @Ge Tn A B C D), @Ge Tn B A D C *) intros. (* Goal: @Ge Tn B A D C *) apply ge_left_comm. (* Goal: @Ge Tn A B D C *) apply ge_right_comm. (* Goal: @Ge Tn A B C D *) assumption. Qed. Lemma lt_right_comm : forall A B C D, Lt A B C D -> Lt A B D C. Proof. (* Goal: forall (A B C D : @Tpoint Tn) (_ : @Lt Tn A B C D), @Lt Tn A B D C *) intros. (* Goal: @Lt Tn A B D C *) unfold Lt in *. (* Goal: and (@Le Tn A B D C) (not (@Cong Tn A B D C)) *) spliter. (* Goal: and (@Le Tn A B D C) (not (@Cong Tn A B D C)) *) split. (* Goal: not (@Cong Tn A B D C) *) (* Goal: @Le Tn A B D C *) apply le_right_comm. (* Goal: not (@Cong Tn A B D C) *) (* Goal: @Le Tn A B C D *) assumption. (* Goal: not (@Cong Tn A B D C) *) intro. (* Goal: False *) apply H0. (* Goal: @Cong Tn A B C D *) apply cong_right_commutativity. (* Goal: @Cong Tn A B D C *) assumption. Qed. Lemma lt_left_comm : forall A B C D, Lt A B C D -> Lt B A C D. Proof. (* Goal: forall (A B C D : @Tpoint Tn) (_ : @Lt Tn A B C D), @Lt Tn B A C D *) intros. (* Goal: @Lt Tn B A C D *) unfold Lt in *. (* Goal: and (@Le Tn B A C D) (not (@Cong Tn B A C D)) *) spliter. (* Goal: and (@Le Tn B A C D) (not (@Cong Tn B A C D)) *) split. (* Goal: not (@Cong Tn B A C D) *) (* Goal: @Le Tn B A C D *) unfold Le in *. (* Goal: not (@Cong Tn B A C D) *) (* Goal: @ex (@Tpoint Tn) (fun E : @Tpoint Tn => and (@Bet Tn C E D) (@Cong Tn B A C E)) *) ex_and H P. (* Goal: not (@Cong Tn B A C D) *) (* Goal: @ex (@Tpoint Tn) (fun E : @Tpoint Tn => and (@Bet Tn C E D) (@Cong Tn B A C E)) *) exists P. (* Goal: not (@Cong Tn B A C D) *) (* Goal: and (@Bet Tn C P D) (@Cong Tn B A C P) *) apply cong_left_commutativity in H1. (* Goal: not (@Cong Tn B A C D) *) (* Goal: and (@Bet Tn C P D) (@Cong Tn B A C P) *) split; assumption. (* Goal: not (@Cong Tn B A C D) *) intro. (* Goal: False *) apply H0. (* Goal: @Cong Tn A B C D *) apply cong_left_commutativity. (* Goal: @Cong Tn B A C D *) assumption. Qed. Lemma lt_comm : forall A B C D, Lt A B C D -> Lt B A D C. Proof. (* Goal: forall (A B C D : @Tpoint Tn) (_ : @Lt Tn A B C D), @Lt Tn B A D C *) intros. (* Goal: @Lt Tn B A D C *) apply lt_left_comm. (* Goal: @Lt Tn A B D C *) apply lt_right_comm. (* Goal: @Lt Tn A B C D *) assumption. Qed. Lemma gt_left_comm : forall A B C D, Gt A B C D -> Gt B A C D. Proof. (* Goal: forall (A B C D : @Tpoint Tn) (_ : @Gt Tn A B C D), @Gt Tn B A C D *) intros. (* Goal: @Gt Tn B A C D *) unfold Gt in *. (* Goal: @Lt Tn C D B A *) apply lt_right_comm. (* Goal: @Lt Tn C D A B *) assumption. Qed. Lemma gt_right_comm : forall A B C D, Gt A B C D -> Gt A B D C. Proof. (* Goal: forall (A B C D : @Tpoint Tn) (_ : @Gt Tn A B C D), @Gt Tn A B D C *) intros. (* Goal: @Gt Tn A B D C *) unfold Gt in *. (* Goal: @Lt Tn D C A B *) apply lt_left_comm. (* Goal: @Lt Tn C D A B *) assumption. Qed. Lemma gt_comm : forall A B C D, Gt A B C D -> Gt B A D C. Proof. (* Goal: forall (A B C D : @Tpoint Tn) (_ : @Gt Tn A B C D), @Gt Tn B A D C *) intros. (* Goal: @Gt Tn B A D C *) apply gt_left_comm. (* Goal: @Gt Tn A B D C *) apply gt_right_comm. (* Goal: @Gt Tn A B C D *) assumption. Qed. Lemma cong2_lt__lt : forall A B C D A' B' C' D', Lt A B C D -> Cong A B A' B' -> Cong C D C' D' -> Lt A' B' C' D'. Proof. (* Goal: forall (A B C D A' B' C' D' : @Tpoint Tn) (_ : @Lt Tn A B C D) (_ : @Cong Tn A B A' B') (_ : @Cong Tn C D C' D'), @Lt Tn A' B' C' D' *) intros A B C D A' B' C' D' Hlt HCong1 HCong2. (* Goal: @Lt Tn A' B' C' D' *) destruct Hlt as [Hle HNCong]. (* Goal: @Lt Tn A' B' C' D' *) split. (* Goal: not (@Cong Tn A' B' C' D') *) (* Goal: @Le Tn A' B' C' D' *) apply (l5_6 A B C D); auto. (* Goal: not (@Cong Tn A' B' C' D') *) intro. (* Goal: False *) apply HNCong. (* Goal: @Cong Tn A B C D *) apply (cong_transitivity _ _ A' B'); auto. (* Goal: @Cong Tn A' B' C D *) apply (cong_transitivity _ _ C' D'); Cong. Qed. Lemma fourth_point : forall A B C P, A <> B -> B <> C -> Col A B P -> Bet A B C -> Bet P A B \/ Bet A P B \/ Bet B P C \/ Bet B C P. Proof. (* Goal: forall (A B C P : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) A B)) (_ : not (@eq (@Tpoint Tn) B C)) (_ : @Col Tn A B P) (_ : @Bet Tn A B C), or (@Bet Tn P A B) (or (@Bet Tn A P B) (or (@Bet Tn B P C) (@Bet Tn B C P))) *) intros. (* Goal: or (@Bet Tn P A B) (or (@Bet Tn A P B) (or (@Bet Tn B P C) (@Bet Tn B C P))) *) induction H1. (* Goal: or (@Bet Tn P A B) (or (@Bet Tn A P B) (or (@Bet Tn B P C) (@Bet Tn B C P))) *) (* Goal: or (@Bet Tn P A B) (or (@Bet Tn A P B) (or (@Bet Tn B P C) (@Bet Tn B C P))) *) assert(HH:= l5_2 A B C P H H2 H1). (* Goal: or (@Bet Tn P A B) (or (@Bet Tn A P B) (or (@Bet Tn B P C) (@Bet Tn B C P))) *) (* Goal: or (@Bet Tn P A B) (or (@Bet Tn A P B) (or (@Bet Tn B P C) (@Bet Tn B C P))) *) right; right. (* Goal: or (@Bet Tn P A B) (or (@Bet Tn A P B) (or (@Bet Tn B P C) (@Bet Tn B C P))) *) (* Goal: or (@Bet Tn B P C) (@Bet Tn B C P) *) induction HH. (* Goal: or (@Bet Tn P A B) (or (@Bet Tn A P B) (or (@Bet Tn B P C) (@Bet Tn B C P))) *) (* Goal: or (@Bet Tn B P C) (@Bet Tn B C P) *) (* Goal: or (@Bet Tn B P C) (@Bet Tn B C P) *) right; auto. (* Goal: or (@Bet Tn P A B) (or (@Bet Tn A P B) (or (@Bet Tn B P C) (@Bet Tn B C P))) *) (* Goal: or (@Bet Tn B P C) (@Bet Tn B C P) *) left; auto. (* Goal: or (@Bet Tn P A B) (or (@Bet Tn A P B) (or (@Bet Tn B P C) (@Bet Tn B C P))) *) induction H1. (* Goal: or (@Bet Tn P A B) (or (@Bet Tn A P B) (or (@Bet Tn B P C) (@Bet Tn B C P))) *) (* Goal: or (@Bet Tn P A B) (or (@Bet Tn A P B) (or (@Bet Tn B P C) (@Bet Tn B C P))) *) right; left. (* Goal: or (@Bet Tn P A B) (or (@Bet Tn A P B) (or (@Bet Tn B P C) (@Bet Tn B C P))) *) (* Goal: @Bet Tn A P B *) Between. (* Goal: or (@Bet Tn P A B) (or (@Bet Tn A P B) (or (@Bet Tn B P C) (@Bet Tn B C P))) *) left; auto. Qed. Lemma third_point : forall A B P, Col A B P -> Bet P A B \/ Bet A P B \/ Bet A B P. Proof. (* Goal: forall (A B P : @Tpoint Tn) (_ : @Col Tn A B P), or (@Bet Tn P A B) (or (@Bet Tn A P B) (@Bet Tn A B P)) *) intros. (* Goal: or (@Bet Tn P A B) (or (@Bet Tn A P B) (@Bet Tn A B P)) *) induction H. (* Goal: or (@Bet Tn P A B) (or (@Bet Tn A P B) (@Bet Tn A B P)) *) (* Goal: or (@Bet Tn P A B) (or (@Bet Tn A P B) (@Bet Tn A B P)) *) right; right. (* Goal: or (@Bet Tn P A B) (or (@Bet Tn A P B) (@Bet Tn A B P)) *) (* Goal: @Bet Tn A B P *) auto. (* Goal: or (@Bet Tn P A B) (or (@Bet Tn A P B) (@Bet Tn A B P)) *) induction H. (* Goal: or (@Bet Tn P A B) (or (@Bet Tn A P B) (@Bet Tn A B P)) *) (* Goal: or (@Bet Tn P A B) (or (@Bet Tn A P B) (@Bet Tn A B P)) *) right; left. (* Goal: or (@Bet Tn P A B) (or (@Bet Tn A P B) (@Bet Tn A B P)) *) (* Goal: @Bet Tn A P B *) Between. (* Goal: or (@Bet Tn P A B) (or (@Bet Tn A P B) (@Bet Tn A B P)) *) left. (* Goal: @Bet Tn P A B *) auto. Qed. Lemma l5_12_a : forall A B C, Bet A B C -> Le A B A C /\ Le B C A C. Proof. (* Goal: forall (A B C : @Tpoint Tn) (_ : @Bet Tn A B C), and (@Le Tn A B A C) (@Le Tn B C A C) *) intros. (* Goal: and (@Le Tn A B A C) (@Le Tn B C A C) *) split. (* Goal: @Le Tn B C A C *) (* Goal: @Le Tn A B A C *) unfold Le. (* Goal: @Le Tn B C A C *) (* Goal: @ex (@Tpoint Tn) (fun E : @Tpoint Tn => and (@Bet Tn A E C) (@Cong Tn A B A E)) *) exists B; split. (* Goal: @Le Tn B C A C *) (* Goal: @Cong Tn A B A B *) (* Goal: @Bet Tn A B C *) assumption. (* Goal: @Le Tn B C A C *) (* Goal: @Cong Tn A B A B *) apply cong_reflexivity. (* Goal: @Le Tn B C A C *) apply le_comm. (* Goal: @Le Tn C B C A *) unfold Le. (* Goal: @ex (@Tpoint Tn) (fun E : @Tpoint Tn => and (@Bet Tn C E A) (@Cong Tn C B C E)) *) exists B. (* Goal: and (@Bet Tn C B A) (@Cong Tn C B C B) *) split. (* Goal: @Cong Tn C B C B *) (* Goal: @Bet Tn C B A *) apply between_symmetry. (* Goal: @Cong Tn C B C B *) (* Goal: @Bet Tn A B C *) assumption. (* Goal: @Cong Tn C B C B *) apply cong_reflexivity. Qed. Lemma bet__le1213 : forall A B C, Bet A B C -> Le A B A C. Proof. (* Goal: forall (A B C : @Tpoint Tn) (_ : @Bet Tn A B C), @Le Tn A B A C *) intros A B C HBet. (* Goal: @Le Tn A B A C *) destruct (l5_12_a A B C HBet); trivial. Qed. Lemma bet__le2313 : forall A B C, Bet A B C -> Le B C A C. Proof. (* Goal: forall (A B C : @Tpoint Tn) (_ : @Bet Tn A B C), @Le Tn B C A C *) intros A B C HBet. (* Goal: @Le Tn B C A C *) destruct (l5_12_a A B C HBet); trivial. Qed. Lemma bet__lt1213 : forall A B C, B <> C -> Bet A B C -> Lt A B A C. Proof. (* Goal: forall (A B C : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) B C)) (_ : @Bet Tn A B C), @Lt Tn A B A C *) intros A B C HBC HBet. (* Goal: @Lt Tn A B A C *) split. (* Goal: not (@Cong Tn A B A C) *) (* Goal: @Le Tn A B A C *) apply bet__le1213; trivial. (* Goal: not (@Cong Tn A B A C) *) intro. (* Goal: False *) apply HBC, between_cong with A; trivial. Qed. Lemma bet__lt2313 : forall A B C, A <> B -> Bet A B C -> Lt B C A C. Proof. (* Goal: forall (A B C : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) A B)) (_ : @Bet Tn A B C), @Lt Tn B C A C *) intros; apply lt_comm, bet__lt1213; Between. Qed. Lemma l5_12_b : forall A B C, Col A B C -> Le A B A C -> Le B C A C -> Bet A B C. Lemma bet_le_eq : forall A B C, Bet A B C -> Le A C B C -> A = B. Lemma or_lt_cong_gt : forall A B C D, Lt A B C D \/ Gt A B C D \/ Cong A B C D. Proof. (* Goal: forall A B C D : @Tpoint Tn, or (@Lt Tn A B C D) (or (@Gt Tn A B C D) (@Cong Tn A B C D)) *) intros. (* Goal: or (@Lt Tn A B C D) (or (@Gt Tn A B C D) (@Cong Tn A B C D)) *) assert(HH:= le_cases A B C D). (* Goal: or (@Lt Tn A B C D) (or (@Gt Tn A B C D) (@Cong Tn A B C D)) *) induction HH. (* Goal: or (@Lt Tn A B C D) (or (@Gt Tn A B C D) (@Cong Tn A B C D)) *) (* Goal: or (@Lt Tn A B C D) (or (@Gt Tn A B C D) (@Cong Tn A B C D)) *) induction(cong_dec A B C D). (* Goal: or (@Lt Tn A B C D) (or (@Gt Tn A B C D) (@Cong Tn A B C D)) *) (* Goal: or (@Lt Tn A B C D) (or (@Gt Tn A B C D) (@Cong Tn A B C D)) *) (* Goal: or (@Lt Tn A B C D) (or (@Gt Tn A B C D) (@Cong Tn A B C D)) *) right; right. (* Goal: or (@Lt Tn A B C D) (or (@Gt Tn A B C D) (@Cong Tn A B C D)) *) (* Goal: or (@Lt Tn A B C D) (or (@Gt Tn A B C D) (@Cong Tn A B C D)) *) (* Goal: @Cong Tn A B C D *) assumption. (* Goal: or (@Lt Tn A B C D) (or (@Gt Tn A B C D) (@Cong Tn A B C D)) *) (* Goal: or (@Lt Tn A B C D) (or (@Gt Tn A B C D) (@Cong Tn A B C D)) *) left. (* Goal: or (@Lt Tn A B C D) (or (@Gt Tn A B C D) (@Cong Tn A B C D)) *) (* Goal: @Lt Tn A B C D *) unfold Lt. (* Goal: or (@Lt Tn A B C D) (or (@Gt Tn A B C D) (@Cong Tn A B C D)) *) (* Goal: and (@Le Tn A B C D) (not (@Cong Tn A B C D)) *) split; assumption. (* Goal: or (@Lt Tn A B C D) (or (@Gt Tn A B C D) (@Cong Tn A B C D)) *) induction(cong_dec A B C D). (* Goal: or (@Lt Tn A B C D) (or (@Gt Tn A B C D) (@Cong Tn A B C D)) *) (* Goal: or (@Lt Tn A B C D) (or (@Gt Tn A B C D) (@Cong Tn A B C D)) *) right; right. (* Goal: or (@Lt Tn A B C D) (or (@Gt Tn A B C D) (@Cong Tn A B C D)) *) (* Goal: @Cong Tn A B C D *) assumption. (* Goal: or (@Lt Tn A B C D) (or (@Gt Tn A B C D) (@Cong Tn A B C D)) *) right; left. (* Goal: @Gt Tn A B C D *) unfold Gt. (* Goal: @Lt Tn C D A B *) unfold Lt. (* Goal: and (@Le Tn C D A B) (not (@Cong Tn C D A B)) *) split. (* Goal: not (@Cong Tn C D A B) *) (* Goal: @Le Tn C D A B *) assumption. (* Goal: not (@Cong Tn C D A B) *) intro. (* Goal: False *) apply H0. (* Goal: @Cong Tn A B C D *) apply cong_symmetry. (* Goal: @Cong Tn C D A B *) assumption. Qed. Lemma lt__le : forall A B C D, Lt A B C D -> Le A B C D. Proof. (* Goal: forall (A B C D : @Tpoint Tn) (_ : @Lt Tn A B C D), @Le Tn A B C D *) intros A B C D Hlt. (* Goal: @Le Tn A B C D *) destruct Hlt. (* Goal: @Le Tn A B C D *) assumption. Qed. Lemma le1234_lt__lt : forall A B C D E F, Le A B C D -> Lt C D E F -> Lt A B E F. Proof. (* Goal: forall (A B C D E F : @Tpoint Tn) (_ : @Le Tn A B C D) (_ : @Lt Tn C D E F), @Lt Tn A B E F *) intros A B C D E F Hle Hlt. (* Goal: @Lt Tn A B E F *) destruct Hlt as [Hle' HNCong]. (* Goal: @Lt Tn A B E F *) split. (* Goal: not (@Cong Tn A B E F) *) (* Goal: @Le Tn A B E F *) apply (le_transitivity _ _ C D); auto. (* Goal: not (@Cong Tn A B E F) *) intro. (* Goal: False *) apply HNCong. (* Goal: @Cong Tn C D E F *) apply le_anti_symmetry; auto. (* Goal: @Le Tn E F C D *) apply (l5_6 A B C D); Cong. Qed. Lemma le3456_lt__lt : forall A B C D E F, Lt A B C D -> Le C D E F -> Lt A B E F. Proof. (* Goal: forall (A B C D E F : @Tpoint Tn) (_ : @Lt Tn A B C D) (_ : @Le Tn C D E F), @Lt Tn A B E F *) intros A B C D E F Hlt Hle. (* Goal: @Lt Tn A B E F *) destruct Hlt as [Hle' HNCong]. (* Goal: @Lt Tn A B E F *) split. (* Goal: not (@Cong Tn A B E F) *) (* Goal: @Le Tn A B E F *) apply (le_transitivity _ _ C D); auto. (* Goal: not (@Cong Tn A B E F) *) intro. (* Goal: False *) apply HNCong. (* Goal: @Cong Tn A B C D *) apply le_anti_symmetry; auto. (* Goal: @Le Tn C D A B *) apply (l5_6 C D E F); Cong. Qed. Lemma lt_transitivity : forall A B C D E F, Lt A B C D -> Lt C D E F -> Lt A B E F. Proof. (* Goal: forall (A B C D E F : @Tpoint Tn) (_ : @Lt Tn A B C D) (_ : @Lt Tn C D E F), @Lt Tn A B E F *) intros A B C D E F HLt1 HLt2. (* Goal: @Lt Tn A B E F *) apply le1234_lt__lt with C D; try (apply lt__le); assumption. Qed. Lemma not_and_lt : forall A B C D, ~ (Lt A B C D /\ Lt C D A B). Proof. (* Goal: forall A B C D : @Tpoint Tn, not (and (@Lt Tn A B C D) (@Lt Tn C D A B)) *) intros A B C D. (* Goal: not (and (@Lt Tn A B C D) (@Lt Tn C D A B)) *) intro HInter. (* Goal: False *) destruct HInter as [[Hle HNCong] []]. (* Goal: False *) apply HNCong. (* Goal: @Cong Tn A B C D *) apply le_anti_symmetry; assumption. Qed. Lemma nlt : forall A B, ~ Lt A B A B. Proof. (* Goal: forall A B : @Tpoint Tn, not (@Lt Tn A B A B) *) intros A B Hlt. (* Goal: False *) apply (not_and_lt A B A B). (* Goal: and (@Lt Tn A B A B) (@Lt Tn A B A B) *) split; assumption. Qed. Lemma le__nlt : forall A B C D, Le A B C D -> ~ Lt C D A B. Proof. (* Goal: forall (A B C D : @Tpoint Tn) (_ : @Le Tn A B C D), not (@Lt Tn C D A B) *) intros A B C D HLe HLt. (* Goal: False *) apply (not_and_lt A B C D); split; auto. (* Goal: @Lt Tn A B C D *) split; auto. (* Goal: not (@Cong Tn A B C D) *) unfold Lt in *; spliter; auto with cong. Qed. Lemma cong__nlt : forall A B C D, Cong A B C D -> ~ Lt A B C D. Proof. (* Goal: forall (A B C D : @Tpoint Tn) (_ : @Cong Tn A B C D), not (@Lt Tn A B C D) *) intros P Q R S H. (* Goal: not (@Lt Tn P Q R S) *) apply le__nlt. (* Goal: @Le Tn R S P Q *) unfold Le. (* Goal: @ex (@Tpoint Tn) (fun E : @Tpoint Tn => and (@Bet Tn P E Q) (@Cong Tn R S P E)) *) exists Q; split; Cong; Between. Qed. Lemma nlt__le : forall A B C D, ~ Lt A B C D -> Le C D A B. Proof. (* Goal: forall (A B C D : @Tpoint Tn) (_ : not (@Lt Tn A B C D)), @Le Tn C D A B *) intros A B C D HNLt. (* Goal: @Le Tn C D A B *) destruct (le_cases A B C D); trivial. (* Goal: @Le Tn C D A B *) destruct (cong_dec C D A B). (* Goal: @Le Tn C D A B *) (* Goal: @Le Tn C D A B *) apply cong__le; assumption. (* Goal: @Le Tn C D A B *) exfalso. (* Goal: False *) apply HNLt. (* Goal: @Lt Tn A B C D *) split; Cong. Qed. Lemma lt__nle : forall A B C D, Lt A B C D -> ~ Le C D A B. Proof. (* Goal: forall (A B C D : @Tpoint Tn) (_ : @Lt Tn A B C D), not (@Le Tn C D A B) *) intros A B C D HLt HLe. (* Goal: False *) generalize HLt. (* Goal: forall _ : @Lt Tn A B C D, False *) apply le__nlt; assumption. Qed. Lemma nle__lt : forall A B C D, ~ Le A B C D -> Lt C D A B. Proof. (* Goal: forall (A B C D : @Tpoint Tn) (_ : not (@Le Tn A B C D)), @Lt Tn C D A B *) intros A B C D HNLe. (* Goal: @Lt Tn C D A B *) destruct (le_cases A B C D). (* Goal: @Lt Tn C D A B *) (* Goal: @Lt Tn C D A B *) contradiction. (* Goal: @Lt Tn C D A B *) split; trivial. (* Goal: not (@Cong Tn C D A B) *) intro. (* Goal: False *) apply HNLe. (* Goal: @Le Tn A B C D *) apply cong__le; Cong. Qed. Lemma lt1123 : forall A B C, B<>C -> Lt A A B C. Proof. (* Goal: forall (A B C : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) B C)), @Lt Tn A A B C *) intros. (* Goal: @Lt Tn A A B C *) split. (* Goal: not (@Cong Tn A A B C) *) (* Goal: @Le Tn A A B C *) apply le_trivial. (* Goal: not (@Cong Tn A A B C) *) intro. (* Goal: False *) treat_equalities. (* Goal: False *) intuition. Qed. Lemma bet2_le2__le : forall O o A B a b, Bet a o b -> Bet A O B -> Le o a O A -> Le o b O B -> Le a b A B. Proof. (* Goal: forall (O o A B a b : @Tpoint Tn) (_ : @Bet Tn a o b) (_ : @Bet Tn A O B) (_ : @Le Tn o a O A) (_ : @Le Tn o b O B), @Le Tn a b A B *) intros. (* Goal: @Le Tn a b A B *) induction(eq_dec_points A O). (* Goal: @Le Tn a b A B *) (* Goal: @Le Tn a b A B *) treat_equalities; auto. (* Goal: @Le Tn a b A B *) (* Goal: @Le Tn a b A B *) assert (o=a). (* Goal: @Le Tn a b A B *) (* Goal: @Le Tn a b A B *) (* Goal: @eq (@Tpoint Tn) o a *) apply le_zero with A;auto. (* Goal: @Le Tn a b A B *) (* Goal: @Le Tn a b A B *) subst;auto. (* Goal: @Le Tn a b A B *) induction(eq_dec_points B O). (* Goal: @Le Tn a b A B *) (* Goal: @Le Tn a b A B *) treat_equalities;auto. (* Goal: @Le Tn a b A B *) (* Goal: @Le Tn a b A B *) assert (o=b). (* Goal: @Le Tn a b A B *) (* Goal: @Le Tn a b A B *) (* Goal: @eq (@Tpoint Tn) o b *) apply le_zero with B;auto. (* Goal: @Le Tn a b A B *) (* Goal: @Le Tn a b A B *) subst;auto using le_left_comm, le_right_comm. (* Goal: @Le Tn a b A B *) assert(HH:= segment_construction A O b o). (* Goal: @Le Tn a b A B *) ex_and HH b'. (* Goal: @Le Tn a b A B *) assert(HH:= segment_construction B O a o). (* Goal: @Le Tn a b A B *) ex_and HH a'. (* Goal: @Le Tn a b A B *) unfold Le in H1. (* Goal: @Le Tn a b A B *) ex_and H1 a''. (* Goal: @Le Tn a b A B *) assert(a' = a''). (* Goal: @Le Tn a b A B *) (* Goal: @eq (@Tpoint Tn) a' a'' *) { (* Goal: @eq (@Tpoint Tn) a' a'' *) apply(construction_uniqueness B O a o a' a'' H4); eBetween. (* Goal: @Cong Tn O a'' a o *) Cong. (* BG Goal: @Le Tn a b A B *) } (* Goal: @Le Tn a b A B *) treat_equalities. (* Goal: @Le Tn a b A B *) assert(Le B a' B A). (* Goal: @Le Tn a b A B *) (* Goal: @Le Tn B a' B A *) { (* Goal: @Le Tn B a' B A *) unfold Le. (* Goal: @ex (@Tpoint Tn) (fun E : @Tpoint Tn => and (@Bet Tn B E A) (@Cong Tn B a' B E)) *) exists a'. (* Goal: and (@Bet Tn B a' A) (@Cong Tn B a' B a') *) split; eBetween; Cong. (* BG Goal: @Le Tn a b A B *) } (* Goal: @Le Tn a b A B *) unfold Le in H2. (* Goal: @Le Tn a b A B *) ex_and H2 b''. (* Goal: @Le Tn a b A B *) assert(b' = b''). (* Goal: @Le Tn a b A B *) (* Goal: @eq (@Tpoint Tn) b' b'' *) { (* Goal: @eq (@Tpoint Tn) b' b'' *) apply(construction_uniqueness A O b o b' b'' H3); eBetween. (* Goal: @Cong Tn O b'' b o *) Cong. (* BG Goal: @Le Tn a b A B *) } (* Goal: @Le Tn a b A B *) treat_equalities. (* Goal: @Le Tn a b A B *) assert(Le a' b' a' B). (* Goal: @Le Tn a b A B *) (* Goal: @Le Tn a' b' a' B *) { (* Goal: @Le Tn a' b' a' B *) unfold Le. (* Goal: @ex (@Tpoint Tn) (fun E : @Tpoint Tn => and (@Bet Tn a' E B) (@Cong Tn a' b' a' E)) *) exists b'. (* Goal: and (@Bet Tn a' b' B) (@Cong Tn a' b' a' b') *) split; eBetween; Cong. (* BG Goal: @Le Tn a b A B *) } (* Goal: @Le Tn a b A B *) assert(Le a' b' A B). (* Goal: @Le Tn a b A B *) (* Goal: @Le Tn a' b' A B *) { (* Goal: @Le Tn a' b' A B *) apply(le_transitivity a' b' a' B A B); auto using le_left_comm, le_right_comm. (* BG Goal: @Le Tn a b A B *) } (* Goal: @Le Tn a b A B *) apply(l5_6 a' b' A B a b A B); Cong. (* Goal: @Cong Tn a' b' a b *) apply (l2_11 a' O b' a o b); eBetween; Cong. Qed. End T5. Hint Resolve le_reflexivity le_anti_symmetry le_trivial le_zero cong__le cong__le3412 le1221 le_left_comm le_right_comm le_comm lt__le bet__le1213 bet__le2313 lt_left_comm lt_right_comm lt_comm bet__lt1213 bet__lt2313 lt1123 : le. Ltac Le := auto with le.
From Coq Require Import ssreflect ssrbool ssrfun. From mathcomp Require Import ssrnat eqtype. From fcsl Require Import prelude pcm. Set Implicit Arguments. Unset Strict Implicit. Unset Printing Implicit Defensive. Module Unlifted. Record mixin_of (T : Type) := Mixin { ounit_op : T; ojoin_op : T -> T -> option T; ojoinC_op : forall x y, ojoin_op x y = ojoin_op y x; ojoinA_op : forall x y z, obind (ojoin_op x) (ojoin_op y z) = obind (ojoin_op^~ z) (ojoin_op x y); ounitL_op : forall x, ojoin_op ounit_op x = Some x}. Section ClassDef. Notation class_of := mixin_of (only parsing). 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 pack c := @Pack T c. Definition clone := fun c & cT -> T & phant_id (pack c) cT => pack c. Definition ounit := ounit_op class. Definition ojoin := ojoin_op class. End ClassDef. Module Exports. Coercion sort : type >-> Sortclass. Notation unlifted := type. Notation UnliftedMixin := Mixin. Notation Unlifted T m := (@pack T m). Notation "[ 'unliftedMixin' 'of' T ]" := (class _ : mixin_of T) (at level 0, format "[ 'unliftedMixin' 'of' T ]") : form_scope. Notation "[ 'unlifted' 'of' T 'for' C ]" := (@clone T C _ idfun id) (at level 0, format "[ 'unlifted' 'of' T 'for' C ]") : form_scope. Notation "[ 'unlifted' 'of' T ]" := (@clone T _ _ id id) (at level 0, format "[ 'unlifted' 'of' T ]") : form_scope. Notation ounit := ounit. Notation ojoin := ojoin. Arguments ounit [cT]. Lemma ojoinC (U : unlifted) (x y : U) : ojoin x y = ojoin y x. Proof. (* Goal: @eq (option (sort U)) (@Unlifted.ojoin U x y) (@Unlifted.ojoin U y x) *) by case: U x y=>T [ou oj ojC]. Qed. Lemma ojoinA (U : unlifted) (x y z : U) : obind (ojoin x) (ojoin y z) = obind (@ojoin U^~ z) (ojoin x y). Proof. (* Goal: @eq (option (sort U)) (@Option.bind (sort U) (sort U) (@Unlifted.ojoin U x) (@Unlifted.ojoin U y z)) (@Option.bind (sort U) (sort U) (fun x : sort U => @Unlifted.ojoin U x z) (@Unlifted.ojoin U x y)) *) by case: U x y z=>T [ou oj ojC ojA]. Qed. Lemma ounitL (U : unlifted) (x : U) : ojoin ounit x = Some x. Proof. (* Goal: @eq (option (sort U)) (@Unlifted.ojoin U (@Unlifted.ounit U) x) (@Some (sort U) x) *) by case: U x=>T [ou oj ojC ojA ojL]. Qed. End Exports. End Unlifted. Export Unlifted.Exports. Inductive lift A := down | up of A. Module Lift. Section Lift. Variable A : unlifted. Let unit := up (@ounit A). Let valid := [fun x : lift A => if x is up _ then true else false]. Let join := [fun x y : lift A => if (x, y) is (up v, up w) then if ojoin v w is Some u then up u else @down A else @down A]. Lemma joinC (x y : lift A) : join x y = join y x. Proof. (* Goal: @eq (lift (Unlifted.sort A)) (@fun_of_simpl (lift (Unlifted.sort A)) (lift (Unlifted.sort A)) (join x) y) (@fun_of_simpl (lift (Unlifted.sort A)) (lift (Unlifted.sort A)) (join y) x) *) by case: x y=>[|x][|y] //=; rewrite ojoinC. Qed. Lemma joinA (x y z : lift A) : join x (join y z) = join (join x y) z. Proof. (* Goal: @eq (lift (Unlifted.sort A)) (@fun_of_simpl (lift (Unlifted.sort A)) (lift (Unlifted.sort A)) (join x) (@fun_of_simpl (lift (Unlifted.sort A)) (lift (Unlifted.sort A)) (join y) z)) (@fun_of_simpl (lift (Unlifted.sort A)) (lift (Unlifted.sort A)) (join (@fun_of_simpl (lift (Unlifted.sort A)) (lift (Unlifted.sort A)) (join x) y)) z) *) case: x y z =>[|x][|y][|z] //=; first by case: (ojoin x y). (* Goal: @eq (lift (Unlifted.sort A)) match match @Unlifted.ojoin A y z with | Some u => @up (Unlifted.sort A) u | None => down (Unlifted.sort A) end with | @down _ => down (Unlifted.sort A) | up w => match @Unlifted.ojoin A x w with | Some u => @up (Unlifted.sort A) u | None => down (Unlifted.sort A) end end match match @Unlifted.ojoin A x y with | Some u => @up (Unlifted.sort A) u | None => down (Unlifted.sort A) end with | @down _ => down (Unlifted.sort A) | up v => match @Unlifted.ojoin A v z with | Some u => @up (Unlifted.sort A) u | None => down (Unlifted.sort A) end end *) case E1: (ojoin y z)=>[v1|]. (* Goal: @eq (lift (Unlifted.sort A)) (down (Unlifted.sort A)) match match @Unlifted.ojoin A x y with | Some u => @up (Unlifted.sort A) u | None => down (Unlifted.sort A) end with | @down _ => down (Unlifted.sort A) | up v => match @Unlifted.ojoin A v z with | Some u => @up (Unlifted.sort A) u | None => down (Unlifted.sort A) end end *) (* Goal: @eq (lift (Unlifted.sort A)) match @Unlifted.ojoin A x v1 with | Some u => @up (Unlifted.sort A) u | None => down (Unlifted.sort A) end match match @Unlifted.ojoin A x y with | Some u => @up (Unlifted.sort A) u | None => down (Unlifted.sort A) end with | @down _ => down (Unlifted.sort A) | up v => match @Unlifted.ojoin A v z with | Some u => @up (Unlifted.sort A) u | None => down (Unlifted.sort A) end end *) - (* Goal: @eq (lift (Unlifted.sort A)) (down (Unlifted.sort A)) match match @Unlifted.ojoin A x y with | Some u => @up (Unlifted.sort A) u | None => down (Unlifted.sort A) end with | @down _ => down (Unlifted.sort A) | up v => match @Unlifted.ojoin A v z with | Some u => @up (Unlifted.sort A) u | None => down (Unlifted.sort A) end end *) (* Goal: @eq (lift (Unlifted.sort A)) match @Unlifted.ojoin A x v1 with | Some u => @up (Unlifted.sort A) u | None => down (Unlifted.sort A) end match match @Unlifted.ojoin A x y with | Some u => @up (Unlifted.sort A) u | None => down (Unlifted.sort A) end with | @down _ => down (Unlifted.sort A) | up v => match @Unlifted.ojoin A v z with | Some u => @up (Unlifted.sort A) u | None => down (Unlifted.sort A) end end *) case E2: (ojoin x y)=>[v2|]; by move: (ojoinA x y z); rewrite E1 E2 /=; move=>->. (* Goal: @eq (lift (Unlifted.sort A)) (down (Unlifted.sort A)) match match @Unlifted.ojoin A x y with | Some u => @up (Unlifted.sort A) u | None => down (Unlifted.sort A) end with | @down _ => down (Unlifted.sort A) | up v => match @Unlifted.ojoin A v z with | Some u => @up (Unlifted.sort A) u | None => down (Unlifted.sort A) end end *) case E2: (ojoin x y)=>[v2|] //. (* Goal: @eq (lift (Unlifted.sort A)) (down (Unlifted.sort A)) match @Unlifted.ojoin A v2 z with | Some u => @up (Unlifted.sort A) u | None => down (Unlifted.sort A) end *) by move: (ojoinA x y z); rewrite E1 E2 /= =><-. Qed. Lemma unitL x : join unit x = x. Proof. (* Goal: @eq (lift (Unlifted.sort A)) (@fun_of_simpl (lift (Unlifted.sort A)) (lift (Unlifted.sort A)) (join unit) x) x *) by case: x=>[|x] //=; rewrite ounitL. Qed. Lemma validL x y : valid (join x y) -> valid x. Proof. (* Goal: forall _ : is_true (@fun_of_simpl (lift (Unlifted.sort A)) bool valid (@fun_of_simpl (lift (Unlifted.sort A)) (lift (Unlifted.sort A)) (join x) y)), is_true (@fun_of_simpl (lift (Unlifted.sort A)) bool valid x) *) by case: x y=>[|x][|y]. Qed. Lemma validU : valid unit. Proof. (* Goal: is_true (@fun_of_simpl (lift (Unlifted.sort A)) bool valid unit) *) by []. Qed. End Lift. Section LiftEqType. Variable A : eqType. Definition lift_eq (u v : lift A) := match u, v with up a, up b => a == b | down, down => true | _, _ => false end. Lemma lift_eqP : Equality.axiom lift_eq. Proof. (* Goal: @Equality.axiom (lift (Equality.sort A)) lift_eq *) case=>[|x][|y] /=; try by constructor. (* Goal: Bool.reflect (@eq (lift (Equality.sort A)) (@up (Equality.sort A) x) (@up (Equality.sort A) y)) (@eq_op A x y) *) by apply: (iffP eqP)=>[->|[]]. Qed. Definition liftEqMixin := EqMixin LiftEqType.lift_eqP. Canonical liftEqType := Eval hnf in EqType _ liftEqMixin. End LiftEqType. Module Exports. Arguments down [A]. Arguments up [A]. Canonical liftEqType. Section Exports. CoInductive lift_spec A (x : lift A) : lift A -> Type := | up_spec n of x = up n : lift_spec x (up n) | undef_spec of x = down : lift_spec x down. Lemma liftP A (x : lift A) : lift_spec x x. Proof. (* Goal: @lift_spec A x x *) by case: x=>[|a]; [apply: undef_spec | apply: up_spec]. Qed. Variable A : unlifted. Definition liftPCMMixin := PCMMixin (@Lift.joinC A) (@Lift.joinA A) (@Lift.unitL A) (@Lift.validL A) (@Lift.validU A). Canonical liftPCM := Eval hnf in PCM (lift A) liftPCMMixin. Lemma upE (a1 a2 : A) : up a1 \+ up a2 = if ojoin a1 a2 is Some a then up a else down. Proof. (* Goal: @eq (PCM.sort liftPCM) (@PCM.join liftPCM (@up (Unlifted.sort A) a1) (@up (Unlifted.sort A) a2)) match @Unlifted.ojoin A a1 a2 with | Some a => @up (Unlifted.sort A) a | None => @down (Unlifted.sort A) end *) by []. Qed. Lemma valid_down : valid (@down A) = false. Proof. (* Goal: @eq bool (@PCM.valid liftPCM (@down (Unlifted.sort A))) false *) by []. Qed. Lemma down_join (x : lift A) : down \+ x = down. Proof. (* Goal: @eq (PCM.sort liftPCM) (@PCM.join liftPCM (@down (Unlifted.sort A)) x) (@down (Unlifted.sort A)) *) by []. Qed. Lemma join_down (x : lift A) : x \+ down = down. Proof. (* Goal: @eq (PCM.sort liftPCM) (@PCM.join liftPCM x (@down (Unlifted.sort A))) (@down (Unlifted.sort A)) *) by case: x. Qed. Definition downE := (down_join, join_undef, valid_down). CoInductive liftjoin_spec (x y : lift A) : _ -> _ -> _ -> Type := | upcase1 n1 n2 of x = up n1 & y = up n2 : liftjoin_spec x y (if ojoin n1 n2 is Some u then up u else down) x y | invalid1 of ~~ valid (x \+ y) : liftjoin_spec x y down x y. Lemma liftPJ (x y : lift A) : liftjoin_spec x y (x \+ y) x y. Proof. (* Goal: liftjoin_spec x y (@PCM.join liftPCM x y) x y *) by case: x y=>[|x][|y]; rewrite ?downE; constructor. Qed. End Exports. End Exports. End Lift. Export Lift.Exports. Module NatUnlift. Local Definition ojoin (x y : nat) := Some (x + y). Local Definition ounit := 0. Lemma ojoinC x y : ojoin x y = ojoin y x. Lemma ojoinA x y z : obind (ojoin x) (ojoin y z) = obind (ojoin^~ z) (ojoin x y). Lemma ounitL x : ojoin ounit x = Some x. End NatUnlift. Definition natUnliftedMix := UnliftedMixin NatUnlift.ojoinC NatUnlift.ojoinA NatUnlift.ounitL. Canonical natUnlifted := Eval hnf in Unlifted nat natUnliftedMix. Lemma nxV (m1 m2 : lift natUnlifted) : valid (m1 \+ m2) -> exists n1 n2, m1 = up n1 /\ m2 = up n2. Proof. (* Goal: forall _ : is_true (@PCM.valid (liftPCM natUnlifted) (@PCM.join (liftPCM natUnlifted) m1 m2)), @ex (Unlifted.sort natUnlifted) (fun n1 : Unlifted.sort natUnlifted => @ex (Unlifted.sort natUnlifted) (fun n2 : Unlifted.sort natUnlifted => and (@eq (lift (Unlifted.sort natUnlifted)) m1 (@up (Unlifted.sort natUnlifted) n1)) (@eq (lift (Unlifted.sort natUnlifted)) m2 (@up (Unlifted.sort natUnlifted) n2)))) *) by case: m1=>// n1; case: m2=>// n2; exists n1, n2. Qed. Lemma nxE0 (n1 n2 : lift natUnlifted) : n1 \+ n2 = up 0 -> (n1 = up 0) * (n2 = up 0). Proof. (* Goal: forall _ : @eq (PCM.sort (liftPCM natUnlifted)) (@PCM.join (liftPCM natUnlifted) n1 n2) (@up nat O), prod (@eq (lift (Unlifted.sort natUnlifted)) n1 (@up nat O)) (@eq (lift (Unlifted.sort natUnlifted)) n2 (@up nat O)) *) case: n1 n2=>[|n1][|n2] //; rewrite upE /ojoin /=. (* Goal: forall _ : @eq (lift nat) (@up nat (addn n1 n2)) (@up nat O), prod (@eq (lift nat) (@up nat n1) (@up nat O)) (@eq (lift nat) (@up nat n2) (@up nat O)) *) by case=>/eqP; rewrite addn_eq0=>/andP [/eqP -> /eqP ->]. Qed.
Require Import mathcomp.ssreflect.ssreflect. From mathcomp Require Import ssrbool ssrfun eqtype ssrnat seq path fintype bigop. From mathcomp Require Import finset fingroup morphism automorphism quotient action. From mathcomp Require Import commutator center. Set Implicit Arguments. Unset Strict Implicit. Unset Printing Implicit Defensive. Import GroupScope. Section GroupDefs. Variable gT : finGroupType. Implicit Types A B U V : {set gT}. Local Notation groupT := (group_of (Phant gT)). Definition subnormal A B := (A \subset B) && (iter #|B| (fun N => generated (class_support A N)) B == A). Definition invariant_factor A B C := [&& A \subset 'N(B), A \subset 'N(C) & B <| C]. Definition group_rel_of (r : rel {set gT}) := [rel H G : groupT | r H G]. Definition stable_factor A V U := ([~: U, A] \subset V) && (V <| U). Definition central_factor A V U := [&& [~: U, A] \subset V, V \subset U & U \subset A]. Definition maximal A B := [max A of G | G \proper B]. Definition maximal_eq A B := (A == B) || maximal A B. Definition maxnormal A B U := [max A of G | G \proper B & U \subset 'N(G)]. Definition minnormal A B := [min A of G | G :!=: 1 & B \subset 'N(G)]. Definition simple A := minnormal A A. Definition chief_factor A V U := maxnormal V U A && (U <| A). End GroupDefs. Arguments subnormal {gT} A%g B%g. Arguments invariant_factor {gT} A%g B%g C%g. Arguments stable_factor {gT} A%g V%g U%g. Arguments central_factor {gT} A%g V%g U%g. Arguments maximal {gT} A%g B%g. Arguments maximal_eq {gT} A%g B%g. Arguments maxnormal {gT} A%g B%g U%g. Arguments minnormal {gT} A%g B%g. Arguments simple {gT} A%g. Arguments chief_factor {gT} A%g V%g U%g. Notation "H <|<| G" := (subnormal H G) (at level 70, no associativity) : group_scope. Notation "A .-invariant" := (invariant_factor A) (at level 2, format "A .-invariant") : group_rel_scope. Notation "A .-stable" := (stable_factor A) (at level 2, format "A .-stable") : group_rel_scope. Notation "A .-central" := (central_factor A) (at level 2, format "A .-central") : group_rel_scope. Notation "G .-chief" := (chief_factor G) (at level 2, format "G .-chief") : group_rel_scope. Arguments group_rel_of {gT} r%group_rel_scope _%G _%G : extra scopes. Notation "r .-series" := (path (rel_of_simpl_rel (group_rel_of r))) (at level 2, format "r .-series") : group_scope. Section Subnormal. Variable gT : finGroupType. Implicit Types (A B C D : {set gT}) (G H K : {group gT}). Let setIgr H G := (G :&: H)%G. Let sub_setIgr G H : G \subset H -> G = setIgr 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 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)))), @eq (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) G (setIgr H G) *) by move/setIidPl/group_inj. Qed. Let path_setIgr H G s : normal.-series H s -> normal.-series (setIgr G H) (map (setIgr G) s). Proof. (* Goal: forall _ : is_true (@path (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@rel_of_simpl_rel (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@group_rel_of gT (@normal gT))) H s), is_true (@path (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@rel_of_simpl_rel (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@group_rel_of gT (@normal gT))) (setIgr G H) (@map (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (setIgr G) s)) *) elim: s H => //= K s IHs H /andP[/andP[sHK nHK] Ksn]. (* Goal: is_true (andb (@normal gT (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@gval gT G)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K) (@gval gT G))) (@path (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@rel_of_simpl_rel (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@group_rel_of gT (@normal gT))) (setIgr G K) (@map (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (setIgr G) s))) *) by rewrite /normal setSI ?normsIG ?IHs. Qed. Lemma subnormalP H G : reflect (exists2 s, normal.-series H s & last H s = G) (H <|<| G). Proof. (* Goal: Bool.reflect (@ex2 (list (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))))) (fun s : list (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) => is_true (@path (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@rel_of_simpl_rel (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@group_rel_of gT (@normal gT))) H s)) (fun s : list (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) => @eq (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@last (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) H s) G)) (@subnormal gT (@gval gT H) (@gval gT G)) *) apply: (iffP andP) => [[sHG snHG] | [s Hsn <-{G}]]. (* Goal: and (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 (@last (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) H s)))))) (is_true (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@iter (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@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 (@last (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) H s))))) (fun N : @set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT))) => @generated gT (@class_support gT (@gval gT H) N)) (@gval gT (@last (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) H s))) (@gval gT H))) *) (* Goal: @ex2 (list (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))))) (fun s : list (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) => is_true (@path (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@rel_of_simpl_rel (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@group_rel_of gT (@normal gT))) H s)) (fun s : list (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) => @eq (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@last (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) H s) G) *) elim: {G}#|G| {-2}G sHG snHG => [|m IHm] G sHG. (* Goal: and (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 (@last (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) H s)))))) (is_true (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@iter (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@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 (@last (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) H s))))) (fun N : @set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT))) => @generated gT (@class_support gT (@gval gT H) N)) (@gval gT (@last (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) H s))) (@gval gT H))) *) (* Goal: forall _ : is_true (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@iter (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (S m) (fun N : @set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT))) => @generated gT (@class_support gT (@gval gT H) N)) (@gval gT G)) (@gval gT H)), @ex2 (list (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))))) (fun s : list (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) => is_true (@path (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@rel_of_simpl_rel (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@group_rel_of gT (@normal gT))) H s)) (fun s : list (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) => @eq (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@last (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) H s) G) *) (* Goal: forall _ : is_true (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@iter (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) O (fun N : @set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT))) => @generated gT (@class_support gT (@gval gT H) N)) (@gval gT G)) (@gval gT H)), @ex2 (list (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))))) (fun s : list (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) => is_true (@path (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@rel_of_simpl_rel (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@group_rel_of gT (@normal gT))) H s)) (fun s : list (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) => @eq (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@last (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) H s) G) *) by exists [::]; last by apply/eqP; rewrite eq_sym. (* Goal: and (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 (@last (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) H s)))))) (is_true (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@iter (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@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 (@last (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) H s))))) (fun N : @set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT))) => @generated gT (@class_support gT (@gval gT H) N)) (@gval gT (@last (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) H s))) (@gval gT H))) *) (* Goal: forall _ : is_true (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@iter (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (S m) (fun N : @set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT))) => @generated gT (@class_support gT (@gval gT H) N)) (@gval gT G)) (@gval gT H)), @ex2 (list (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))))) (fun s : list (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) => is_true (@path (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@rel_of_simpl_rel (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@group_rel_of gT (@normal gT))) H s)) (fun s : list (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) => @eq (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@last (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) H s) G) *) rewrite iterSr => /IHm[|s Hsn defG]. (* Goal: and (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 (@last (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) H s)))))) (is_true (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@iter (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@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 (@last (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) H s))))) (fun N : @set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT))) => @generated gT (@class_support gT (@gval gT H) N)) (@gval gT (@last (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) H s))) (@gval gT H))) *) (* Goal: @ex2 (list (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))))) (fun s : list (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) => is_true (@path (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@rel_of_simpl_rel (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@group_rel_of gT (@normal gT))) H s)) (fun s : list (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) => @eq (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@last (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) H s) 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)) (@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 (@generated_group gT (@class_support gT (@gval gT H) (@gval gT G))))))) *) by rewrite sub_gen // class_supportEr (bigD1 1) //= conjsg1 subsetUl. (* Goal: and (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 (@last (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) H s)))))) (is_true (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@iter (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@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 (@last (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) H s))))) (fun N : @set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT))) => @generated gT (@class_support gT (@gval gT H) N)) (@gval gT (@last (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) H s))) (@gval gT H))) *) (* Goal: @ex2 (list (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))))) (fun s : list (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) => is_true (@path (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@rel_of_simpl_rel (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@group_rel_of gT (@normal gT))) H s)) (fun s : list (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) => @eq (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@last (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) H s) G) *) exists (rcons s G); rewrite ?last_rcons // -cats1 cat_path Hsn defG /=. (* Goal: and (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 (@last (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) H s)))))) (is_true (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@iter (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@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 (@last (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) H s))))) (fun N : @set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT))) => @generated gT (@class_support gT (@gval gT H) N)) (@gval gT (@last (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) H s))) (@gval gT H))) *) (* Goal: is_true (andb (@normal gT (@generated gT (@class_support gT (@gval gT H) (@gval gT G))) (@gval gT G)) true) *) rewrite /normal gen_subG class_support_subG //=. (* Goal: and (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 (@last (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) H s)))))) (is_true (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@iter (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@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 (@last (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) H s))))) (fun N : @set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT))) => @generated gT (@class_support gT (@gval gT H) N)) (@gval gT (@last (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) H s))) (@gval gT H))) *) (* Goal: is_true (andb (@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)) (@normaliser gT (@generated gT (@class_support gT (@gval gT H) (@gval gT G))))))) true) *) by rewrite norms_gen ?class_support_norm. (* Goal: and (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 (@last (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) H s)))))) (is_true (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@iter (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@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 (@last (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) H s))))) (fun N : @set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT))) => @generated gT (@class_support gT (@gval gT H) N)) (@gval gT (@last (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) H s))) (@gval gT H))) *) set f := fun _ => <<_>>; have idf: iter _ f H == H. (* Goal: and (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 (@last (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) H s)))))) (is_true (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@iter (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@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 (@last (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) H s))))) f (@gval gT (@last (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) H s))) (@gval gT H))) *) (* Goal: forall n : nat, is_true (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@iter (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) n f (@gval gT H)) (@gval gT H)) *) by elim=> //= m IHm; rewrite (eqP IHm) /f class_support_id genGid. (* Goal: and (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 (@last (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) H s)))))) (is_true (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@iter (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@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 (@last (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) H s))))) f (@gval gT (@last (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) H s))) (@gval gT H))) *) elim: {s}(size s) {-2}s (eqxx (size s)) Hsn => [[] //= | m IHm s]. (* Goal: forall (_ : is_true (@eq_op nat_eqType (@size (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) s) (S m))) (_ : is_true (@path (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@rel_of_simpl_rel (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@group_rel_of gT (@normal gT))) H s)), and (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 (@last (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) H s)))))) (is_true (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@iter (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@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 (@last (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) H s))))) f (@gval gT (@last (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) H s))) (@gval gT H))) *) case/lastP: s => // s G; rewrite size_rcons last_rcons -cats1 cat_path /=. (* Goal: forall (_ : is_true (@eq_op nat_eqType (S (@size (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) s)) (S m))) (_ : is_true (andb (@path (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@rel_of_simpl_rel (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@group_rel_of gT (@normal gT))) H s) (andb (@normal gT (@gval gT (@last (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) H s)) (@gval gT G)) true))), and (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)) (@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)) (@gval gT G))))) (is_true (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@iter (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (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)) (@gval gT G)))) f (@gval gT G)) (@gval gT H))) *) set K := last H s => def_m /and3P[Hsn /andP[sKG nKG] _]. (* Goal: and (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)) (@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)) (@gval gT G))))) (is_true (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@iter (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (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)) (@gval gT G)))) f (@gval gT G)) (@gval gT H))) *) have:= sKG; rewrite subEproper; case/predU1P=> [<-|prKG]; first exact: IHm. (* Goal: and (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)) (@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)) (@gval gT G))))) (is_true (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@iter (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (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)) (@gval gT G)))) f (@gval gT G)) (@gval gT H))) *) pose L := [group of f G]. (* Goal: and (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)) (@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)) (@gval gT G))))) (is_true (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@iter (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (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)) (@gval gT G)))) f (@gval gT G)) (@gval gT H))) *) have sHK: H \subset K by case/IHm: Hsn. (* Goal: and (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)) (@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)) (@gval gT G))))) (is_true (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@iter (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (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)) (@gval gT G)))) f (@gval gT G)) (@gval gT H))) *) have sLK: L \subset K by rewrite gen_subG class_support_sub_norm. (* Goal: and (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)) (@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)) (@gval gT G))))) (is_true (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@iter (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (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)) (@gval gT G)))) f (@gval gT G)) (@gval gT H))) *) rewrite -(subnK (proper_card (sub_proper_trans sLK prKG))) iter_add iterSr. (* Goal: and (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)) (@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)) (@gval gT G))))) (is_true (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@iter (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (subn (@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 (@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 L)))))) f (@iter (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@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 L)))) f (f (@gval gT G)))) (@gval gT H))) *) have defH: H = setIgr L H by rewrite -sub_setIgr ?sub_gen ?sub_class_support. (* Goal: and (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)) (@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)) (@gval gT G))))) (is_true (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@iter (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (subn (@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 (@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 L)))))) f (@iter (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@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 L)))) f (f (@gval gT G)))) (@gval gT H))) *) have: normal.-series H (map (setIgr L) s) by rewrite defH path_setIgr. (* Goal: forall _ : is_true (@path (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@rel_of_simpl_rel (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@group_rel_of gT (@normal gT))) H (@map (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (setIgr L) s)), and (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)) (@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)) (@gval gT G))))) (is_true (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@iter (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (subn (@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 (@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 L)))))) f (@iter (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@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 L)))) f (f (@gval gT G)))) (@gval gT H))) *) case/IHm=> [|_]; first by rewrite size_map. (* Goal: forall _ : is_true (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@iter (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@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 (@last (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) H (@map (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (setIgr L) s)))))) f (@gval gT (@last (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) H (@map (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (setIgr L) s)))) (@gval gT H)), and (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)) (@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)) (@gval gT G))))) (is_true (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@iter (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (subn (@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 (@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 L)))))) f (@iter (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@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 L)))) f (f (@gval gT G)))) (@gval gT H))) *) by rewrite {1 2}defH last_map (subset_trans sHK) //= (setIidPr sLK) => /eqP->. Qed. Lemma subnormal_refl G : G <|<| G. Proof. (* Goal: is_true (@subnormal gT (@gval gT G) (@gval gT G)) *) by apply/subnormalP; exists [::]. Qed. Lemma subnormal_trans K H G : H <|<| K -> K <|<| G -> H <|<| G. Proof. (* Goal: forall (_ : is_true (@subnormal gT (@gval gT H) (@gval gT K))) (_ : is_true (@subnormal gT (@gval gT K) (@gval gT G))), is_true (@subnormal gT (@gval gT H) (@gval gT G)) *) case/subnormalP=> [s1 Hs1 <-] /subnormalP[s2 Hs12 <-]. (* Goal: is_true (@subnormal gT (@gval gT H) (@gval gT (@last (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@last (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) H s1) s2))) *) by apply/subnormalP; exists (s1 ++ s2); rewrite ?last_cat // cat_path Hs1. Qed. Lemma normal_subnormal H G : H <| G -> H <|<| G. Proof. (* Goal: forall _ : is_true (@normal gT (@gval gT H) (@gval gT G)), is_true (@subnormal gT (@gval gT H) (@gval gT G)) *) by move=> nsHG; apply/subnormalP; exists [:: G]; rewrite //= nsHG. Qed. Lemma setI_subnormal G H K : K \subset G -> H <|<| G -> H :&: K <|<| K. Lemma subnormal_sub G H : H <|<| G -> H \subset G. Proof. (* Goal: forall _ : is_true (@subnormal 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)) (@gval gT G)))) *) by case/andP. Qed. Lemma invariant_subnormal A G H : A \subset 'N(G) -> A \subset 'N(H) -> H <|<| G -> exists2 s, (A.-invariant).-series H s & last H s = 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)) (@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)) 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 (@subnormal gT (@gval gT H) (@gval gT G))), @ex2 (list (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))))) (fun s : list (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) => is_true (@path (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@rel_of_simpl_rel (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@group_rel_of gT (@invariant_factor gT A))) H s)) (fun s : list (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) => @eq (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@last (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) H s) G) *) move=> nGA nHA /andP[]; move: #|G| => m. (* 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 (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@iter (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) m (fun N : @set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT))) => @generated gT (@class_support gT (@gval gT H) N)) (@gval gT G)) (@gval gT H))), @ex2 (list (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))))) (fun s : list (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) => is_true (@path (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@rel_of_simpl_rel (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@group_rel_of gT (@invariant_factor gT A))) H s)) (fun s : list (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) => @eq (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@last (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) H s) G) *) elim: m => [|m IHm] in G nGA * => sHG. (* Goal: forall _ : is_true (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@iter (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (S m) (fun N : @set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT))) => @generated gT (@class_support gT (@gval gT H) N)) (@gval gT G)) (@gval gT H)), @ex2 (list (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))))) (fun s : list (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) => is_true (@path (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@rel_of_simpl_rel (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@group_rel_of gT (@invariant_factor gT A))) H s)) (fun s : list (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) => @eq (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@last (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) H s) G) *) (* Goal: forall _ : is_true (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@iter (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) O (fun N : @set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT))) => @generated gT (@class_support gT (@gval gT H) N)) (@gval gT G)) (@gval gT H)), @ex2 (list (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))))) (fun s : list (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) => is_true (@path (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@rel_of_simpl_rel (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@group_rel_of gT (@invariant_factor gT A))) H s)) (fun s : list (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) => @eq (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@last (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) H s) G) *) by rewrite eq_sym; exists [::]; last apply/eqP. (* Goal: forall _ : is_true (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@iter (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (S m) (fun N : @set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT))) => @generated gT (@class_support gT (@gval gT H) N)) (@gval gT G)) (@gval gT H)), @ex2 (list (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))))) (fun s : list (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) => is_true (@path (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@rel_of_simpl_rel (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@group_rel_of gT (@invariant_factor gT A))) H s)) (fun s : list (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) => @eq (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@last (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) H s) G) *) rewrite iterSr; set K := <<_>>. (* Goal: forall _ : is_true (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@iter (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) m (fun N : @set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT))) => @generated gT (@class_support gT (@gval gT H) N)) K) (@gval gT H)), @ex2 (list (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))))) (fun s : list (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) => is_true (@path (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@rel_of_simpl_rel (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@group_rel_of gT (@invariant_factor gT A))) H s)) (fun s : list (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) => @eq (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@last (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) H s) G) *) have nKA: A \subset 'N(K) by rewrite norms_gen ?norms_class_support. (* Goal: forall _ : is_true (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@iter (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) m (fun N : @set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT))) => @generated gT (@class_support gT (@gval gT H) N)) K) (@gval gT H)), @ex2 (list (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))))) (fun s : list (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) => is_true (@path (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@rel_of_simpl_rel (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@group_rel_of gT (@invariant_factor gT A))) H s)) (fun s : list (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) => @eq (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@last (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) H s) G) *) have sHK: H \subset K by rewrite sub_gen ?sub_class_support. (* Goal: forall _ : is_true (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@iter (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) m (fun N : @set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT))) => @generated gT (@class_support gT (@gval gT H) N)) K) (@gval gT H)), @ex2 (list (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))))) (fun s : list (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) => is_true (@path (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@rel_of_simpl_rel (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@group_rel_of gT (@invariant_factor gT A))) H s)) (fun s : list (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) => @eq (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@last (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) H s) G) *) case/IHm=> // s Hsn defK; exists (rcons s G); last by rewrite last_rcons. (* Goal: is_true (@path (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@rel_of_simpl_rel (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@group_rel_of gT (@invariant_factor gT A))) H (@rcons (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) s G)) *) rewrite rcons_path Hsn !andbA defK nGA nKA /= -/K. (* Goal: is_true (andb (@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)) 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)) (@gval gT G)))) (@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)) (@normaliser gT K))))) *) by rewrite gen_subG class_support_subG ?norms_gen ?class_support_norm. Qed. Lemma subnormalEsupport G H : H <|<| G -> H :=: G \/ <<class_support H G>> \proper G. Proof. (* Goal: forall _ : is_true (@subnormal gT (@gval gT H) (@gval gT G)), or (@eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@gval gT H) (@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)) (@generated gT (@class_support 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)) (@gval gT G))))) *) case/andP=> sHG; set K := <<_>> => /eqP <-. (* Goal: or (@eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@iter (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@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 N : @set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT))) => @generated gT (@class_support gT (@gval gT H) N)) (@gval gT G)) (@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)) 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))))) *) have: K \subset G by rewrite gen_subG class_support_subG. (* 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)) 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)))), or (@eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@iter (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@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 N : @set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT))) => @generated gT (@class_support gT (@gval gT H) N)) (@gval gT G)) (@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)) 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))))) *) rewrite subEproper; case/predU1P=> [defK|]; [left | by right]. (* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@iter (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@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 N : @set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT))) => @generated gT (@class_support gT (@gval gT H) N)) (@gval gT G)) (@gval gT G) *) by elim: #|G| => //= _ ->. Qed. Lemma subnormalEr G H : H <|<| G -> H :=: G \/ (exists K : {group gT}, [/\ H <|<| K, K <| G & K \proper G]). Proof. (* Goal: forall _ : is_true (@subnormal gT (@gval gT H) (@gval gT G)), or (@eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@gval gT H) (@gval gT G)) (@ex (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun K : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => and3 (is_true (@subnormal gT (@gval gT H) (@gval gT K))) (is_true (@normal gT (@gval gT K) (@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 G))))))) *) case/subnormalP=> s Hs <-{G}. (* Goal: or (@eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@gval gT H) (@gval gT (@last (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) H s))) (@ex (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun K : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => and3 (is_true (@subnormal gT (@gval gT H) (@gval gT K))) (is_true (@normal gT (@gval gT K) (@gval gT (@last (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) H s)))) (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 (@last (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) H s)))))))) *) elim/last_ind: s Hs => [|s G IHs]; first by left. (* Goal: forall _ : is_true (@path (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@rel_of_simpl_rel (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@group_rel_of gT (@normal gT))) H (@rcons (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) s G)), or (@eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@gval gT H) (@gval gT (@last (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) H (@rcons (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) s G)))) (@ex (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun K : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => and3 (is_true (@subnormal gT (@gval gT H) (@gval gT K))) (is_true (@normal gT (@gval gT K) (@gval gT (@last (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) H (@rcons (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) s 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 (@last (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) H (@rcons (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) s G))))))))) *) rewrite last_rcons -cats1 cat_path /= andbT; set K := last H s. (* Goal: forall _ : is_true (andb (@path (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@rel_of_simpl_rel (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@group_rel_of gT (@normal gT))) H s) (@normal gT (@gval gT K) (@gval gT G))), or (@eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@gval gT H) (@gval gT G)) (@ex (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun K : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => and3 (is_true (@subnormal gT (@gval gT H) (@gval gT K))) (is_true (@normal gT (@gval gT K) (@gval gT G))) (is_true (@proper (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))) (@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))))))) *) case/andP=> Hs nsKG; have:= normal_sub nsKG; rewrite subEproper. (* Goal: forall _ : is_true (orb (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@gval gT K) (@gval gT G)) (@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))))), or (@eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@gval gT H) (@gval gT G)) (@ex (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun K : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => and3 (is_true (@subnormal gT (@gval gT H) (@gval gT K))) (is_true (@normal gT (@gval gT K) (@gval gT G))) (is_true (@proper (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))) (@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))))))) *) case/predU1P=> [<- | prKG]; [exact: IHs | right; exists K; split=> //]. (* Goal: is_true (@subnormal gT (@gval gT H) (@gval gT K)) *) by apply/subnormalP; exists s. Qed. Lemma subnormalEl G H : H <|<| G -> H :=: G \/ (exists K : {group gT}, [/\ H <| K, K <|<| G & H \proper K]). Proof. (* Goal: forall _ : is_true (@subnormal gT (@gval gT H) (@gval gT G)), or (@eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@gval gT H) (@gval gT G)) (@ex (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun K : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => and3 (is_true (@normal gT (@gval gT H) (@gval gT K))) (is_true (@subnormal gT (@gval gT K) (@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 K))))))) *) case/subnormalP=> s Hs <-{G}; elim: s H Hs => /= [|K s IHs] H; first by left. (* Goal: forall _ : is_true (andb (@normal gT (@gval gT H) (@gval gT K)) (@path (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@rel_of_simpl_rel (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@group_rel_of gT (@normal gT))) K s)), or (@eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@gval gT H) (@gval gT (@last (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) K s))) (@ex (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun K0 : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => and3 (is_true (@normal gT (@gval gT H) (@gval gT K0))) (is_true (@subnormal gT (@gval gT K0) (@gval gT (@last (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) K s)))) (is_true (@proper (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)) (@gval gT K0))))))) *) case/andP=> nsHK Ks; have:= normal_sub nsHK; rewrite subEproper. (* Goal: forall _ : is_true (orb (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@gval gT H) (@gval gT K)) (@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 K))))), or (@eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@gval gT H) (@gval gT (@last (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) K s))) (@ex (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun K0 : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => and3 (is_true (@normal gT (@gval gT H) (@gval gT K0))) (is_true (@subnormal gT (@gval gT K0) (@gval gT (@last (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) K s)))) (is_true (@proper (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)) (@gval gT K0))))))) *) case/predU1P=> [-> | prHK]; [exact: IHs | right; exists K; split=> //]. (* Goal: is_true (@subnormal gT (@gval gT K) (@gval gT (@last (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) K s))) *) by apply/subnormalP; exists s. Qed. End Subnormal. Arguments subnormalP {gT H G}. Section MorphSubNormal. Variable gT : finGroupType. Implicit Type G H K : {group gT}. Lemma morphim_subnormal (rT : finGroupType) G (f : {morphism G >-> rT}) H K : H <|<| K -> f @* H <|<| f @* K. Lemma quotient_subnormal H G K : G <|<| K -> G / H <|<| K / H. Proof. (* Goal: forall _ : is_true (@subnormal gT (@gval gT G) (@gval gT K)), is_true (@subnormal (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)) (@quotient gT (@gval gT K) (@gval gT H))) *) exact: morphim_subnormal. Qed. End MorphSubNormal. Section MaxProps. Variable gT : finGroupType. Implicit Types G H M : {group gT}. Lemma maximal_eqP M G : reflect (M \subset G /\ forall H, M \subset H -> H \subset G -> H :=: M \/ H :=: G) (maximal_eq M G). Proof. (* Goal: Bool.reflect (and (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 M))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (forall (H : @group_of gT (Phant (FinGroup.arg_sort (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 M))) (@mem (Finite.sort (FinGroup.arg_finType (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))))), or (@eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@gval gT H) (@gval gT M)) (@eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@gval gT H) (@gval gT G)))) (@maximal_eq gT (@gval gT M) (@gval gT G)) *) rewrite subEproper /maximal_eq; case: eqP => [->|_]; first left. (* Goal: Bool.reflect (and (is_true (orb false (@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 M))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (forall (H : @group_of gT (Phant (FinGroup.arg_sort (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 M))) (@mem (Finite.sort (FinGroup.arg_finType (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))))), or (@eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@gval gT H) (@gval gT M)) (@eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@gval gT H) (@gval gT G)))) (orb false (@maximal gT (@gval gT M) (@gval gT G))) *) (* Goal: and (is_true (orb 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 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)))))) (forall (H : @group_of gT (Phant (FinGroup.arg_sort (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 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))))), or (@eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base 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))))) (@gval gT H) (@gval gT G))) *) by split=> // H sGH sHG; right; apply/eqP; rewrite eqEsubset sHG. (* Goal: Bool.reflect (and (is_true (orb false (@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 M))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (forall (H : @group_of gT (Phant (FinGroup.arg_sort (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 M))) (@mem (Finite.sort (FinGroup.arg_finType (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))))), or (@eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@gval gT H) (@gval gT M)) (@eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@gval gT H) (@gval gT G)))) (orb false (@maximal gT (@gval gT M) (@gval gT G))) *) apply: (iffP maxgroupP) => [] [sMG maxM]; split=> // H. (* Goal: forall (_ : 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))))) (_ : 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 M))) (@mem (Finite.sort (FinGroup.arg_finType (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 (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@gval gT H) (@gval gT M) *) (* 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 M))) (@mem (Finite.sort (FinGroup.arg_finType (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))))), or (@eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@gval gT H) (@gval gT M)) (@eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@gval gT H) (@gval gT G)) *) by move/maxM=> maxMH; rewrite subEproper; case/predU1P; auto. (* Goal: forall (_ : 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))))) (_ : 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 M))) (@mem (Finite.sort (FinGroup.arg_finType (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 (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@gval gT H) (@gval gT M) *) by rewrite properEneq => /andP[/eqP neHG sHG] /maxM[]. Qed. Lemma maximal_exists H G : H \subset G -> H :=: G \/ (exists2 M : {group gT}, maximal M G & H \subset M). 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)))), or (@eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@gval gT H) (@gval gT G)) (@ex2 (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun M : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => is_true (@maximal gT (@gval gT M) (@gval gT G))) (fun M : @group_of gT (Phant (FinGroup.arg_sort (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 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 M)))))) *) rewrite subEproper; case/predU1P=> sHG; first by left. (* Goal: or (@eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@gval gT H) (@gval gT G)) (@ex2 (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun M : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => is_true (@maximal gT (@gval gT M) (@gval gT G))) (fun M : @group_of gT (Phant (FinGroup.arg_sort (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 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 M)))))) *) suff [M *]: {M : {group gT} | maximal M G & H \subset M} by right; exists M. (* Goal: @sig2 (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun M : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => is_true (@maximal gT (@gval gT M) (@gval gT G))) (fun M : @group_of gT (Phant (FinGroup.arg_sort (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 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 M))))) *) exact: maxgroup_exists. Qed. Lemma mulg_normal_maximal G M H : M <| G -> maximal M G -> H \subset G -> ~~ (H \subset M) -> (M * H = G)%g. Proof. (* Goal: forall (_ : is_true (@normal gT (@gval gT M) (@gval gT G))) (_ : is_true (@maximal gT (@gval gT M) (@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)) (@gval gT G))))) (_ : is_true (negb (@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 M)))))), @eq (FinGroup.sort (group_set_of_baseGroupType (FinGroup.base gT))) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@gval gT M) (@gval gT H)) (@gval gT G) *) case/andP=> sMG nMG /maxgroupP[_ maxM] sHG not_sHM. (* Goal: @eq (FinGroup.sort (group_set_of_baseGroupType (FinGroup.base gT))) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@gval gT M) (@gval gT H)) (@gval gT G) *) apply/eqP; rewrite eqEproper mul_subG // -norm_joinEr ?(subset_trans sHG) //. (* Goal: is_true (andb true (negb (@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)) (@joing gT (@gval gT M) (@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)))))) *) by apply: contra not_sHM => /maxM <-; rewrite ?joing_subl ?joing_subr. Qed. End MaxProps. Section MinProps. Variable gT : finGroupType. Implicit Types G H M : {group gT}. Lemma minnormal_exists G H : H :!=: 1 -> G \subset 'N(H) -> {M : {group gT} | minnormal M G & M \subset H}. Proof. (* Goal: forall (_ : 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 (@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)))))), @sig2 (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun M : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => is_true (@minnormal gT (@gval gT M) (@gval gT G))) (fun M : @group_of gT (Phant (FinGroup.arg_sort (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 M))) (@mem (Finite.sort (FinGroup.arg_finType (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=> ntH nHG; apply: mingroup_exists (H) _; rewrite ntH. Qed. End MinProps. Section MorphPreMax. Variables (gT rT : finGroupType) (D : {group gT}) (f : {morphism D >-> rT}). Variables (M G : {group rT}). Hypotheses (dM : M \subset f @* D) (dG : G \subset f @* D). Lemma morphpre_maximal : maximal (f @*^-1 M) (f @*^-1 G) = maximal M G. Proof. (* Goal: @eq bool (@maximal gT (@morphpre gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval rT M)) (@morphpre gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval rT G))) (@maximal rT (@gval rT M) (@gval rT G)) *) apply/maxgroupP/maxgroupP; rewrite morphpre_proper //= => [] [ltMG maxM]. (* Goal: and (is_true (@proper (FinGroup.arg_finType (FinGroup.base rT)) (@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 M))) (@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 G))))) (forall (H : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (_ : is_true (@proper (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)) (@morphpre gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval rT G)))))) (_ : 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)) (@morphpre gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval rT M)))) (@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))))), @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@gval gT H) (@morphpre gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval rT M))) *) (* Goal: and (is_true (@proper (FinGroup.arg_finType (FinGroup.base rT)) (@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 M))) (@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 G))))) (forall (H : @group_of rT (Phant (FinGroup.arg_sort (FinGroup.base rT)))) (_ : is_true (@proper (FinGroup.arg_finType (FinGroup.base rT)) (@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 H))) (@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 G))))) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base rT)) (@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 M))) (@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 H))))), @eq (@set_of (FinGroup.arg_finType (FinGroup.base rT)) (Phant (FinGroup.arg_sort (FinGroup.base rT)))) (@gval rT H) (@gval rT M)) *) split=> // H ltHG sMH; have dH := subset_trans (proper_sub ltHG) dG. (* Goal: and (is_true (@proper (FinGroup.arg_finType (FinGroup.base rT)) (@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 M))) (@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 G))))) (forall (H : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (_ : is_true (@proper (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)) (@morphpre gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval rT G)))))) (_ : 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)) (@morphpre gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval rT M)))) (@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))))), @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@gval gT H) (@morphpre gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval rT M))) *) (* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base rT)) (Phant (FinGroup.arg_sort (FinGroup.base rT)))) (@gval rT H) (@gval rT M) *) rewrite -(morphpreK dH) [f @*^-1 H]maxM ?morphpreK ?morphpreSK //. (* Goal: and (is_true (@proper (FinGroup.arg_finType (FinGroup.base rT)) (@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 M))) (@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 G))))) (forall (H : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (_ : is_true (@proper (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)) (@morphpre gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval rT G)))))) (_ : 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)) (@morphpre gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval rT M)))) (@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))))), @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@gval gT H) (@morphpre gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval rT M))) *) (* Goal: is_true (@proper (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 (@morphpre_group gT rT D f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) 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)) (@morphpre gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval rT G))))) *) by rewrite morphpre_proper. (* Goal: and (is_true (@proper (FinGroup.arg_finType (FinGroup.base rT)) (@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 M))) (@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 G))))) (forall (H : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (_ : is_true (@proper (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)) (@morphpre gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval rT G)))))) (_ : 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)) (@morphpre gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval rT M)))) (@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))))), @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@gval gT H) (@morphpre gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval rT M))) *) split=> // H ltHG sMH. (* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@gval gT H) (@morphpre gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval rT M)) *) have dH: H \subset D := subset_trans (proper_sub ltHG) (subsetIl D _). (* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@gval gT H) (@morphpre gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval rT M)) *) have defH: f @*^-1 (f @* H) = H. (* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@gval gT H) (@morphpre gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval rT M)) *) (* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@morphpre gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT H))) (@gval gT H) *) by apply: morphimGK dH; apply: subset_trans sMH; apply: ker_sub_pre. (* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@gval gT H) (@morphpre gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval rT M)) *) rewrite -defH morphpre_proper ?morphimS // in ltHG. (* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@gval gT H) (@morphpre gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval rT M)) *) by rewrite -defH [f @* H]maxM // -(morphpreK dM) morphimS. Qed. Lemma morphpre_maximal_eq : maximal_eq (f @*^-1 M) (f @*^-1 G) = maximal_eq M G. Proof. (* Goal: @eq bool (@maximal_eq gT (@morphpre gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval rT M)) (@morphpre gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval rT G))) (@maximal_eq rT (@gval rT M) (@gval rT G)) *) by rewrite /maximal_eq morphpre_maximal !eqEsubset !morphpreSK. Qed. End MorphPreMax. Section InjmMax. Variables (gT rT : finGroupType) (D : {group gT}) (f : {morphism D >-> rT}). Variables M G L : {group gT}. Hypothesis injf : 'injm f. Hypotheses (dM : M \subset D) (dG : G \subset D) (dL : L \subset D). Lemma injm_maximal : maximal (f @* M) (f @* G) = maximal M G. Proof. (* Goal: @eq bool (@maximal rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT M)) (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G))) (@maximal gT (@gval gT M) (@gval gT G)) *) rewrite -(morphpre_invm injf) -(morphpre_invm injf G). (* Goal: @eq bool (@maximal rT (@morphpre rT gT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT D)) (@invm_morphism gT rT D f injf) (@MorPhantom rT gT (@invm gT rT D f injf)) (@gval gT M)) (@morphpre rT gT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT D)) (@invm_morphism gT rT D f injf) (@MorPhantom rT gT (@invm gT rT D f injf)) (@gval gT G))) (@maximal gT (@gval gT M) (@gval gT G)) *) by rewrite morphpre_maximal ?morphim_invm. Qed. Lemma injm_maximal_eq : maximal_eq (f @* M) (f @* G) = maximal_eq M G. Proof. (* Goal: @eq bool (@maximal_eq rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT M)) (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G))) (@maximal_eq gT (@gval gT M) (@gval gT G)) *) by rewrite /maximal_eq injm_maximal // injm_eq. Qed. Lemma injm_maxnormal : maxnormal (f @* M) (f @* G) (f @* L) = maxnormal M G L. Lemma injm_minnormal : minnormal (f @* M) (f @* G) = minnormal M G. Proof. (* Goal: @eq bool (@minnormal rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT M)) (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G))) (@minnormal gT (@gval gT M) (@gval gT G)) *) pose injfm := (morphim_injm_eq1 injf, injm_norms, injmSK injf, subsetIl). (* Goal: @eq bool (@minnormal rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT M)) (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G))) (@minnormal gT (@gval gT M) (@gval gT G)) *) apply/mingroupP/mingroupP; rewrite !injfm // => [[nML minM]]. (* Goal: and (is_true (andb (negb (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@gval gT M) (oneg (group_set_of_baseGroupType (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 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 M))))))) (forall (H : @group_of rT (Phant (FinGroup.arg_sort (FinGroup.base rT)))) (_ : is_true (andb (negb (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base rT))) (@gval rT H) (oneg (group_set_of_baseGroupType (FinGroup.base rT))))) (@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)) (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT 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)) (@normaliser rT (@gval rT H))))))) (_ : 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 (@morphim_group gT rT D f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) M)))))), @eq (@set_of (FinGroup.arg_finType (FinGroup.base rT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))))) (@gval rT H) (@gval rT (@morphim_group gT rT D f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) M))) *) (* Goal: and (is_true (andb (negb (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@gval gT M) (oneg (group_set_of_baseGroupType (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 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 M))))))) (forall (H : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (_ : is_true (andb (negb (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@gval gT H) (oneg (group_set_of_baseGroupType (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 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)) (@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 M))))), @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@gval gT H) (@gval gT M)) *) split=> // H nHG sHM; have dH := subset_trans sHM dM. (* Goal: and (is_true (andb (negb (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@gval gT M) (oneg (group_set_of_baseGroupType (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 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 M))))))) (forall (H : @group_of rT (Phant (FinGroup.arg_sort (FinGroup.base rT)))) (_ : is_true (andb (negb (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base rT))) (@gval rT H) (oneg (group_set_of_baseGroupType (FinGroup.base rT))))) (@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)) (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT 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)) (@normaliser rT (@gval rT H))))))) (_ : 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 (@morphim_group gT rT D f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) M)))))), @eq (@set_of (FinGroup.arg_finType (FinGroup.base rT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))))) (@gval rT H) (@gval rT (@morphim_group gT rT D f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) M))) *) (* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@gval gT H) (@gval gT M) *) by apply: (injm_morphim_inj injf) => //; apply: minM; rewrite !injfm. (* Goal: and (is_true (andb (negb (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@gval gT M) (oneg (group_set_of_baseGroupType (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 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 M))))))) (forall (H : @group_of rT (Phant (FinGroup.arg_sort (FinGroup.base rT)))) (_ : is_true (andb (negb (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base rT))) (@gval rT H) (oneg (group_set_of_baseGroupType (FinGroup.base rT))))) (@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)) (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT 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)) (@normaliser rT (@gval rT H))))))) (_ : 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 (@morphim_group gT rT D f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) M)))))), @eq (@set_of (FinGroup.arg_finType (FinGroup.base rT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))))) (@gval rT H) (@gval rT (@morphim_group gT rT D f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) M))) *) split=> // fH nHG sHM; have dfH := subset_trans sHM (morphim_sub f M). (* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base rT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))))) (@gval rT fH) (@gval rT (@morphim_group gT rT D f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) M)) *) by rewrite -(morphpreK dfH) !injfm // in nHG sHM *; rewrite (minM _ nHG). Qed. End InjmMax. Section QuoMax. Variables (gT : finGroupType) (K G H : {group gT}). Lemma cosetpre_maximal (Q R : {group coset_of K}) : maximal (coset K @*^-1 Q) (coset K @*^-1 R) = maximal Q R. Proof. (* Goal: @eq bool (@maximal gT (@morphpre gT (@coset_groupType gT (@gval gT K)) (@normaliser gT (@gval gT K)) (@coset_morphism gT (@gval gT K)) (@MorPhantom gT (@coset_groupType gT (@gval gT K)) (@coset gT (@gval gT K))) (@gval (@coset_groupType gT (@gval gT K)) Q)) (@morphpre gT (@coset_groupType gT (@gval gT K)) (@normaliser gT (@gval gT K)) (@coset_morphism gT (@gval gT K)) (@MorPhantom gT (@coset_groupType gT (@gval gT K)) (@coset gT (@gval gT K))) (@gval (@coset_groupType gT (@gval gT K)) R))) (@maximal (@coset_groupType gT (@gval gT K)) (@gval (@coset_groupType gT (@gval gT K)) Q) (@gval (@coset_groupType gT (@gval gT K)) R)) *) by rewrite morphpre_maximal ?sub_im_coset. Qed. Lemma cosetpre_maximal_eq (Q R : {group coset_of K}) : maximal_eq (coset K @*^-1 Q) (coset K @*^-1 R) = maximal_eq Q R. Proof. (* Goal: @eq bool (@maximal_eq gT (@morphpre gT (@coset_groupType gT (@gval gT K)) (@normaliser gT (@gval gT K)) (@coset_morphism gT (@gval gT K)) (@MorPhantom gT (@coset_groupType gT (@gval gT K)) (@coset gT (@gval gT K))) (@gval (@coset_groupType gT (@gval gT K)) Q)) (@morphpre gT (@coset_groupType gT (@gval gT K)) (@normaliser gT (@gval gT K)) (@coset_morphism gT (@gval gT K)) (@MorPhantom gT (@coset_groupType gT (@gval gT K)) (@coset gT (@gval gT K))) (@gval (@coset_groupType gT (@gval gT K)) R))) (@maximal_eq (@coset_groupType gT (@gval gT K)) (@gval (@coset_groupType gT (@gval gT K)) Q) (@gval (@coset_groupType gT (@gval gT K)) R)) *) by rewrite /maximal_eq !eqEsubset !cosetpreSK cosetpre_maximal. Qed. Lemma quotient_maximal : K <| G -> K <| H -> maximal (G / K) (H / K) = maximal G H. Proof. (* Goal: forall (_ : is_true (@normal gT (@gval gT K) (@gval gT G))) (_ : is_true (@normal gT (@gval gT K) (@gval gT H))), @eq bool (@maximal (@coset_groupType gT (@gval gT K)) (@quotient gT (@gval gT G) (@gval gT K)) (@quotient gT (@gval gT H) (@gval gT K))) (@maximal gT (@gval gT G) (@gval gT H)) *) by move=> nKG nKH; rewrite -cosetpre_maximal ?quotientGK. Qed. Lemma quotient_maximal_eq : K <| G -> K <| H -> maximal_eq (G / K) (H / K) = maximal_eq G H. Proof. (* Goal: forall (_ : is_true (@normal gT (@gval gT K) (@gval gT G))) (_ : is_true (@normal gT (@gval gT K) (@gval gT H))), @eq bool (@maximal_eq (@coset_groupType gT (@gval gT K)) (@quotient gT (@gval gT G) (@gval gT K)) (@quotient gT (@gval gT H) (@gval gT K))) (@maximal_eq gT (@gval gT G) (@gval gT H)) *) by move=> nKG nKH; rewrite -cosetpre_maximal_eq ?quotientGK. Qed. Lemma maximalJ x : maximal (G :^ x) (H :^ x) = maximal G H. Proof. (* Goal: @eq bool (@maximal gT (@conjugate gT (@gval gT G) x) (@conjugate gT (@gval gT H) x)) (@maximal gT (@gval gT G) (@gval gT H)) *) rewrite -{1}(setTI G) -{1}(setTI H) -!morphim_conj. (* Goal: @eq bool (@maximal gT (@morphim gT gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@conjgm_morphism gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) x) (@MorPhantom gT gT (@conjgm gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) x)) (@gval gT G)) (@morphim gT gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@conjgm_morphism gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) x) (@MorPhantom gT gT (@conjgm gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) x)) (@gval gT H))) (@maximal gT (@gval gT G) (@gval gT H)) *) by rewrite injm_maximal ?subsetT ?injm_conj. Qed. Lemma maximal_eqJ x : maximal_eq (G :^ x) (H :^ x) = maximal_eq G H. Proof. (* Goal: @eq bool (@maximal_eq gT (@conjugate gT (@gval gT G) x) (@conjugate gT (@gval gT H) x)) (@maximal_eq gT (@gval gT G) (@gval gT H)) *) by rewrite /maximal_eq !eqEsubset !conjSg maximalJ. Qed. End QuoMax. Section MaxNormalProps. Variables (gT : finGroupType). Implicit Types (A B C : {set gT}) (G H K L M : {group gT}). Lemma maxnormal_normal A B : maxnormal A B B -> A <| B. Proof. (* Goal: forall _ : is_true (@maxnormal gT A B B), is_true (@normal gT A B) *) by case/maxsetP=> /and3P[/gen_set_id /= -> pAB nAB]; rewrite /normal proper_sub. Qed. Lemma maxnormal_proper A B C : maxnormal A B C -> A \proper B. Proof. (* Goal: forall _ : is_true (@maxnormal gT A B C), 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)) 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))) *) by case/maxsetP=> /and3P[gA pAB _] _; apply: (sub_proper_trans (subset_gen A)). Qed. Lemma maxnormal_sub A B C : maxnormal A B C -> A \subset B. Proof. (* Goal: forall _ : is_true (@maxnormal gT A B C), 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))) *) by move=> maxA; rewrite proper_sub //; apply: (maxnormal_proper maxA). Qed. Lemma ex_maxnormal_ntrivg G : G :!=: 1-> {N : {group gT} | maxnormal N G 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))))))), @sig (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun N : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => is_true (@maxnormal gT (@gval gT N) (@gval gT G) (@gval gT G))) *) move=> ntG; apply: ex_maxgroup; exists [1 gT]%G; rewrite norm1 proper1G. (* Goal: is_true (andb (negb (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@gval gT G) (oneg (group_set_of_baseGroupType (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 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)) (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))))))) *) by rewrite subsetT ntG. Qed. Lemma maxnormalM G H K : maxnormal H G G -> maxnormal K G G -> H :<>: K -> H * K = G. Proof. (* Goal: forall (_ : is_true (@maxnormal gT (@gval gT H) (@gval gT G) (@gval gT G))) (_ : is_true (@maxnormal gT (@gval gT K) (@gval gT G) (@gval gT G))) (_ : not (@eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@gval gT H) (@gval gT K))), @eq (FinGroup.sort (group_set_of_baseGroupType (FinGroup.base gT))) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@gval gT H) (@gval gT K)) (@gval gT G) *) move=> maxH maxK /eqP; apply: contraNeq => ltHK_G. (* Goal: is_true (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@gval gT H) (@gval gT K)) *) have [nsHG nsKG] := (maxnormal_normal maxH, maxnormal_normal maxK). (* Goal: is_true (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@gval gT H) (@gval gT K)) *) have cHK: commute H K. (* Goal: is_true (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@gval gT H) (@gval gT K)) *) (* Goal: @commute (group_set_of_baseGroupType (FinGroup.base gT)) (@gval gT H) (@gval gT K) *) exact: normC (subset_trans (normal_sub nsHG) (normal_norm nsKG)). (* Goal: is_true (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@gval gT H) (@gval gT K)) *) wlog suffices: H K {maxH} maxK nsHG nsKG cHK ltHK_G / H \subset K. (* 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)) (@gval gT K)))) *) (* Goal: forall _ : forall (H K : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (_ : is_true (@maxnormal gT (@gval gT K) (@gval gT G) (@gval gT G))) (_ : is_true (@normal gT (@gval gT H) (@gval gT G))) (_ : is_true (@normal gT (@gval gT K) (@gval gT G))) (_ : @commute (group_set_of_baseGroupType (FinGroup.base gT)) (@gval gT H) (@gval gT K)) (_ : is_true (negb (@eq_op (FinGroup.eqType (group_set_of_baseGroupType (FinGroup.base gT))) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@gval gT H) (@gval gT K)) (@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)) (@gval gT K)))), is_true (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@gval gT H) (@gval gT K)) *) by move=> IH; rewrite eqEsubset !IH // -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)) (@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 K)))) *) have{maxK} /maxgroupP[_ maxK] := maxK. (* 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)) (@gval gT K)))) *) apply/joing_idPr/maxK; rewrite ?joing_subr //= comm_joingE //. (* Goal: is_true (andb (@proper (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)) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@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)) (@gval gT G)))) (@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)) (@normaliser gT (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@gval gT H) (@gval gT K))))))) *) by rewrite properEneq ltHK_G; apply: normalM. Qed. Lemma maxnormal_minnormal G L M : G \subset 'N(M) -> L \subset 'N(G) -> maxnormal M G L -> minnormal (G / M) (L / M). Lemma minnormal_maxnormal G L M : M <| G -> L \subset 'N(M) -> minnormal (G / M) (L / M) -> maxnormal M G L. End MaxNormalProps. Section Simple. Implicit Types gT rT : finGroupType. Lemma simpleP gT (G : {group gT}) : reflect (G :!=: 1 /\ forall H : {group gT}, H <| G -> H :=: 1 \/ H :=: G) (simple G). Proof. (* Goal: Bool.reflect (and (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)))))))) (forall (H : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (_ : is_true (@normal gT (@gval gT H) (@gval gT G))), or (@eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@gval gT H) (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))))) (@gval gT H) (@gval gT G)))) (@simple gT (@gval gT G)) *) apply: (iffP mingroupP); rewrite normG andbT => [[ntG simG]]. (* Goal: and (is_true (negb (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@gval gT G) (oneg (group_set_of_baseGroupType (FinGroup.base gT)))))) (forall (H : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (_ : is_true (andb (negb (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@gval gT H) (oneg (group_set_of_baseGroupType (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 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)) (@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))))) (@gval gT H) (@gval gT G)) *) (* Goal: and (is_true (negb (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@gval gT G) (oneg (group_set_of_baseGroupType (FinGroup.base gT)))))) (forall (H : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (_ : is_true (@normal gT (@gval gT H) (@gval gT G))), or (@eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@gval gT H) (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))))) (@gval gT H) (@gval gT G))) *) split=> // N /andP[sNG nNG]. (* Goal: and (is_true (negb (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@gval gT G) (oneg (group_set_of_baseGroupType (FinGroup.base gT)))))) (forall (H : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (_ : is_true (andb (negb (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@gval gT H) (oneg (group_set_of_baseGroupType (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 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)) (@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))))) (@gval gT H) (@gval gT G)) *) (* Goal: or (@eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@gval gT N) (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))))) (@gval gT N) (@gval gT G)) *) by case: (eqsVneq N 1) => [|ntN]; [left | right; apply: simG; rewrite ?ntN]. (* Goal: and (is_true (negb (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@gval gT G) (oneg (group_set_of_baseGroupType (FinGroup.base gT)))))) (forall (H : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (_ : is_true (andb (negb (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@gval gT H) (oneg (group_set_of_baseGroupType (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 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)) (@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))))) (@gval gT H) (@gval gT G)) *) split=> // N /andP[ntN nNG] sNG. (* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@gval gT N) (@gval gT G) *) by case: (simG N) ntN => // [|->]; [apply/andP | case/eqP]. Qed. Lemma quotient_simple gT (G H : {group gT}) : H <| G -> simple (G / H) = maxnormal H G G. Proof. (* Goal: forall _ : is_true (@normal gT (@gval gT H) (@gval gT G)), @eq bool (@simple (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (@maxnormal gT (@gval gT H) (@gval gT G) (@gval gT G)) *) move=> nsHG; have nGH := normal_norm nsHG. (* Goal: @eq bool (@simple (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (@maxnormal gT (@gval gT H) (@gval gT G) (@gval gT G)) *) by apply/idP/idP; [apply: minnormal_maxnormal | apply: maxnormal_minnormal]. Qed. Lemma isog_simple gT rT (G : {group gT}) (M : {group rT}) : G \isog M -> simple G = simple M. Proof. (* Goal: forall _ : is_true (@isog gT rT (@gval gT G) (@gval rT M)), @eq bool (@simple gT (@gval gT G)) (@simple rT (@gval rT M)) *) move=> eqGM; wlog suffices: gT rT G M eqGM / simple M -> simple G. (* Goal: forall _ : is_true (@simple rT (@gval rT M)), is_true (@simple gT (@gval gT G)) *) (* Goal: forall _ : forall (gT rT : FinGroup.type) (G : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (M : @group_of rT (Phant (FinGroup.arg_sort (FinGroup.base rT)))) (_ : is_true (@isog gT rT (@gval gT G) (@gval rT M))) (_ : is_true (@simple rT (@gval rT M))), is_true (@simple gT (@gval gT G)), @eq bool (@simple gT (@gval gT G)) (@simple rT (@gval rT M)) *) by move=> IH; apply/idP/idP; apply: IH; rewrite // isog_sym. (* Goal: forall _ : is_true (@simple rT (@gval rT M)), is_true (@simple gT (@gval gT G)) *) case/isogP: eqGM => f injf <- /simpleP[ntGf simGf]. (* Goal: is_true (@simple gT (@gval gT G)) *) apply/simpleP; split=> [|N nsNG]; first by rewrite -(morphim_injm_eq1 injf). (* Goal: or (@eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@gval gT N) (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))))) (@gval gT N) (@gval gT G)) *) rewrite -(morphim_invm injf (normal_sub nsNG)). (* Goal: or (@eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@morphim rT gT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)) (@invm_morphism gT rT G f injf) (@MorPhantom rT gT (@invm gT rT G f injf)) (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT N))) (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))))) (@morphim rT gT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)) (@invm_morphism gT rT G f injf) (@MorPhantom rT gT (@invm gT rT G f injf)) (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT N))) (@gval gT G)) *) have: f @* N <| f @* G by rewrite morphim_normal. (* Goal: forall _ : is_true (@normal rT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT N)) (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G))), or (@eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@morphim rT gT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)) (@invm_morphism gT rT G f injf) (@MorPhantom rT gT (@invm gT rT G f injf)) (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT N))) (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))))) (@morphim rT gT (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT G)) (@invm_morphism gT rT G f injf) (@MorPhantom rT gT (@invm gT rT G f injf)) (@morphim gT rT (@gval gT G) f (@MorPhantom gT rT (@mfun gT rT (@gval gT G) f)) (@gval gT N))) (@gval gT G)) *) by case/simGf=> /= ->; [left | right]; rewrite (morphim1, morphim_invm). Qed. Lemma simple_maxnormal gT (G : {group gT}) : simple G = maxnormal 1 G G. Proof. (* Goal: @eq bool (@simple gT (@gval gT G)) (@maxnormal gT (oneg (group_set_of_baseGroupType (FinGroup.base gT))) (@gval gT G) (@gval gT G)) *) by rewrite -quotient_simple ?normal1 // -(isog_simple (quotient1_isog G)). Qed. End Simple. Section Chiefs. Variable gT : finGroupType. Implicit Types G H U V : {group gT}. Lemma chief_factor_minnormal G V U : chief_factor G V U -> minnormal (U / V) (G / V). Lemma acts_irrQ G U V : G \subset 'N(V) -> V <| U -> acts_irreducibly G (U / V) 'Q = minnormal (U / V) (G / V). Lemma chief_series_exists H G : H <| G -> {s | (G.-chief).-series 1%G s & last 1%G s = H}. Proof. (* Goal: forall _ : is_true (@normal gT (@gval gT H) (@gval gT G)), @sig2 (list (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))))) (fun s : list (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) => is_true (@path (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@rel_of_simpl_rel (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@group_rel_of gT (@chief_factor gT (@gval gT G)))) (one_group gT) s)) (fun s : list (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) => @eq (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@last (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (one_group gT) s) H) *) elim: {H}_.+1 {-2}H (ltnSn #|H|) => // m IHm U leUm nsUG. (* Goal: @sig2 (list (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))))) (fun s : list (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) => is_true (@path (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@rel_of_simpl_rel (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@group_rel_of gT (@chief_factor gT (@gval gT G)))) (one_group gT) s)) (fun s : list (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) => @eq (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@last (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (one_group gT) s) U) *) have [-> | ntU] := eqVneq U 1%G; first by exists [::]. (* Goal: @sig2 (list (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))))) (fun s : list (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) => is_true (@path (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@rel_of_simpl_rel (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@group_rel_of gT (@chief_factor gT (@gval gT G)))) (one_group gT) s)) (fun s : list (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) => @eq (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@last (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (one_group gT) s) U) *) have [V maxV]: {V : {group gT} | maxnormal V U G}. (* Goal: @sig2 (list (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))))) (fun s : list (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) => is_true (@path (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@rel_of_simpl_rel (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@group_rel_of gT (@chief_factor gT (@gval gT G)))) (one_group gT) s)) (fun s : list (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) => @eq (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@last (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (one_group gT) s) U) *) (* Goal: @sig (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun V : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => is_true (@maxnormal gT (@gval gT V) (@gval gT U) (@gval gT G))) *) by apply: ex_maxgroup; exists 1%G; rewrite proper1G ntU norms1. (* Goal: @sig2 (list (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))))) (fun s : list (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) => is_true (@path (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@rel_of_simpl_rel (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@group_rel_of gT (@chief_factor gT (@gval gT G)))) (one_group gT) s)) (fun s : list (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) => @eq (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@last (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (one_group gT) s) U) *) have /andP[ltVU nVG] := maxgroupp maxV. (* Goal: @sig2 (list (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))))) (fun s : list (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) => is_true (@path (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@rel_of_simpl_rel (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@group_rel_of gT (@chief_factor gT (@gval gT G)))) (one_group gT) s)) (fun s : list (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) => @eq (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@last (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (one_group gT) s) U) *) have [||s ch_s defV] := IHm V; first exact: leq_trans (proper_card ltVU) _. (* Goal: @sig2 (list (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))))) (fun s : list (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) => is_true (@path (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@rel_of_simpl_rel (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@group_rel_of gT (@chief_factor gT (@gval gT G)))) (one_group gT) s)) (fun s : list (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) => @eq (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@last (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (one_group gT) s) U) *) (* Goal: is_true (@normal gT (@gval gT V) (@gval gT G)) *) by rewrite /normal (subset_trans (proper_sub ltVU) (normal_sub nsUG)). (* Goal: @sig2 (list (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))))) (fun s : list (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) => is_true (@path (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@rel_of_simpl_rel (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@group_rel_of gT (@chief_factor gT (@gval gT G)))) (one_group gT) s)) (fun s : list (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) => @eq (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@last (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (one_group gT) s) U) *) exists (rcons s U); last by rewrite last_rcons. (* Goal: is_true (@path (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@rel_of_simpl_rel (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@group_rel_of gT (@chief_factor gT (@gval gT G)))) (one_group gT) (@rcons (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) s U)) *) by rewrite rcons_path defV /= ch_s /chief_factor; apply/and3P. Qed. End Chiefs. Section Central. Variables (gT : finGroupType) (G : {group gT}). Implicit Types H K : {group gT}. Lemma central_factor_central H K : central_factor G H K -> (K / H) \subset 'Z(G / H). Proof. (* Goal: forall _ : is_true (@central_factor gT (@gval gT G) (@gval gT H) (@gval gT K)), 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 (@gval gT K) (@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)))) (@center (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))))) *) by case/and3P=> /quotient_cents2r *; rewrite subsetI quotientS. Qed. Lemma central_central_factor H K : (K / H) \subset 'Z(G / H) -> H <| K -> H <| G -> central_factor G H K. Proof. (* Goal: forall (_ : 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 (@gval gT K) (@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)))) (@center (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))))))) (_ : is_true (@normal gT (@gval gT H) (@gval gT K))) (_ : is_true (@normal gT (@gval gT H) (@gval gT G))), is_true (@central_factor gT (@gval gT G) (@gval gT H) (@gval gT K)) *) case/subsetIP=> sKGb cGKb /andP[sHK nHK] /andP[sHG nHG]. (* Goal: is_true (@central_factor gT (@gval gT G) (@gval gT H) (@gval gT K)) *) by rewrite /central_factor -quotient_cents2 // cGKb sHK -(quotientSGK nHK). Qed. End Central.
Require Import Ensf. Require Import Words. Hint Unfold eqwordset . Definition l_inclus (l1 l2 : wordset) : Prop := forall w : Word, l1 w -> l2 w. Hint Unfold l_inclus. Lemma refl_l_inclus : forall l1 : wordset, l_inclus l1 l1. Proof. (* Goal: forall l1 : wordset, l_inclus l1 l1 *) auto. Qed. Hint Resolve refl_l_inclus. Lemma trans_l_inclus : forall l1 l2 l3 : wordset, l_inclus l1 l2 -> l_inclus l2 l3 -> l_inclus l1 l3. Proof. (* Goal: forall (l1 l2 l3 : wordset) (_ : l_inclus l1 l2) (_ : l_inclus l2 l3), l_inclus l1 l3 *) auto. Qed. Definition l_egal (l1 l2 : wordset) : Prop := l_inclus l1 l2 /\ l_inclus l2 l1. Hint Unfold l_egal. Lemma equiv_l_egal_eqwordset : forall a b : wordset, l_egal a b <-> eqwordset a b. Proof. (* Goal: forall a b : wordset, iff (l_egal a b) (eqwordset a b) *) intros a b. (* Goal: iff (l_egal a b) (eqwordset a b) *) unfold iff in |- *. (* Goal: and (forall _ : l_egal a b, eqwordset a b) (forall _ : eqwordset a b, l_egal a b) *) split. (* Goal: forall _ : eqwordset a b, l_egal a b *) (* Goal: forall _ : l_egal a b, eqwordset a b *) intro Hyp; elim Hyp; auto. (* Goal: forall _ : eqwordset a b, l_egal a b *) intros Hyp. (* Goal: l_egal a b *) split; unfold l_inclus in |- *; intro w; elim (Hyp w); auto. Qed. Lemma refl_l_egal : forall l1 : wordset, l_egal l1 l1. Proof. (* Goal: forall l1 : wordset, l_egal l1 l1 *) auto. Qed. Hint Resolve refl_l_egal. Section more_about_words. Variable f : Elt -> Elt. Let wef := Word_ext f. Lemma wef_append : forall u v : Word, wef (Append u v) = Append (wef u) (wef v). Proof. (* Goal: forall u v : Word, @eq Word (wef (Append u v)) (Append (wef u) (wef v)) *) intros u v. (* Goal: @eq Word (wef (Append u v)) (Append (wef u) (wef v)) *) elim u. (* Goal: forall (e : Elt) (w : Word) (_ : @eq Word (wef (Append w v)) (Append (wef w) (wef v))), @eq Word (wef (Append (cons e w) v)) (Append (wef (cons e w)) (wef v)) *) (* Goal: @eq Word (wef (Append nil v)) (Append (wef nil) (wef v)) *) trivial. (* Goal: forall (e : Elt) (w : Word) (_ : @eq Word (wef (Append w v)) (Append (wef w) (wef v))), @eq Word (wef (Append (cons e w) v)) (Append (wef (cons e w)) (wef v)) *) unfold wef in |- *. (* Goal: forall (e : Elt) (w : Word) (_ : @eq Word (Word_ext f (Append w v)) (Append (Word_ext f w) (Word_ext f v))), @eq Word (Word_ext f (Append (cons e w) v)) (Append (Word_ext f (cons e w)) (Word_ext f v)) *) intros x w H. (* Goal: @eq Word (Word_ext f (Append (cons x w) v)) (Append (Word_ext f (cons x w)) (Word_ext f v)) *) simpl in |- *. (* Goal: @eq Word (cons (f x) (Word_ext f (Append w v))) (cons (f x) (Append (Word_ext f w) (Word_ext f v))) *) rewrite <- H. (* Goal: @eq Word (cons (f x) (Word_ext f (Append w v))) (cons (f x) (Word_ext f (Append w v))) *) reflexivity. Qed. Lemma wef_nil : forall a : Word, wef a = nil -> a = nil. Proof. (* Goal: forall (a : Word) (_ : @eq Word (wef a) nil), @eq Word a nil *) intro a. (* Goal: forall _ : @eq Word (wef a) nil, @eq Word a nil *) case a. (* Goal: forall (e : Elt) (w : Word) (_ : @eq Word (wef (cons e w)) nil), @eq Word (cons e w) nil *) (* Goal: forall _ : @eq Word (wef nil) nil, @eq Word nil nil *) auto. (* Goal: forall (e : Elt) (w : Word) (_ : @eq Word (wef (cons e w)) nil), @eq Word (cons e w) nil *) unfold wef in |- *; simpl in |- *; intros x w H; discriminate H. Qed. Lemma wef_cons : forall (a b : Word) (e : Elt), cons e a = wef b -> exists x : Elt, ex2 (fun w : Word => cons x w = b) (fun w : Word => f x = e /\ wef w = a). Proof. (* Goal: forall (a b : Word) (e : Elt) (_ : @eq Word (cons e a) (wef b)), @ex Elt (fun x : Elt => @ex2 Word (fun w : Word => @eq Word (cons x w) b) (fun w : Word => and (@eq Elt (f x) e) (@eq Word (wef w) a))) *) intros a b e. (* Goal: forall _ : @eq Word (cons e a) (wef b), @ex Elt (fun x : Elt => @ex2 Word (fun w : Word => @eq Word (cons x w) b) (fun w : Word => and (@eq Elt (f x) e) (@eq Word (wef w) a))) *) unfold wef in |- *. (* Goal: forall _ : @eq Word (cons e a) (Word_ext f b), @ex Elt (fun x : Elt => @ex2 Word (fun w : Word => @eq Word (cons x w) b) (fun w : Word => and (@eq Elt (f x) e) (@eq Word (Word_ext f w) a))) *) case b. (* Goal: forall (e0 : Elt) (w : Word) (_ : @eq Word (cons e a) (Word_ext f (cons e0 w))), @ex Elt (fun x : Elt => @ex2 Word (fun w0 : Word => @eq Word (cons x w0) (cons e0 w)) (fun w0 : Word => and (@eq Elt (f x) e) (@eq Word (Word_ext f w0) a))) *) (* Goal: forall _ : @eq Word (cons e a) (Word_ext f nil), @ex Elt (fun x : Elt => @ex2 Word (fun w : Word => @eq Word (cons x w) nil) (fun w : Word => and (@eq Elt (f x) e) (@eq Word (Word_ext f w) a))) *) simpl in |- *; intro H; discriminate H. (* Goal: forall (e0 : Elt) (w : Word) (_ : @eq Word (cons e a) (Word_ext f (cons e0 w))), @ex Elt (fun x : Elt => @ex2 Word (fun w0 : Word => @eq Word (cons x w0) (cons e0 w)) (fun w0 : Word => and (@eq Elt (f x) e) (@eq Word (Word_ext f w0) a))) *) simpl in |- *; intros x w H. (* Goal: @ex Elt (fun x0 : Elt => @ex2 Word (fun w0 : Word => @eq Word (cons x0 w0) (cons x w)) (fun w : Word => and (@eq Elt (f x0) e) (@eq Word (Word_ext f w) a))) *) exists x. (* Goal: @ex2 Word (fun w0 : Word => @eq Word (cons x w0) (cons x w)) (fun w : Word => and (@eq Elt (f x) e) (@eq Word (Word_ext f w) a)) *) exists w. (* Goal: and (@eq Elt (f x) e) (@eq Word (Word_ext f w) a) *) (* Goal: @eq Word (cons x w) (cons x w) *) trivial. (* Goal: and (@eq Elt (f x) e) (@eq Word (Word_ext f w) a) *) injection H; auto. Qed. End more_about_words. Hint Resolve wef_cons. Lemma Append_assoc : forall a b c : Word, Append a (Append b c) = Append (Append a b) c. Proof. (* Goal: forall a b c : Word, @eq Word (Append a (Append b c)) (Append (Append a b) c) *) intros a b c. (* Goal: @eq Word (Append a (Append b c)) (Append (Append a b) c) *) unfold Append in |- *. (* Goal: @eq Word ((fix Append (w1 w2 : Word) {struct w1} : Word := match w1 with | nil => w2 | cons a w3 => cons a (Append w3 w2) end) a ((fix Append (w1 w2 : Word) {struct w1} : Word := match w1 with | nil => w2 | cons a w3 => cons a (Append w3 w2) end) b c)) ((fix Append (w1 w2 : Word) {struct w1} : Word := match w1 with | nil => w2 | cons a w3 => cons a (Append w3 w2) end) ((fix Append (w1 w2 : Word) {struct w1} : Word := match w1 with | nil => w2 | cons a w3 => cons a (Append w3 w2) end) a b) c) *) elim a; auto. Qed. Hint Resolve Append_assoc.
Require Export GeoCoq.Elements.OriginalProofs.lemma_congruencesymmetric. Section Euclid. Context `{Ax:euclidean_neutral}. Lemma lemma_congruencetransitive : forall A B C D E F, Cong A B C D -> Cong C D E F -> Cong A B E F. Proof. (* Goal: forall (A B C D E F : @Point Ax) (_ : @Cong Ax A B C D) (_ : @Cong Ax C D E F), @Cong Ax A B E F *) intros. (* Goal: @Cong Ax A B E F *) assert (Cong C D A B) by (conclude lemma_congruencesymmetric). (* Goal: @Cong Ax A B E F *) assert (Cong A B E F) by (conclude cn_congruencetransitive). (* Goal: @Cong Ax A B E F *) close. Qed. End Euclid.
Require Export GeoCoq.Elements.OriginalProofs.lemma_betweennotequal. Section Euclid. Context `{Ax:euclidean_neutral}. Lemma lemma_ray2 : forall A B C, Out A B C -> neq A B. Proof. (* Goal: forall (A B C : @Point Ax) (_ : @Out Ax A B C), @neq Ax A B *) intros. (* Goal: @neq Ax A B *) let Tf:=fresh in assert (Tf:exists E, (BetS E A C /\ BetS E A B)) by (conclude_def Out );destruct Tf as [E];spliter. (* Goal: @neq Ax A B *) assert (neq A B) by (forward_using lemma_betweennotequal). (* Goal: @neq Ax A B *) close. Qed. End Euclid.
Require Export GeoCoq.Elements.OriginalProofs.lemma_outerconnectivity. Section Euclid. Context `{Ax:euclidean_neutral_ruler_compass}. Lemma lemma_ray3 : forall B C D V, Out B C D -> Out B C V -> Out B D V. Proof. (* Goal: forall (B C D V : @Point Ax0) (_ : @Out Ax0 B C D) (_ : @Out Ax0 B C V), @Out Ax0 B D V *) intros. (* Goal: @Out Ax0 B D V *) let Tf:=fresh in assert (Tf:exists E, (BetS E B D /\ BetS E B C)) by (conclude_def Out );destruct Tf as [E];spliter. (* Goal: @Out Ax0 B D V *) rename_H H;let Tf:=fresh in assert (Tf:exists H, (BetS H B V /\ BetS H B C)) by (conclude_def Out );destruct Tf as [H];spliter. (* Goal: @Out Ax0 B D V *) assert (~ ~ BetS E B V). (* Goal: @Out Ax0 B D V *) (* Goal: not (not (@BetS Ax0 E B V)) *) { (* Goal: not (not (@BetS Ax0 E B V)) *) intro. (* Goal: False *) assert (~ BetS B E H). (* Goal: False *) (* Goal: not (@BetS Ax0 B E H) *) { (* Goal: not (@BetS Ax0 B E H) *) intro. (* Goal: False *) assert (BetS H E B) by (conclude axiom_betweennesssymmetry). (* Goal: False *) assert (BetS E B V) by (conclude lemma_3_6a). (* Goal: False *) contradict. (* BG Goal: @Out Ax0 B D V *) (* BG Goal: False *) } (* Goal: False *) assert (~ BetS B H E). (* Goal: False *) (* Goal: not (@BetS Ax0 B H E) *) { (* Goal: not (@BetS Ax0 B H E) *) intro. (* Goal: False *) assert (BetS E H B) by (conclude axiom_betweennesssymmetry). (* Goal: False *) assert (BetS E B V) by (conclude lemma_3_7a). (* Goal: False *) contradict. (* BG Goal: @Out Ax0 B D V *) (* BG Goal: False *) } (* Goal: False *) assert (BetS C B E) by (conclude axiom_betweennesssymmetry). (* Goal: False *) assert (BetS C B H) by (conclude axiom_betweennesssymmetry). (* Goal: False *) assert (eq H E) by (conclude lemma_outerconnectivity). (* Goal: False *) assert (BetS E B V) by (conclude cn_equalitysub). (* Goal: False *) contradict. (* BG Goal: @Out Ax0 B D V *) } (* Goal: @Out Ax0 B D V *) assert (Out B D V) by (conclude_def Out ). (* Goal: @Out Ax0 B D V *) close. Qed. End Euclid.
From mathcomp Require Import ssreflect ssrbool seq eqtype. From LemmaOverloading Require Import heaps. Set Implicit Arguments. Unset Strict Implicit. Unset Printing Implicit Defensive. Module Scan. Section ScanSection. Structure tagged_heap := Tag {untag : heap}. Local Coercion untag : tagged_heap >-> heap. Definition default_tag := Tag. Definition ptr_tag := default_tag. Canonical Structure union_tag h := ptr_tag h. Definition axiom h s := def h -> uniq s /\ forall x, x \in s -> x \in dom h. Structure form s := Form {heap_of : tagged_heap; _ : axiom heap_of s}. Local Coercion heap_of : form >-> tagged_heap. Lemma union_pf s1 s2 (h1 : form s1) (h2 : form s2) : axiom (union_tag (h1 :+ h2)) (s1 ++ s2). Proof. (* Goal: axiom (untag (union_tag (union2 (untag (@heap_of s1 h1)) (untag (@heap_of s2 h2))))) (@cat (Equality.sort ptr_eqType) s1 s2) *) move:h1 h2=>[[i1]] H1 [[i2]] H2; rewrite /axiom /= in H1 H2 * => D. (* Goal: and (is_true (@uniq ptr_eqType (@cat ptr s1 s2))) (forall (x : ptr) (_ : is_true (@in_mem ptr x (@mem ptr (seq_predType ptr_eqType) (@cat ptr s1 s2)))), is_true (@in_mem ptr x (@mem ptr (predPredType ptr) (dom (union2 i1 i2))))) *) case/(_ (defUnl D)): H1=>U1 H1; case/(_ (defUnr D)): H2=>U2 H2. (* Goal: and (is_true (@uniq ptr_eqType (@cat ptr s1 s2))) (forall (x : ptr) (_ : is_true (@in_mem ptr x (@mem ptr (seq_predType ptr_eqType) (@cat ptr s1 s2)))), is_true (@in_mem ptr x (@mem ptr (predPredType ptr) (dom (union2 i1 i2))))) *) split=>[|x]; last first. (* Goal: is_true (@uniq ptr_eqType (@cat ptr s1 s2)) *) (* Goal: forall _ : is_true (@in_mem ptr x (@mem ptr (seq_predType ptr_eqType) (@cat ptr s1 s2))), is_true (@in_mem ptr x (@mem ptr (predPredType ptr) (dom (union2 i1 i2)))) *) - (* Goal: is_true (@uniq ptr_eqType (@cat ptr s1 s2)) *) (* Goal: forall _ : is_true (@in_mem ptr x (@mem ptr (seq_predType ptr_eqType) (@cat ptr s1 s2))), is_true (@in_mem ptr x (@mem ptr (predPredType ptr) (dom (union2 i1 i2)))) *) rewrite mem_cat; case/orP; [move/H1 | move/H2]; by rewrite domUn !inE /= D => -> //=; rewrite orbT. (* Goal: is_true (@uniq ptr_eqType (@cat ptr s1 s2)) *) rewrite cat_uniq U1 U2 andbT -all_predC. (* Goal: is_true (andb true (@all (Equality.sort ptr_eqType) (@pred_of_simpl (Equality.sort ptr_eqType) (@predC (Equality.sort ptr_eqType) (@pred_of_simpl (Equality.sort ptr_eqType) (@pred_of_mem_pred (Equality.sort ptr_eqType) (@mem (Equality.sort ptr_eqType) (seq_predType ptr_eqType) s1))))) s2)) *) apply/allP=>x; move/H2=>H3; apply: (introN idP); move/H1=>H4. (* Goal: False *) by case: defUn D=>// _ _; move/(_ _ H4); rewrite H3. Qed. Canonical Structure union_form s1 s2 h1 h2 := Form (@union_pf s1 s2 h1 h2). Lemma ptr_pf A x (v : A) : axiom (ptr_tag (x :-> v)) [:: x]. Proof. (* Goal: axiom (untag (ptr_tag (@pts A x v))) (@cons ptr x (@nil ptr)) *) rewrite /axiom /= defPt => D; split=>//. (* Goal: forall (x0 : ptr) (_ : is_true (@in_mem ptr x0 (@mem ptr (seq_predType ptr_eqType) (@cons ptr x (@nil ptr))))), is_true (@in_mem ptr x0 (@mem ptr (predPredType ptr) (dom (@pts A x v)))) *) by move=>y; rewrite inE; move/eqP=>->; rewrite domPt inE /= eq_refl D. Qed. Canonical Structure ptr_form A x (v : A) := Form (@ptr_pf A x v). Lemma default_pf h : axiom (default_tag h) [::]. Proof. (* Goal: axiom (untag (default_tag h)) (@nil (Equality.sort ptr_eqType)) *) by move=>D; split. Qed. Canonical Structure default_form h := Form (@default_pf h). Lemma scanE s (h : form s) x : def h -> x \in s -> x \in dom h. Proof. (* Goal: forall (_ : is_true (def (untag (@heap_of s h)))) (_ : is_true (@in_mem (Equality.sort ptr_eqType) x (@mem (Equality.sort ptr_eqType) (seq_predType ptr_eqType) s))), is_true (@in_mem (Equality.sort ptr_eqType) x (@mem ptr (predPredType ptr) (dom (untag (@heap_of s h))))) *) by case: h=>hp /= A D H; exact: ((proj2 (A D)) _ H). Qed. End ScanSection. Module Exports. Canonical Structure union_tag. Canonical Structure union_form. Canonical Structure ptr_form. Canonical Structure default_form. Coercion untag : tagged_heap >-> heap. Coercion heap_of : form >-> tagged_heap. End Exports. End Scan. Export Scan.Exports. Example ex_scan x y h : let: hp := (y :-> 1 :+ h :+ x :-> 2) in def hp -> x \in dom hp. Proof. move=>D; apply: Scan.scanE=>//=. by rewrite ?in_cons ?eqxx ?orbT. Abort. Module Search. Section SearchSection. Structure tagged_seq := Tag {untag : seq ptr}. Local Coercion untag : tagged_seq >-> seq. Definition recurse_tag := Tag. Canonical Structure found_tag s := recurse_tag s. Definition axiom x (s : tagged_seq) := x \in untag s. Structure form x := Form {seq_of : tagged_seq; _ : axiom x seq_of}. Local Coercion seq_of : form >-> tagged_seq. Lemma found_pf x s : axiom x (found_tag (x :: s)). Proof. (* Goal: is_true (axiom x (found_tag (@cons (Equality.sort ptr_eqType) x s))) *) by rewrite /axiom inE eq_refl. Qed. Canonical Structure found_form x s := Form (found_pf x s). Lemma recurse_pf x y (f : form x) : axiom x (recurse_tag (y :: f)). Proof. (* Goal: is_true (axiom x (recurse_tag (@cons ptr y (untag (@seq_of x f))))) *) by move:f=>[[s]]; rewrite /axiom /= inE orbC => ->. Qed. Canonical Structure recurse_form x y (f : form x) := Form (recurse_pf y f). Lemma findE x (f : form x) : x \in untag f. Proof. (* Goal: is_true (@in_mem (Equality.sort ptr_eqType) x (@mem (Equality.sort ptr_eqType) (seq_predType ptr_eqType) (untag (@seq_of x f)))) *) by move:f=>[s]; apply. Qed. End SearchSection. Module Exports. Canonical Structure found_tag. Canonical Structure found_form. Canonical Structure recurse_form. Coercion untag : tagged_seq >-> seq. Coercion seq_of : form >-> tagged_seq. End Exports. End Search. Export Search.Exports. Example ex_find (x y z : ptr) : x \in [:: z; x; y]. by apply: Search.findE. Abort. Module Search2. Section Search2Section. Structure tagged_seq := Tag {untag : seq ptr}. Local Coercion untag : tagged_seq >-> seq. Definition foundz_tag := Tag. Definition foundy_tag := foundz_tag. Canonical Structure foundx_tag s := foundy_tag s. Definition axiom (x y : ptr) (s : tagged_seq) := [/\ x \in untag s, y \in untag s & uniq s -> x != y]. Structure form x y := Form {seq_of : tagged_seq; _ : axiom x y seq_of}. Local Coercion seq_of : form >-> tagged_seq. Lemma foundx_pf x y (s : Search.form y) : axiom x y (foundx_tag (x :: s)). Proof. (* Goal: axiom x y (foundx_tag (@cons ptr x (Search.untag (@Search.seq_of y s)))) *) move: s=>[[s]]; rewrite /Search.axiom /= /axiom !inE eq_refl /= => H1. (* Goal: and3 (is_true true) (is_true (orb (@eq_op ptr_eqType y x) (@in_mem ptr y (@mem ptr (seq_predType ptr_eqType) s)))) (forall _ : is_true (andb (negb (@in_mem ptr x (@mem ptr (seq_predType ptr_eqType) s))) (@uniq ptr_eqType s)), is_true (negb (@eq_op ptr_eqType x y))) *) by rewrite H1 orbT; split=>//; case/andP=>H2 _; case: eqP H1 H2=>// -> ->. Qed. Canonical Structure foundx_form x y (s : Search.form y) := Form (foundx_pf x s). Lemma foundy_pf x y (s : Search.form x) : axiom x y (foundy_tag (y :: s)). Proof. (* Goal: axiom x y (foundy_tag (@cons ptr y (Search.untag (@Search.seq_of x s)))) *) move: s=>[[s]]; rewrite /Search.axiom /= /axiom !inE eq_refl /= => H1. (* Goal: and3 (is_true (orb (@eq_op ptr_eqType x y) (@in_mem ptr x (@mem ptr (seq_predType ptr_eqType) s)))) (is_true true) (forall _ : is_true (andb (negb (@in_mem ptr y (@mem ptr (seq_predType ptr_eqType) s))) (@uniq ptr_eqType s)), is_true (negb (@eq_op ptr_eqType x y))) *) by rewrite H1 orbT; split=>//; case/andP=>H2 _; case: eqP H1 H2=>// -> ->. Qed. Canonical Structure foundy_form x y (s : Search.form x) := Form (foundy_pf y s). Lemma foundz_pf x y z (s : form x y) : axiom x y (foundz_tag (z :: s)). Proof. (* Goal: axiom x y (foundz_tag (@cons ptr z (untag (@seq_of x y s)))) *) move: s=>[[s]]; case=>/= H1 H2 H3. (* Goal: axiom x y (foundz_tag (@cons ptr z s)) *) rewrite /axiom /= !inE /= H1 H2 !orbT; split=>//. (* Goal: forall _ : is_true (andb (negb (@in_mem ptr z (@mem ptr (seq_predType ptr_eqType) s))) (@uniq ptr_eqType s)), is_true (negb (@eq_op ptr_eqType x y)) *) by case/andP=>_; apply: H3. Qed. Canonical Structure foundz_form x y z (s : form x y) := Form (foundz_pf z s). Lemma find2E x y (s : form x y) : uniq s -> x != y. Proof. (* Goal: forall _ : is_true (@uniq ptr_eqType (untag (@seq_of x y s))), is_true (negb (@eq_op ptr_eqType x y)) *) by move: s=>[s /= [_ _]]; apply. Qed. End Search2Section. Module Exports. Canonical Structure foundx_tag. Canonical Structure foundx_form. Canonical Structure foundy_form. Canonical Structure foundz_form. Coercion untag : tagged_seq >-> seq. Coercion seq_of : form >-> tagged_seq. End Exports. End Search2. Export Search2.Exports. Example ex_find2 (x y z : ptr) : uniq [:: z; x; y] -> x != y. move=>H. move: (Search2.find2E H). Abort. Module NoAlias. Section NoAliasSection. Structure tagged_ptr (y : ptr) := Tag {untag : ptr}. Local Coercion untag : tagged_ptr >-> ptr. Definition singleton y := @Tag y y. Structure form x y (s : seq ptr) := Form {y_of : tagged_ptr y; _ : uniq s -> x != untag y_of}. Local Coercion y_of : form >-> tagged_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 (@untag y (singleton y)))) *) by move: f=>[[s]][]. Qed. Canonical Structure start x y (f : Search2.form x y) := Form x y f (singleton y) (@noalias_pf x y f). End NoAliasSection. Module Exports. Canonical Structure singleton. Canonical Structure start. Coercion untag : tagged_ptr >-> ptr. Coercion y_of : form >-> tagged_ptr. End Exports. End NoAlias. Export NoAlias.Exports. Lemma noaliasR s x y (f : Scan.form s) (g : NoAlias.form x y s) : Proof. (* Goal: forall _ : is_true (def (Scan.untag (@Scan.heap_of s f))), is_true (negb (@eq_op ptr_eqType x (@NoAlias.untag y (@NoAlias.y_of x y s g)))) *) by move: f g=>[[h]] H1 [[y']] /= H2; case/H1=>U _; apply: H2. Qed. Arguments noaliasR {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 != x2) /\ ((x1 != x2) && (x2 != x3)) = (x1 != x2) /\ ((x1 != x2) && (x2 != x3)) = (x1 != x2) /\ ((x1 != x2) && (x2 != x3)) = (x1 != x2) /\ (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)). split. - by rewrite [x2 != x3](noaliasR D) andbT. split. - by rewrite (noaliasR (x := x2) D) andbT. split. - by rewrite (noaliasR (y := x3) D) andbT. split. - by rewrite (noaliasR (x := x2) (y := x3) D) andbT. rewrite !(negbTE (noaliasR D)). admit. Abort. Lemma noaliasR_fwd1 s (f : Scan.form s) (D : def f) x y (g : Search2.form x y) : Proof. (* Goal: forall _ : @eq (list (Equality.sort ptr_eqType)) s (Search2.untag (@Search2.seq_of x y g)), is_true (negb (@eq_op ptr_eqType x y)) *) case: g=>[l/=[_ _]] H U. (* Goal: is_true (negb (@eq_op ptr_eqType x y)) *) apply: H. (* Goal: is_true (@uniq ptr_eqType (Search2.untag l)) *) move: U=><-. (* Goal: is_true (@uniq ptr_eqType s) *) case: f D=>[h/=]. (* Goal: forall (_ : Scan.axiom (Scan.untag h) s) (_ : is_true (def (Scan.untag h))), is_true (@uniq ptr_eqType s) *) move=>H D; by case: H. Qed. Arguments noaliasR_fwd1 [s f] D x y [g]. Notation noaliasR_fwd D x y := (noaliasR_fwd1 D x y (Logic.eq_refl _)). Notation "()" := (Logic.eq_refl _). 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. Proof. move=>D. split. - apply: (noaliasR_fwd1 D x1 x2 ()). split. set H := noaliasR_fwd1 D. by rewrite (H x1 x2 _ ()) (H x2 x3 _ ()) (H x3 x1 _ ()). split. - by rewrite [x2 == x3](negbTE (noaliasR_fwd D x2 x3)). - by rewrite (negbTE (noaliasR_fwd D x1 x2)). Abort. Lemma scan_it s (f : Scan.form s) : def f -> uniq s. Proof. (* Goal: forall _ : is_true (def (Scan.untag (@Scan.heap_of s f))), is_true (@uniq ptr_eqType s) *) case: f=>/= h A D. (* Goal: is_true (@uniq ptr_eqType s) *) by case: A. Qed. Arguments scan_it [s f]. Definition search_them x y g := @Search2.find2E x y g. Arguments search_them x y [g]. Example without_notation A (x1 x2 x3 : ptr) (v1 v2 v3 : A) (h1 h2 : heap) : def (h1 :+ (x1 :-> v1 :+ x2 :-> v2) :+ (h2 :+ x3 :-> v3)) -> (x1 != x3). Proof. move=>D. by apply: (search_them x1 x3 (scan_it D)). Abort. Lemma noaliasR_fwd_wrong1 x y (g : Search2.form x y) (f : Scan.form g) : def f -> x != y. Proof. (* Goal: forall _ : is_true (def (Scan.untag (@Scan.heap_of (Search2.untag (@Search2.seq_of x y g)) f))), is_true (negb (@eq_op ptr_eqType x y)) *) case: f=>h /= A D. (* Goal: is_true (negb (@eq_op ptr_eqType x y)) *) move: (A D)=>{A D} [U _]. (* Goal: is_true (negb (@eq_op ptr_eqType x y)) *) case: g U=>s /= [_ _]. (* Goal: forall (_ : forall _ : is_true (@uniq ptr_eqType (Search2.untag s)), is_true (negb (@eq_op ptr_eqType x y))) (_ : is_true (@uniq ptr_eqType (Search2.untag s))), is_true (negb (@eq_op ptr_eqType x y)) *) by apply. Qed. Lemma noaliasR_fwd3 s (f : Scan.form s) (D : def f) x y Proof. (* Goal: is_true (negb (@eq_op ptr_eqType x (@y_of x y s g))) *) case: f D=>h A /= D. (* Goal: is_true (negb (@eq_op ptr_eqType x (@y_of x y s g))) *) case: A g=>// U _ [y' /= ->]. (* Goal: forall _ : forall _ : is_true (@uniq ptr_eqType s), is_true (negb (@eq_op ptr_eqType x y)), is_true (negb (@eq_op ptr_eqType x y)) *) by apply. Qed. Lemma noaliasR_fwd3' s (f : Scan.form s) (D : def f) x Proof. (* Goal: is_true (negb (@eq_op ptr_eqType x (@y_of' x s g))) *) case: f D=>h A /= D. (* Goal: is_true (negb (@eq_op ptr_eqType x (@y_of' x s g))) *) case: A g=>// U _[y' /= ->] //. Qed.
Require Export Qpositive_le. Require Export Qpositive_plus_mult. Ltac make_fraction w p q Heq := elim (interp_non_zero w); intros p (q, Heq). Ltac expand a b c d p q Heq Heq1 Heq2 := elim (construct_correct2' c a b); [ intros d; elim (interp_non_zero (Qpositive_c a b c)); intros p (q, Heq); rewrite Heq; unfold fst, snd in |- *; intros (Heq1, Heq2) | try (simpl in |- *; auto with arith; fail) | try (simpl in |- *; auto with arith; fail) | auto ]. Theorem Qpositive_le_add : forall w w' w'' : Qpositive, Qpositive_le w w' -> Qpositive_le (Qpositive_plus w w'') (Qpositive_plus w' w''). Proof. (* Goal: forall (w w' w'' : Qpositive) (_ : Qpositive_le w w'), Qpositive_le (Qpositive_plus w w'') (Qpositive_plus w' w'') *) intros w w' w''; make_fraction w ipattern:(p) ipattern:(q) ipattern:(Heq); make_fraction w' ipattern:(p') ipattern:(q') ipattern:(Heq'); make_fraction w'' ipattern:(p'') ipattern:(q'') ipattern:(Heq''). (* Goal: forall _ : Qpositive_le w w', Qpositive_le (Qpositive_plus w w'') (Qpositive_plus w' w'') *) intros H; apply Qpositive_le'_to_Qpositive_le; generalize (Qpositive_le_to_Qpositive_le' _ _ H); clear H. (* Goal: forall _ : Qpositive_le' w w', Qpositive_le' (Qpositive_plus w w'') (Qpositive_plus w' w'') *) unfold Qpositive_le' in |- *; simpl in |- *. (* Goal: forall _ : let (p, q) := Qpositive_i w in let (p', q') := Qpositive_i w' in le (Init.Nat.mul p q') (Init.Nat.mul p' q), let (p, q) := Qpositive_i (Qpositive_plus w w'') in let (p', q') := Qpositive_i (Qpositive_plus w' w'') in le (Init.Nat.mul p q') (Init.Nat.mul p' q) *) unfold Qpositive_le', Qpositive_plus in |- *; simpl in |- *; rewrite Heq; rewrite Heq'; rewrite Heq''. (* Goal: forall _ : le (Init.Nat.mul (S p) (S q')) (Init.Nat.mul (S p') (S q)), let (p, q) := Qpositive_i (Qpositive_c (Init.Nat.add (Init.Nat.mul (S p) (S q'')) (Init.Nat.mul (S p'') (S q))) (Init.Nat.mul (S q) (S q'')) (Init.Nat.add (Init.Nat.add (Init.Nat.mul (S p) (S q'')) (Init.Nat.mul (S p'') (S q))) (Init.Nat.mul (S q) (S q'')))) in let (p', q') := Qpositive_i (Qpositive_c (Init.Nat.add (Init.Nat.mul (S p') (S q'')) (Init.Nat.mul (S p'') (S q'))) (Init.Nat.mul (S q') (S q'')) (Init.Nat.add (Init.Nat.add (Init.Nat.mul (S p') (S q'')) (Init.Nat.mul (S p'') (S q'))) (Init.Nat.mul (S q') (S q'')))) in le (Init.Nat.mul p q') (Init.Nat.mul p' q) *) expand (S p * S q'' + S p'' * S q) (S q * S q'') (S p * S q'' + S p'' * S q + S q * S q'') ipattern:(d) ipattern:(p3) ipattern:(q3) ipattern:(Heq3) ipattern:(Heq1) ipattern:(Heq2). (* Goal: forall _ : le (Init.Nat.mul (S p) (S q')) (Init.Nat.mul (S p') (S q)), let (p', q') := Qpositive_i (Qpositive_c (Init.Nat.add (Init.Nat.mul (S p') (S q'')) (Init.Nat.mul (S p'') (S q'))) (Init.Nat.mul (S q') (S q'')) (Init.Nat.add (Init.Nat.add (Init.Nat.mul (S p') (S q'')) (Init.Nat.mul (S p'') (S q'))) (Init.Nat.mul (S q') (S q'')))) in le (Init.Nat.mul (S p3) q') (Init.Nat.mul p' (S q3)) *) expand (S p' * S q'' + S p'' * S q') (S q' * S q'') (S p' * S q'' + S p'' * S q' + S q' * S q'') ipattern:(d') ipattern:(p4) ipattern:(q4) ipattern:(Heq4) ipattern:(Heq5) ipattern:(Heq6). (* Goal: forall _ : le (Init.Nat.mul (S p) (S q')) (Init.Nat.mul (S p') (S q)), le (Init.Nat.mul (S p3) (S q4)) (Init.Nat.mul (S p4) (S q3)) *) intros Hle; apply mult_S_le_reg_l with d; rewrite (mult_comm (S p3)); repeat rewrite (mult_comm (S d)); repeat rewrite <- mult_assoc. (* Goal: le (Nat.mul (S q4) (Nat.mul (S p3) (S d))) (Nat.mul (S p4) (Nat.mul (S q3) (S d))) *) rewrite <- Heq1; rewrite <- Heq2. (* Goal: le (Nat.mul (S q4) (Init.Nat.add (Init.Nat.mul (S p) (S q'')) (Init.Nat.mul (S p'') (S q)))) (Nat.mul (S p4) (Init.Nat.mul (S q) (S q''))) *) apply mult_S_le_reg_l with d'; repeat rewrite mult_assoc; repeat rewrite (mult_comm (S d')). (* Goal: le (Nat.mul (Nat.mul (S q4) (S d')) (Init.Nat.add (Init.Nat.mul (S p) (S q'')) (Init.Nat.mul (S p'') (S q)))) (Nat.mul (Nat.mul (Nat.mul (S p4) (S d')) (S q)) (S q'')) *) rewrite <- Heq5; rewrite <- Heq6. (* Goal: le (Nat.mul (Init.Nat.mul (S q') (S q'')) (Init.Nat.add (Init.Nat.mul (S p) (S q'')) (Init.Nat.mul (S p'') (S q)))) (Nat.mul (Nat.mul (Init.Nat.add (Init.Nat.mul (S p') (S q'')) (Init.Nat.mul (S p'') (S q'))) (S q)) (S q'')) *) rewrite mult_plus_distr_l; repeat rewrite mult_plus_distr_r. (* Goal: le (Nat.add (Nat.mul (Init.Nat.mul (S q') (S q'')) (Init.Nat.mul (S p) (S q''))) (Nat.mul (Init.Nat.mul (S q') (S q'')) (Init.Nat.mul (S p'') (S q)))) (Nat.add (Nat.mul (Nat.mul (Init.Nat.mul (S p') (S q'')) (S q)) (S q'')) (Nat.mul (Nat.mul (Init.Nat.mul (S p'') (S q')) (S q)) (S q''))) *) match goal with | |- (_ + ?X1 <= _ + ?X2) => replace X1 with X2; [ try apply plus_le_compat_r | ring ] end. (* Goal: le (Nat.mul (Init.Nat.mul (S q') (S q'')) (Init.Nat.mul (S p) (S q''))) (Nat.mul (Nat.mul (Init.Nat.mul (S p') (S q'')) (S q)) (S q'')) *) repeat rewrite <- (mult_comm (S q'')); repeat rewrite <- mult_assoc. (* Goal: le (Nat.mul (S q'') (Nat.mul (S q') (Nat.mul (S q'') (S p)))) (Nat.mul (S q'') (Nat.mul (S q'') (Nat.mul (S p') (S q)))) *) apply (fun m n p : nat => mult_le_compat_l p n m). (* Goal: le (Nat.mul (S q') (Nat.mul (S q'') (S p))) (Nat.mul (S q'') (Nat.mul (S p') (S q))) *) rewrite mult_assoc; rewrite <- (mult_comm (S q'')); rewrite <- mult_assoc; apply (fun m n p : nat => mult_le_compat_l p n m). (* Goal: le (Nat.mul (S q') (S p)) (Nat.mul (S p') (S q)) *) rewrite (mult_comm (S q')); exact Hle. Qed. Theorem Qpositive_le_mult : forall w w' w'' : Qpositive, Qpositive_le w w' -> Qpositive_le (Qpositive_mult w w'') (Qpositive_mult w' w''). Proof. (* Goal: forall (w w' w'' : Qpositive) (_ : Qpositive_le w w'), Qpositive_le (Qpositive_mult w w'') (Qpositive_mult w' w'') *) intros w w' w''; make_fraction w ipattern:(p) ipattern:(q) ipattern:(Heq); make_fraction w' ipattern:(p') ipattern:(q') ipattern:(Heq'); make_fraction w'' ipattern:(p'') ipattern:(q'') ipattern:(Heq''). (* Goal: forall _ : Qpositive_le w w', Qpositive_le (Qpositive_mult w w'') (Qpositive_mult w' w'') *) intros H; apply Qpositive_le'_to_Qpositive_le; generalize (Qpositive_le_to_Qpositive_le' _ _ H); clear H. (* Goal: forall _ : Qpositive_le' w w', Qpositive_le' (Qpositive_mult w w'') (Qpositive_mult w' w'') *) unfold Qpositive_le', Qpositive_mult in |- *; simpl in |- *; rewrite Heq; rewrite Heq'; rewrite Heq''. (* Goal: forall _ : le (Init.Nat.mul (S p) (S q')) (Init.Nat.mul (S p') (S q)), let (p, q) := Qpositive_i (Qpositive_c (Init.Nat.mul (S p) (S p'')) (Init.Nat.mul (S q) (S q'')) (Init.Nat.add (Init.Nat.mul (S p) (S p'')) (Init.Nat.mul (S q) (S q'')))) in let (p', q') := Qpositive_i (Qpositive_c (Init.Nat.mul (S p') (S p'')) (Init.Nat.mul (S q') (S q'')) (Init.Nat.add (Init.Nat.mul (S p') (S p'')) (Init.Nat.mul (S q') (S q'')))) in le (Init.Nat.mul p q') (Init.Nat.mul p' q) *) expand (S p * S p'') (S q * S q'') (S p * S p'' + S q * S q'') ipattern:(d) ipattern:(p3) ipattern:(q3) ipattern:(Heq3) ipattern:(Heq1) ipattern:(Heq2). (* Goal: forall _ : le (Init.Nat.mul (S p) (S q')) (Init.Nat.mul (S p') (S q)), let (p', q') := Qpositive_i (Qpositive_c (Init.Nat.mul (S p') (S p'')) (Init.Nat.mul (S q') (S q'')) (Init.Nat.add (Init.Nat.mul (S p') (S p'')) (Init.Nat.mul (S q') (S q'')))) in le (Init.Nat.mul (S p3) q') (Init.Nat.mul p' (S q3)) *) expand (S p' * S p'') (S q' * S q'') (S p' * S p'' + S q' * S q'') ipattern:(d') ipattern:(p4) ipattern:(q4) ipattern:(Heq4) ipattern:(Heq5) ipattern:(Heq6). (* Goal: forall _ : le (Init.Nat.mul (S p) (S q')) (Init.Nat.mul (S p') (S q)), le (Init.Nat.mul (S p3) (S q4)) (Init.Nat.mul (S p4) (S q3)) *) intros Hle; apply mult_S_le_reg_l with d; rewrite (mult_comm (S p3)); repeat rewrite (mult_comm (S d)); repeat rewrite <- mult_assoc. (* Goal: le (Nat.mul (S q4) (Nat.mul (S p3) (S d))) (Nat.mul (S p4) (Nat.mul (S q3) (S d))) *) rewrite <- Heq1; rewrite <- Heq2. (* Goal: le (Nat.mul (S q4) (Init.Nat.mul (S p) (S p''))) (Nat.mul (S p4) (Init.Nat.mul (S q) (S q''))) *) apply mult_S_le_reg_l with d'; repeat rewrite mult_assoc; repeat rewrite (mult_comm (S d')); rewrite <- Heq5; rewrite <- Heq6. (* Goal: le (Nat.mul (Nat.mul (Init.Nat.mul (S q') (S q'')) (S p)) (S p'')) (Nat.mul (Nat.mul (Init.Nat.mul (S p') (S p'')) (S q)) (S q'')) *) replace (S q' * S q'' * S p * S p'') with (S q'' * S p'' * (S p * S q')). (* Goal: @eq nat (Init.Nat.mul (Init.Nat.mul (S q'') (S p'')) (Init.Nat.mul (S p) (S q'))) (Init.Nat.mul (Init.Nat.mul (Init.Nat.mul (S q') (S q'')) (S p)) (S p'')) *) (* Goal: le (Init.Nat.mul (Init.Nat.mul (S q'') (S p'')) (Init.Nat.mul (S p) (S q'))) (Nat.mul (Nat.mul (Init.Nat.mul (S p') (S p'')) (S q)) (S q'')) *) replace (S p' * S p'' * S q * S q'') with (S q'' * S p'' * (S p' * S q)). (* Goal: @eq nat (Init.Nat.mul (Init.Nat.mul (S q'') (S p'')) (Init.Nat.mul (S p) (S q'))) (Init.Nat.mul (Init.Nat.mul (Init.Nat.mul (S q') (S q'')) (S p)) (S p'')) *) (* Goal: @eq nat (Init.Nat.mul (Init.Nat.mul (S q'') (S p'')) (Init.Nat.mul (S p') (S q))) (Init.Nat.mul (Init.Nat.mul (Init.Nat.mul (S p') (S p'')) (S q)) (S q'')) *) (* Goal: le (Init.Nat.mul (Init.Nat.mul (S q'') (S p'')) (Init.Nat.mul (S p) (S q'))) (Init.Nat.mul (Init.Nat.mul (S q'') (S p'')) (Init.Nat.mul (S p') (S q))) *) apply (fun m n p : nat => mult_le_compat_l p n m); exact Hle. (* Goal: @eq nat (Init.Nat.mul (Init.Nat.mul (S q'') (S p'')) (Init.Nat.mul (S p) (S q'))) (Init.Nat.mul (Init.Nat.mul (Init.Nat.mul (S q') (S q'')) (S p)) (S p'')) *) (* Goal: @eq nat (Init.Nat.mul (Init.Nat.mul (S q'') (S p'')) (Init.Nat.mul (S p') (S q))) (Init.Nat.mul (Init.Nat.mul (Init.Nat.mul (S p') (S p'')) (S q)) (S q'')) *) ring. (* Goal: @eq nat (Init.Nat.mul (Init.Nat.mul (S q'') (S p'')) (Init.Nat.mul (S p) (S q'))) (Init.Nat.mul (Init.Nat.mul (Init.Nat.mul (S q') (S q'')) (S p)) (S p'')) *) ring. Qed. Theorem Qpositive_plus_le : forall w w' : Qpositive, Qpositive_le w (Qpositive_plus w w'). Proof. (* Goal: forall w w' : Qpositive, Qpositive_le w (Qpositive_plus w w') *) intros w w'; apply Qpositive_le'_to_Qpositive_le. (* Goal: Qpositive_le' w (Qpositive_plus w w') *) unfold Qpositive_le' in |- *. (* Goal: let (p, q) := Qpositive_i w in let (p', q') := Qpositive_i (Qpositive_plus w w') in le (Init.Nat.mul p q') (Init.Nat.mul p' q) *) unfold Qpositive_plus in |- *. (* Goal: let (p, q) := Qpositive_i w in let (p', q') := Qpositive_i (let (p0, q0) := Qpositive_i w in let (p', q') := Qpositive_i w' in Qpositive_c (Init.Nat.add (Init.Nat.mul p0 q') (Init.Nat.mul p' q0)) (Init.Nat.mul q0 q') (Init.Nat.add (Init.Nat.add (Init.Nat.mul p0 q') (Init.Nat.mul p' q0)) (Init.Nat.mul q0 q'))) in le (Init.Nat.mul p q') (Init.Nat.mul p' q) *) elim (interp_non_zero w); intros p (q, Heq); elim (interp_non_zero w'); intros p' (q', Heq'). (* Goal: let (p, q) := Qpositive_i w in let (p', q') := Qpositive_i (let (p0, q0) := Qpositive_i w in let (p', q') := Qpositive_i w' in Qpositive_c (Init.Nat.add (Init.Nat.mul p0 q') (Init.Nat.mul p' q0)) (Init.Nat.mul q0 q') (Init.Nat.add (Init.Nat.add (Init.Nat.mul p0 q') (Init.Nat.mul p' q0)) (Init.Nat.mul q0 q'))) in le (Init.Nat.mul p q') (Init.Nat.mul p' q) *) rewrite Heq; rewrite Heq'. (* Goal: let (p', q') := Qpositive_i (Qpositive_c (Init.Nat.add (Init.Nat.mul (S p) (S q')) (Init.Nat.mul (S p') (S q))) (Init.Nat.mul (S q) (S q')) (Init.Nat.add (Init.Nat.add (Init.Nat.mul (S p) (S q')) (Init.Nat.mul (S p') (S q))) (Init.Nat.mul (S q) (S q')))) in le (Init.Nat.mul (S p) q') (Init.Nat.mul p' (S q)) *) expand (S p * S q' + S p' * S q) (S q * S q') (S p * S q' + S p' * S q + S q * S q') ipattern:(d) ipattern:(p'') ipattern:(q'') ipattern:(Heq2) ipattern:(Heq3) ipattern:(Heq4). (* Goal: le (Init.Nat.mul (S p) (S q'')) (Init.Nat.mul (S p'') (S q)) *) apply mult_S_le_reg_l with d. (* Goal: le (Init.Nat.mul (S d) (Init.Nat.mul (S p) (S q''))) (Init.Nat.mul (S d) (Init.Nat.mul (S p'') (S q))) *) rewrite (mult_assoc (S d) (S p'')); repeat rewrite (mult_comm (S d)); rewrite <- (mult_assoc (S p)); rewrite <- Heq3; rewrite <- Heq4. (* Goal: le (Nat.mul (S p) (Init.Nat.mul (S q) (S q'))) (Nat.mul (Init.Nat.add (Init.Nat.mul (S p) (S q')) (Init.Nat.mul (S p') (S q))) (S q)) *) rewrite mult_plus_distr_r. (* Goal: le (Nat.mul (S p) (Init.Nat.mul (S q) (S q'))) (Nat.add (Nat.mul (Init.Nat.mul (S p) (S q')) (S q)) (Nat.mul (Init.Nat.mul (S p') (S q)) (S q))) *) replace (S p * S q' * S q) with (S p * (S q * S q')). (* Goal: @eq nat (Init.Nat.mul (S p) (Init.Nat.mul (S q) (S q'))) (Init.Nat.mul (Init.Nat.mul (S p) (S q')) (S q)) *) (* Goal: le (Nat.mul (S p) (Init.Nat.mul (S q) (S q'))) (Nat.add (Init.Nat.mul (S p) (Init.Nat.mul (S q) (S q'))) (Nat.mul (Init.Nat.mul (S p') (S q)) (S q))) *) auto with arith. (* Goal: @eq nat (Init.Nat.mul (S p) (Init.Nat.mul (S q) (S q'))) (Init.Nat.mul (Init.Nat.mul (S p) (S q')) (S q)) *) ring. Qed.
Require Export Coq.Strings.String. Require Import Coq.Strings.Ascii. Require Import Coq.NArith.NArith. Local Open Scope char_scope. Local Open Scope N_scope. Definition binDigitToN (c : ascii) : option N := match c with | "0" => Some 0 | "1" => Some 1 | _ => None end. Open Scope string_scope. Fixpoint readBinNAux (s : string) (acc : N) : option N := match s with | "" => Some acc | String c s' => match binDigitToN c with | Some n => readBinNAux s' (2 * acc + n) | None => None end end. Definition readBinN (s : string) : option N := readBinNAux s 0. Goal readBinN "11111111" = Some 255. Definition forceOption A Err (o : option A) (err : Err) : match o with | Some _ => A | None => Err end := match o with | Some a => a | None => err end. Inductive parseError := ParseError. Definition bin (s : string) := forceOption N parseError (readBinN s) ParseError. Goal bin"11111111" = 255. Goal bin"1011" = 11. Goal bin"1O" = ParseError.
Set Automatic Coercions Import. Set Implicit Arguments. Unset Strict Implicit. Require Export Integral_domain_facts. Require Export Cfield_cat. Require Export Abelian_group_facts. Require Export Ring_util. Section Def. Variable R : INTEGRAL_DOMAIN. Variable diff10 : ~ Equal (ring_unit R) (monoid_unit R). Set Strict Implicit. Unset Implicit Arguments. Record fraction : Type := {num : R; den : R; den_prf : ~ Equal den (monoid_unit R)}. Set Implicit Arguments. Unset Strict Implicit. Hint Resolve den_prf: algebra. Definition eqfraction (x y : fraction) := Equal (ring_mult (num x) (den y)) (ring_mult (num y) (den x)). Lemma eqfraction_refl : reflexive eqfraction. Proof. (* Goal: @reflexive fraction eqfraction *) red in |- *. (* Goal: forall x : fraction, @app_rel fraction eqfraction x x *) intros x; red in |- *. (* Goal: eqfraction x x *) red in |- *. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (num x) (den x)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (den x)) *) auto with algebra. Qed. Definition fraction0 := Build_fraction (monoid_unit R) (ring_unit R) diff10. Lemma eqfraction0 : forall x : fraction, eqfraction x fraction0 -> Equal (num x) (monoid_unit R). Proof. (* Goal: forall (x : fraction) (_ : eqfraction x fraction0), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (num x) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) intros x; try assumption. (* Goal: forall _ : eqfraction x fraction0, @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (num x) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) case x; unfold eqfraction, fraction0 in |- *; simpl in |- *. (* Goal: forall (num den : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))))) (_ : not (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) den (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) num (ring_unit (cring_ring (idomain_ring R)))) (@ring_mult (cring_ring (idomain_ring R)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) den)), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) num (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) intros numer denom H' H'0; try assumption. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) numer (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) apply Trans with (ring_mult numer (ring_unit R)); auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) numer (ring_unit (cring_ring (idomain_ring R)))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) apply Trans with (ring_mult (monoid_unit R) denom); auto with algebra. Qed. Lemma eqfraction_num0 : forall x : fraction, Equal (num x) (monoid_unit R) -> eqfraction x fraction0. Proof. (* Goal: forall (x : fraction) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (num x) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))))), eqfraction x fraction0 *) intros x; try assumption. (* Goal: forall _ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (num x) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))), eqfraction x fraction0 *) case x; unfold eqfraction, fraction0 in |- *; simpl in |- *. (* Goal: forall (num den : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))))) (_ : not (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) den (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) num (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))))), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) num (ring_unit (cring_ring (idomain_ring R)))) (@ring_mult (cring_ring (idomain_ring R)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) den) *) intros numer denom H' H'0; try assumption. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) numer (ring_unit (cring_ring (idomain_ring R)))) (@ring_mult (cring_ring (idomain_ring R)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) denom) *) apply Trans with numer; auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) numer (@ring_mult (cring_ring (idomain_ring R)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) denom) *) apply Trans with (monoid_unit R); auto with algebra. Qed. Lemma eqfraction_sym : symmetric eqfraction. Proof. (* Goal: @symmetric fraction eqfraction *) red in |- *. (* Goal: forall (x y : fraction) (_ : @app_rel fraction eqfraction x y), @app_rel fraction eqfraction y x *) unfold app_rel, eqfraction in |- *; auto with algebra. Qed. Lemma eqfraction_trans : transitive eqfraction. Proof. (* Goal: @transitive fraction eqfraction *) red in |- *. (* Goal: forall (x y z : fraction) (_ : @app_rel fraction eqfraction x y) (_ : @app_rel fraction eqfraction y z), @app_rel fraction eqfraction x z *) unfold app_rel, eqfraction in |- *. (* Goal: forall (x y z : fraction) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (num x) (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den z)) (@ring_mult (cring_ring (idomain_ring R)) (num z) (den y))), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (num x) (den z)) (@ring_mult (cring_ring (idomain_ring R)) (num z) (den x)) *) intros x y z H' H'0; try assumption. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (num x) (den z)) (@ring_mult (cring_ring (idomain_ring R)) (num z) (den x)) *) apply INTEGRAL_DOMAIN_simpl_l with (den y). (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (den y) (@ring_mult (cring_ring (idomain_ring R)) (num x) (den z))) (@ring_mult (cring_ring (idomain_ring R)) (den y) (@ring_mult (cring_ring (idomain_ring R)) (num z) (den x))) *) (* Goal: not (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (den y) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))))) *) auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (den y) (@ring_mult (cring_ring (idomain_ring R)) (num x) (den z))) (@ring_mult (cring_ring (idomain_ring R)) (den y) (@ring_mult (cring_ring (idomain_ring R)) (num z) (den x))) *) apply Trans with (ring_mult (ring_mult (den y) (num x)) (den z)). (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (den y) (num x)) (den z)) (@ring_mult (cring_ring (idomain_ring R)) (den y) (@ring_mult (cring_ring (idomain_ring R)) (num z) (den x))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (den y) (@ring_mult (cring_ring (idomain_ring R)) (num x) (den z))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (den y) (num x)) (den z)) *) auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (den y) (num x)) (den z)) (@ring_mult (cring_ring (idomain_ring R)) (den y) (@ring_mult (cring_ring (idomain_ring R)) (num z) (den x))) *) apply Trans with (ring_mult (ring_mult (num x) (den y)) (den z)). (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (den y)) (den z)) (@ring_mult (cring_ring (idomain_ring R)) (den y) (@ring_mult (cring_ring (idomain_ring R)) (num z) (den x))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (den y) (num x)) (den z)) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (den y)) (den z)) *) auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (den y)) (den z)) (@ring_mult (cring_ring (idomain_ring R)) (den y) (@ring_mult (cring_ring (idomain_ring R)) (num z) (den x))) *) apply Trans with (ring_mult (ring_mult (num y) (den x)) (den z)). (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x)) (den z)) (@ring_mult (cring_ring (idomain_ring R)) (den y) (@ring_mult (cring_ring (idomain_ring R)) (num z) (den x))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (den y)) (den z)) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x)) (den z)) *) auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x)) (den z)) (@ring_mult (cring_ring (idomain_ring R)) (den y) (@ring_mult (cring_ring (idomain_ring R)) (num z) (den x))) *) apply Trans with (ring_mult (ring_mult (den x) (num y)) (den z)). (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (den x) (num y)) (den z)) (@ring_mult (cring_ring (idomain_ring R)) (den y) (@ring_mult (cring_ring (idomain_ring R)) (num z) (den x))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x)) (den z)) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (den x) (num y)) (den z)) *) auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (den x) (num y)) (den z)) (@ring_mult (cring_ring (idomain_ring R)) (den y) (@ring_mult (cring_ring (idomain_ring R)) (num z) (den x))) *) apply Trans with (ring_mult (den x) (ring_mult (num y) (den z))). (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den z))) (@ring_mult (cring_ring (idomain_ring R)) (den y) (@ring_mult (cring_ring (idomain_ring R)) (num z) (den x))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (den x) (num y)) (den z)) (@ring_mult (cring_ring (idomain_ring R)) (den x) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den z))) *) auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den z))) (@ring_mult (cring_ring (idomain_ring R)) (den y) (@ring_mult (cring_ring (idomain_ring R)) (num z) (den x))) *) apply Trans with (ring_mult (den x) (ring_mult (num z) (den y))). (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (@ring_mult (cring_ring (idomain_ring R)) (num z) (den y))) (@ring_mult (cring_ring (idomain_ring R)) (den y) (@ring_mult (cring_ring (idomain_ring R)) (num z) (den x))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den z))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (@ring_mult (cring_ring (idomain_ring R)) (num z) (den y))) *) auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (@ring_mult (cring_ring (idomain_ring R)) (num z) (den y))) (@ring_mult (cring_ring (idomain_ring R)) (den y) (@ring_mult (cring_ring (idomain_ring R)) (num z) (den x))) *) apply Trans with (ring_mult (ring_mult (den x) (num z)) (den y)). (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (den x) (num z)) (den y)) (@ring_mult (cring_ring (idomain_ring R)) (den y) (@ring_mult (cring_ring (idomain_ring R)) (num z) (den x))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (@ring_mult (cring_ring (idomain_ring R)) (num z) (den y))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (den x) (num z)) (den y)) *) auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (den x) (num z)) (den y)) (@ring_mult (cring_ring (idomain_ring R)) (den y) (@ring_mult (cring_ring (idomain_ring R)) (num z) (den x))) *) apply Trans with (ring_mult (ring_mult (num z) (den x)) (den y)); auto with algebra. Qed. Definition fraction_set : SET. Proof. (* Goal: Ob SET *) apply (Build_Setoid (Carrier:=fraction) (Equal:=eqfraction)). (* Goal: @equivalence fraction eqfraction *) red in |- *. (* Goal: and (@reflexive fraction eqfraction) (@partial_equivalence fraction eqfraction) *) split; [ try assumption | idtac ]. (* Goal: @partial_equivalence fraction eqfraction *) (* Goal: @reflexive fraction eqfraction *) exact eqfraction_refl. (* Goal: @partial_equivalence fraction eqfraction *) red in |- *. (* Goal: and (@transitive fraction eqfraction) (@symmetric fraction eqfraction) *) split; [ try assumption | idtac ]. (* Goal: @symmetric fraction eqfraction *) (* Goal: @transitive fraction eqfraction *) exact eqfraction_trans. (* Goal: @symmetric fraction eqfraction *) exact eqfraction_sym. Qed. Definition addfraction_fun (x y : fraction_set) : fraction_set := Build_fraction (sgroup_law R (ring_mult (num x) (den y)) (ring_mult (num y) (den x))) (ring_mult (den x) (den y)) (INTEGRAL_DOMAIN_prop_rev (den_prf x) (den_prf y)). Definition opfraction_fun (x : fraction_set) : fraction_set := Build_fraction (group_inverse R (num x)) (den x) (den_prf x). Definition multfraction_fun (x y : fraction_set) : fraction_set := Build_fraction (ring_mult (num x) (num y)) (ring_mult (den x) (den y)) (INTEGRAL_DOMAIN_prop_rev (den_prf x) (den_prf y)). Definition fraction1 : fraction_set := Build_fraction (ring_unit R) (ring_unit R) diff10. Lemma addfraction_law_l : forall x x' y : fraction_set, Equal x x' -> Equal (addfraction_fun x y) (addfraction_fun x' y). Proof. (* Goal: forall (x x' y : Carrier fraction_set) (_ : @Equal fraction_set x x'), @Equal fraction_set (addfraction_fun x y) (addfraction_fun x' y) *) unfold addfraction_fun in |- *; simpl in |- *. (* Goal: forall (x x' y : fraction) (_ : eqfraction x x'), eqfraction (Build_fraction (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x) (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y)) (@INTEGRAL_DOMAIN_prop_rev R (den x) (den y) (den_prf x) (den_prf y))) (Build_fraction (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x'))) (@ring_mult (cring_ring (idomain_ring R)) (den x') (den y)) (@INTEGRAL_DOMAIN_prop_rev R (den x') (den y) (den_prf x') (den_prf y))) *) unfold eqfraction in |- *; simpl in |- *. (* Goal: forall (x x' y : fraction) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (num x) (den x')) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den x))), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x) (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x))) (@ring_mult (cring_ring (idomain_ring R)) (den x') (den y))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x'))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y))) *) intros x x' y H'; try assumption. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x) (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x))) (@ring_mult (cring_ring (idomain_ring R)) (den x') (den y))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x'))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y))) *) apply Trans with (ring_mult (ring_mult (sgroup_law R (ring_mult (num x) (den y)) (ring_mult (num y) (den x))) (den x')) (den y)). (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x) (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x))) (den x')) (den y)) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x'))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x) (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x))) (@ring_mult (cring_ring (idomain_ring R)) (den x') (den y))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x) (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x))) (den x')) (den y)) *) auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x) (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x))) (den x')) (den y)) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x'))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y))) *) apply Trans with (ring_mult (ring_mult (sgroup_law R (ring_mult (num x') (den y)) (ring_mult (num y) (den x'))) (den x)) (den y)). (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x'))) (den x)) (den y)) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x'))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x) (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x))) (den x')) (den y)) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x'))) (den x)) (den y)) *) apply RING_comp. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x'))) (den x)) (den y)) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x'))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (den y) (den y) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x) (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x))) (den x')) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x'))) (den x)) *) apply Trans with (sgroup_law R (ring_mult (ring_mult (num x) (den y)) (den x')) (ring_mult (ring_mult (num y) (den x)) (den x'))). (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x'))) (den x)) (den y)) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x'))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (den y) (den y) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (den y)) (den x')) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x)) (den x'))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x'))) (den x)) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x) (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x))) (den x')) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (den y)) (den x')) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x)) (den x'))) *) auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x'))) (den x)) (den y)) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x'))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (den y) (den y) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (den y)) (den x')) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x)) (den x'))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x'))) (den x)) *) apply Trans with (sgroup_law R (ring_mult (ring_mult (num x') (den y)) (den x)) (ring_mult (ring_mult (num y) (den x')) (den x))). (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x'))) (den x)) (den y)) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x'))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (den y) (den y) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (den x)) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x')) (den x))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x'))) (den x)) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (den y)) (den x')) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x)) (den x'))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (den x)) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x')) (den x))) *) apply SGROUP_comp. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x'))) (den x)) (den y)) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x'))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (den y) (den y) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (den x)) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x')) (den x))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x'))) (den x)) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x)) (den x')) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x')) (den x)) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (den y)) (den x')) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (den x)) *) apply Trans with (ring_mult (ring_mult (den y) (num x)) (den x')). (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x'))) (den x)) (den y)) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x'))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (den y) (den y) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (den x)) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x')) (den x))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x'))) (den x)) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x)) (den x')) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x')) (den x)) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (den y) (num x)) (den x')) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (den x)) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (den y)) (den x')) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (den y) (num x)) (den x')) *) auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x'))) (den x)) (den y)) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x'))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (den y) (den y) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (den x)) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x')) (den x))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x'))) (den x)) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x)) (den x')) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x')) (den x)) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (den y) (num x)) (den x')) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (den x)) *) apply Trans with (ring_mult (ring_mult (den y) (num x')) (den x)). (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x'))) (den x)) (den y)) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x'))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (den y) (den y) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (den x)) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x')) (den x))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x'))) (den x)) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x)) (den x')) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x')) (den x)) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (den y) (num x')) (den x)) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (den x)) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (den y) (num x)) (den x')) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (den y) (num x')) (den x)) *) apply Trans with (ring_mult (den y) (ring_mult (num x) (den x'))). (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x'))) (den x)) (den y)) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x'))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (den y) (den y) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (den x)) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x')) (den x))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x'))) (den x)) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x)) (den x')) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x')) (den x)) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (den y) (num x')) (den x)) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (den x)) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (den y) (@ring_mult (cring_ring (idomain_ring R)) (num x) (den x'))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (den y) (num x')) (den x)) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (den y) (num x)) (den x')) (@ring_mult (cring_ring (idomain_ring R)) (den y) (@ring_mult (cring_ring (idomain_ring R)) (num x) (den x'))) *) auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x'))) (den x)) (den y)) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x'))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (den y) (den y) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (den x)) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x')) (den x))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x'))) (den x)) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x)) (den x')) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x')) (den x)) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (den y) (num x')) (den x)) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (den x)) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (den y) (@ring_mult (cring_ring (idomain_ring R)) (num x) (den x'))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (den y) (num x')) (den x)) *) apply Trans with (ring_mult (den y) (ring_mult (num x') (den x))). (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x'))) (den x)) (den y)) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x'))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (den y) (den y) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (den x)) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x')) (den x))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x'))) (den x)) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x)) (den x')) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x')) (den x)) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (den y) (num x')) (den x)) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (den x)) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (den y) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den x))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (den y) (num x')) (den x)) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (den y) (@ring_mult (cring_ring (idomain_ring R)) (num x) (den x'))) (@ring_mult (cring_ring (idomain_ring R)) (den y) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den x))) *) auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x'))) (den x)) (den y)) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x'))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (den y) (den y) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (den x)) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x')) (den x))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x'))) (den x)) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x)) (den x')) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x')) (den x)) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (den y) (num x')) (den x)) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (den x)) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (den y) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den x))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (den y) (num x')) (den x)) *) auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x'))) (den x)) (den y)) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x'))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (den y) (den y) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (den x)) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x')) (den x))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x'))) (den x)) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x)) (den x')) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x')) (den x)) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (den y) (num x')) (den x)) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (den x)) *) auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x'))) (den x)) (den y)) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x'))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (den y) (den y) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (den x)) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x')) (den x))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x'))) (den x)) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x)) (den x')) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x')) (den x)) *) apply Trans with (ring_mult (num y) (ring_mult (den x) (den x'))). (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x'))) (den x)) (den y)) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x'))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (den y) (den y) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (den x)) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x')) (den x))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x'))) (den x)) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (num y) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den x'))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x')) (den x)) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x)) (den x')) (@ring_mult (cring_ring (idomain_ring R)) (num y) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den x'))) *) auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x'))) (den x)) (den y)) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x'))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (den y) (den y) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (den x)) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x')) (den x))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x'))) (den x)) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (num y) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den x'))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x')) (den x)) *) apply Trans with (ring_mult (num y) (ring_mult (den x') (den x))). (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x'))) (den x)) (den y)) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x'))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (den y) (den y) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (den x)) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x')) (den x))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x'))) (den x)) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (num y) (@ring_mult (cring_ring (idomain_ring R)) (den x') (den x))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x')) (den x)) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (num y) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den x'))) (@ring_mult (cring_ring (idomain_ring R)) (num y) (@ring_mult (cring_ring (idomain_ring R)) (den x') (den x))) *) auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x'))) (den x)) (den y)) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x'))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (den y) (den y) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (den x)) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x')) (den x))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x'))) (den x)) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (num y) (@ring_mult (cring_ring (idomain_ring R)) (den x') (den x))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x')) (den x)) *) auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x'))) (den x)) (den y)) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x'))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (den y) (den y) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (den x)) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x')) (den x))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x'))) (den x)) *) auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x'))) (den x)) (den y)) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x'))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (den y) (den y) *) auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x'))) (den x)) (den y)) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x'))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y))) *) auto with algebra. Qed. Lemma addfraction_fun_com : forall x y : fraction_set, Equal (addfraction_fun x y) (addfraction_fun y x). Proof. (* Goal: forall x y : Carrier fraction_set, @Equal fraction_set (addfraction_fun x y) (addfraction_fun y x) *) unfold addfraction_fun in |- *; simpl in |- *. (* Goal: forall x y : fraction, eqfraction (Build_fraction (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x) (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y)) (@INTEGRAL_DOMAIN_prop_rev R (den x) (den y) (den_prf x) (den_prf y))) (Build_fraction (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (den y))) (@ring_mult (cring_ring (idomain_ring R)) (den y) (den x)) (@INTEGRAL_DOMAIN_prop_rev R (den y) (den x) (den_prf y) (den_prf x))) *) unfold eqfraction in |- *; simpl in |- *. (* Goal: forall x y : fraction, @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x) (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x))) (@ring_mult (cring_ring (idomain_ring R)) (den y) (den x))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (den y))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y))) *) intros x y; try assumption. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x) (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x))) (@ring_mult (cring_ring (idomain_ring R)) (den y) (den x))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (den y))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y))) *) apply RING_comp; auto with algebra. Qed. Lemma addfraction_law_r : forall x y y' : fraction_set, Equal y y' -> Equal (addfraction_fun x y) (addfraction_fun x y'). Proof. (* Goal: forall (x y y' : Carrier fraction_set) (_ : @Equal fraction_set y y'), @Equal fraction_set (addfraction_fun x y) (addfraction_fun x y') *) intros x y y' H'; try assumption. (* Goal: @Equal fraction_set (addfraction_fun x y) (addfraction_fun x y') *) apply Trans with (addfraction_fun y x). (* Goal: @Equal fraction_set (addfraction_fun y x) (addfraction_fun x y') *) (* Goal: @Equal fraction_set (addfraction_fun x y) (addfraction_fun y x) *) apply addfraction_fun_com. (* Goal: @Equal fraction_set (addfraction_fun y x) (addfraction_fun x y') *) apply Trans with (addfraction_fun y' x). (* Goal: @Equal fraction_set (addfraction_fun y' x) (addfraction_fun x y') *) (* Goal: @Equal fraction_set (addfraction_fun y x) (addfraction_fun y' x) *) apply addfraction_law_l; auto with algebra. (* Goal: @Equal fraction_set (addfraction_fun y' x) (addfraction_fun x y') *) apply addfraction_fun_com. Qed. Lemma addfraction_law : fun2_compatible addfraction_fun. Proof. (* Goal: @fun2_compatible fraction_set fraction_set fraction_set addfraction_fun *) red in |- *. (* Goal: forall (x x' y y' : Carrier fraction_set) (_ : @Equal fraction_set x x') (_ : @Equal fraction_set y y'), @Equal fraction_set (addfraction_fun x y) (addfraction_fun x' y') *) intros x x' y y' H' H'0; try assumption. (* Goal: @Equal fraction_set (addfraction_fun x y) (addfraction_fun x' y') *) apply Trans with (addfraction_fun x' y). (* Goal: @Equal fraction_set (addfraction_fun x' y) (addfraction_fun x' y') *) (* Goal: @Equal fraction_set (addfraction_fun x y) (addfraction_fun x' y) *) apply addfraction_law_l; auto with algebra. (* Goal: @Equal fraction_set (addfraction_fun x' y) (addfraction_fun x' y') *) apply addfraction_law_r; auto with algebra. Qed. Lemma multfraction_dist_l : forall x y z : fraction_set, Equal (multfraction_fun x (addfraction_fun y z)) (addfraction_fun (multfraction_fun x y) (multfraction_fun x z)). Proof. (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun x (addfraction_fun y z)) (addfraction_fun (multfraction_fun x y) (multfraction_fun x z)) *) simpl in |- *. (* Goal: forall x y z : fraction, eqfraction (multfraction_fun x (addfraction_fun y z)) (addfraction_fun (multfraction_fun x y) (multfraction_fun x z)) *) unfold multfraction_fun, eqfraction in |- *; simpl in |- *. (* Goal: forall x y z : fraction, @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den z)) (@ring_mult (cring_ring (idomain_ring R)) (num z) (den y)))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y)) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den z)))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (num y)) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den z))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (num z)) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y)))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (@ring_mult (cring_ring (idomain_ring R)) (den y) (den z)))) *) intros x y z; try assumption. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den z)) (@ring_mult (cring_ring (idomain_ring R)) (num z) (den y)))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y)) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den z)))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (num y)) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den z))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (num z)) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y)))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (@ring_mult (cring_ring (idomain_ring R)) (den y) (den z)))) *) apply Trans with (ring_mult (ring_mult (num x) (sgroup_law R (ring_mult (num y) (den z)) (ring_mult (num z) (den y)))) (ring_mult (den x) (ring_mult (den y) (ring_mult (den x) (den z))))). (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den z)) (@ring_mult (cring_ring (idomain_ring R)) (num z) (den y)))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (@ring_mult (cring_ring (idomain_ring R)) (den y) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den z))))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (num y)) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den z))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (num z)) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y)))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (@ring_mult (cring_ring (idomain_ring R)) (den y) (den z)))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den z)) (@ring_mult (cring_ring (idomain_ring R)) (num z) (den y)))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y)) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den z)))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den z)) (@ring_mult (cring_ring (idomain_ring R)) (num z) (den y)))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (@ring_mult (cring_ring (idomain_ring R)) (den y) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den z))))) *) auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den z)) (@ring_mult (cring_ring (idomain_ring R)) (num z) (den y)))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (@ring_mult (cring_ring (idomain_ring R)) (den y) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den z))))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (num y)) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den z))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (num z)) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y)))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (@ring_mult (cring_ring (idomain_ring R)) (den y) (den z)))) *) apply Trans with (ring_mult (ring_mult (ring_mult (num x) (sgroup_law R (ring_mult (num y) (den z)) (ring_mult (num z) (den y)))) (den x)) (ring_mult (den y) (ring_mult (den x) (den z)))). (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den z)) (@ring_mult (cring_ring (idomain_ring R)) (num z) (den y)))) (den x)) (@ring_mult (cring_ring (idomain_ring R)) (den y) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den z)))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (num y)) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den z))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (num z)) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y)))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (@ring_mult (cring_ring (idomain_ring R)) (den y) (den z)))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den z)) (@ring_mult (cring_ring (idomain_ring R)) (num z) (den y)))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (@ring_mult (cring_ring (idomain_ring R)) (den y) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den z))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den z)) (@ring_mult (cring_ring (idomain_ring R)) (num z) (den y)))) (den x)) (@ring_mult (cring_ring (idomain_ring R)) (den y) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den z)))) *) auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den z)) (@ring_mult (cring_ring (idomain_ring R)) (num z) (den y)))) (den x)) (@ring_mult (cring_ring (idomain_ring R)) (den y) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den z)))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (num y)) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den z))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (num z)) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y)))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (@ring_mult (cring_ring (idomain_ring R)) (den y) (den z)))) *) apply RING_comp. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (den y) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den z))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (@ring_mult (cring_ring (idomain_ring R)) (den y) (den z))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den z)) (@ring_mult (cring_ring (idomain_ring R)) (num z) (den y)))) (den x)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (num y)) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den z))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (num z)) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y)))) *) apply Trans with (ring_mult (sgroup_law R (ring_mult (num x) (ring_mult (num y) (den z))) (ring_mult (num x) (ring_mult (num z) (den y)))) (den x)). (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (den y) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den z))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (@ring_mult (cring_ring (idomain_ring R)) (den y) (den z))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den z))) (@ring_mult (cring_ring (idomain_ring R)) (num x) (@ring_mult (cring_ring (idomain_ring R)) (num z) (den y)))) (den x)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (num y)) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den z))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (num z)) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y)))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den z)) (@ring_mult (cring_ring (idomain_ring R)) (num z) (den y)))) (den x)) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den z))) (@ring_mult (cring_ring (idomain_ring R)) (num x) (@ring_mult (cring_ring (idomain_ring R)) (num z) (den y)))) (den x)) *) auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (den y) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den z))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (@ring_mult (cring_ring (idomain_ring R)) (den y) (den z))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den z))) (@ring_mult (cring_ring (idomain_ring R)) (num x) (@ring_mult (cring_ring (idomain_ring R)) (num z) (den y)))) (den x)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (num y)) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den z))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (num z)) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y)))) *) apply Trans with (sgroup_law R (ring_mult (ring_mult (num x) (ring_mult (num y) (den z))) (den x)) (ring_mult (ring_mult (num x) (ring_mult (num z) (den y))) (den x))). (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (den y) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den z))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (@ring_mult (cring_ring (idomain_ring R)) (den y) (den z))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den z))) (den x)) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (@ring_mult (cring_ring (idomain_ring R)) (num z) (den y))) (den x))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (num y)) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den z))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (num z)) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y)))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den z))) (@ring_mult (cring_ring (idomain_ring R)) (num x) (@ring_mult (cring_ring (idomain_ring R)) (num z) (den y)))) (den x)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den z))) (den x)) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (@ring_mult (cring_ring (idomain_ring R)) (num z) (den y))) (den x))) *) auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (den y) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den z))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (@ring_mult (cring_ring (idomain_ring R)) (den y) (den z))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den z))) (den x)) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (@ring_mult (cring_ring (idomain_ring R)) (num z) (den y))) (den x))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (num y)) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den z))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (num z)) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y)))) *) apply SGROUP_comp. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (den y) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den z))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (@ring_mult (cring_ring (idomain_ring R)) (den y) (den z))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (@ring_mult (cring_ring (idomain_ring R)) (num z) (den y))) (den x)) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (num z)) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den z))) (den x)) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (num y)) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den z))) *) apply Trans with (ring_mult (ring_mult (ring_mult (num x) (num y)) (den z)) (den x)). (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (den y) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den z))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (@ring_mult (cring_ring (idomain_ring R)) (den y) (den z))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (@ring_mult (cring_ring (idomain_ring R)) (num z) (den y))) (den x)) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (num z)) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (num y)) (den z)) (den x)) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (num y)) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den z))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den z))) (den x)) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (num y)) (den z)) (den x)) *) auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (den y) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den z))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (@ring_mult (cring_ring (idomain_ring R)) (den y) (den z))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (@ring_mult (cring_ring (idomain_ring R)) (num z) (den y))) (den x)) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (num z)) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (num y)) (den z)) (den x)) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (num y)) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den z))) *) apply Trans with (ring_mult (ring_mult (num x) (num y)) (ring_mult (den z) (den x))); auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (den y) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den z))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (@ring_mult (cring_ring (idomain_ring R)) (den y) (den z))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (@ring_mult (cring_ring (idomain_ring R)) (num z) (den y))) (den x)) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (num z)) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y))) *) apply Trans with (ring_mult (ring_mult (ring_mult (num x) (num z)) (den y)) (den x)). (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (den y) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den z))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (@ring_mult (cring_ring (idomain_ring R)) (den y) (den z))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (num z)) (den y)) (den x)) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (num z)) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (@ring_mult (cring_ring (idomain_ring R)) (num z) (den y))) (den x)) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (num z)) (den y)) (den x)) *) auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (den y) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den z))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (@ring_mult (cring_ring (idomain_ring R)) (den y) (den z))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (num z)) (den y)) (den x)) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (num z)) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y))) *) apply Trans with (ring_mult (ring_mult (num x) (num z)) (ring_mult (den y) (den x))); auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (den y) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den z))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (@ring_mult (cring_ring (idomain_ring R)) (den y) (den z))) *) auto with algebra. Qed. Lemma multfraction_com : forall x y : fraction_set, Equal (multfraction_fun x y) (multfraction_fun y x). Proof. (* Goal: forall x y : Carrier fraction_set, @Equal fraction_set (multfraction_fun x y) (multfraction_fun y x) *) simpl in |- *. (* Goal: forall x y : fraction, eqfraction (multfraction_fun x y) (multfraction_fun y x) *) unfold multfraction_fun, eqfraction in |- *; simpl in |- *; auto with algebra. Qed. Definition fract_field_ring_aux : RING. Proof. (* Goal: Ob RING *) apply (BUILD_RING (E:=fraction_set) (ringplus:=addfraction_fun) (ringmult:=multfraction_fun) (zero:=fraction0) (un:=fraction1) (ringopp:=opfraction_fun)). (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (addfraction_fun x y) z) (addfraction_fun (multfraction_fun x z) (multfraction_fun y z)) *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun x (addfraction_fun y z)) (addfraction_fun (multfraction_fun x y) (multfraction_fun x z)) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun fraction1 x) x *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun x fraction1) x *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (multfraction_fun x y) z) (multfraction_fun x (multfraction_fun y z)) *) (* Goal: forall (x x' y y' : Carrier fraction_set) (_ : @Equal fraction_set x x') (_ : @Equal fraction_set y y'), @Equal fraction_set (multfraction_fun x y) (multfraction_fun x' y') *) (* Goal: forall x y : Carrier fraction_set, @Equal fraction_set (addfraction_fun x y) (addfraction_fun y x) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (addfraction_fun x (opfraction_fun x)) fraction0 *) (* Goal: forall (x y : Carrier fraction_set) (_ : @Equal fraction_set x y), @Equal fraction_set (opfraction_fun x) (opfraction_fun y) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (addfraction_fun x fraction0) x *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (addfraction_fun (addfraction_fun x y) z) (addfraction_fun x (addfraction_fun y z)) *) (* Goal: forall (x x' y y' : Carrier fraction_set) (_ : @Equal fraction_set x x') (_ : @Equal fraction_set y y'), @Equal fraction_set (addfraction_fun x y) (addfraction_fun x' y') *) exact addfraction_law. (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (addfraction_fun x y) z) (addfraction_fun (multfraction_fun x z) (multfraction_fun y z)) *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun x (addfraction_fun y z)) (addfraction_fun (multfraction_fun x y) (multfraction_fun x z)) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun fraction1 x) x *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun x fraction1) x *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (multfraction_fun x y) z) (multfraction_fun x (multfraction_fun y z)) *) (* Goal: forall (x x' y y' : Carrier fraction_set) (_ : @Equal fraction_set x x') (_ : @Equal fraction_set y y'), @Equal fraction_set (multfraction_fun x y) (multfraction_fun x' y') *) (* Goal: forall x y : Carrier fraction_set, @Equal fraction_set (addfraction_fun x y) (addfraction_fun y x) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (addfraction_fun x (opfraction_fun x)) fraction0 *) (* Goal: forall (x y : Carrier fraction_set) (_ : @Equal fraction_set x y), @Equal fraction_set (opfraction_fun x) (opfraction_fun y) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (addfraction_fun x fraction0) x *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (addfraction_fun (addfraction_fun x y) z) (addfraction_fun x (addfraction_fun y z)) *) simpl in |- *. (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (addfraction_fun x y) z) (addfraction_fun (multfraction_fun x z) (multfraction_fun y z)) *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun x (addfraction_fun y z)) (addfraction_fun (multfraction_fun x y) (multfraction_fun x z)) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun fraction1 x) x *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun x fraction1) x *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (multfraction_fun x y) z) (multfraction_fun x (multfraction_fun y z)) *) (* Goal: forall (x x' y y' : Carrier fraction_set) (_ : @Equal fraction_set x x') (_ : @Equal fraction_set y y'), @Equal fraction_set (multfraction_fun x y) (multfraction_fun x' y') *) (* Goal: forall x y : Carrier fraction_set, @Equal fraction_set (addfraction_fun x y) (addfraction_fun y x) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (addfraction_fun x (opfraction_fun x)) fraction0 *) (* Goal: forall (x y : Carrier fraction_set) (_ : @Equal fraction_set x y), @Equal fraction_set (opfraction_fun x) (opfraction_fun y) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (addfraction_fun x fraction0) x *) (* Goal: forall x y z : fraction, eqfraction (addfraction_fun (addfraction_fun x y) z) (addfraction_fun x (addfraction_fun y z)) *) unfold addfraction_fun, eqfraction in |- *; simpl in |- *. (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (addfraction_fun x y) z) (addfraction_fun (multfraction_fun x z) (multfraction_fun y z)) *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun x (addfraction_fun y z)) (addfraction_fun (multfraction_fun x y) (multfraction_fun x z)) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun fraction1 x) x *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun x fraction1) x *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (multfraction_fun x y) z) (multfraction_fun x (multfraction_fun y z)) *) (* Goal: forall (x x' y y' : Carrier fraction_set) (_ : @Equal fraction_set x x') (_ : @Equal fraction_set y y'), @Equal fraction_set (multfraction_fun x y) (multfraction_fun x' y') *) (* Goal: forall x y : Carrier fraction_set, @Equal fraction_set (addfraction_fun x y) (addfraction_fun y x) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (addfraction_fun x (opfraction_fun x)) fraction0 *) (* Goal: forall (x y : Carrier fraction_set) (_ : @Equal fraction_set x y), @Equal fraction_set (opfraction_fun x) (opfraction_fun y) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (addfraction_fun x fraction0) x *) (* Goal: forall x y z : fraction, @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x) (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x))) (den z)) (@ring_mult (cring_ring (idomain_ring R)) (num z) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y)))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (@ring_mult (cring_ring (idomain_ring R)) (den y) (den z)))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x) (@ring_mult (cring_ring (idomain_ring R)) (den y) (den z))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den z)) (@ring_mult (cring_ring (idomain_ring R)) (num z) (den y))) (den x))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y)) (den z))) *) intros x y z; try assumption. (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (addfraction_fun x y) z) (addfraction_fun (multfraction_fun x z) (multfraction_fun y z)) *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun x (addfraction_fun y z)) (addfraction_fun (multfraction_fun x y) (multfraction_fun x z)) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun fraction1 x) x *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun x fraction1) x *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (multfraction_fun x y) z) (multfraction_fun x (multfraction_fun y z)) *) (* Goal: forall (x x' y y' : Carrier fraction_set) (_ : @Equal fraction_set x x') (_ : @Equal fraction_set y y'), @Equal fraction_set (multfraction_fun x y) (multfraction_fun x' y') *) (* Goal: forall x y : Carrier fraction_set, @Equal fraction_set (addfraction_fun x y) (addfraction_fun y x) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (addfraction_fun x (opfraction_fun x)) fraction0 *) (* Goal: forall (x y : Carrier fraction_set) (_ : @Equal fraction_set x y), @Equal fraction_set (opfraction_fun x) (opfraction_fun y) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (addfraction_fun x fraction0) x *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x) (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x))) (den z)) (@ring_mult (cring_ring (idomain_ring R)) (num z) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y)))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (@ring_mult (cring_ring (idomain_ring R)) (den y) (den z)))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x) (@ring_mult (cring_ring (idomain_ring R)) (den y) (den z))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den z)) (@ring_mult (cring_ring (idomain_ring R)) (num z) (den y))) (den x))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y)) (den z))) *) apply Trans with (ring_mult (sgroup_law R (ring_mult (sgroup_law R (ring_mult (num x) (den y)) (ring_mult (num y) (den x))) (den z)) (ring_mult (num z) (ring_mult (den x) (den y)))) (ring_mult (ring_mult (den x) (den y)) (den z))). (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (addfraction_fun x y) z) (addfraction_fun (multfraction_fun x z) (multfraction_fun y z)) *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun x (addfraction_fun y z)) (addfraction_fun (multfraction_fun x y) (multfraction_fun x z)) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun fraction1 x) x *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun x fraction1) x *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (multfraction_fun x y) z) (multfraction_fun x (multfraction_fun y z)) *) (* Goal: forall (x x' y y' : Carrier fraction_set) (_ : @Equal fraction_set x x') (_ : @Equal fraction_set y y'), @Equal fraction_set (multfraction_fun x y) (multfraction_fun x' y') *) (* Goal: forall x y : Carrier fraction_set, @Equal fraction_set (addfraction_fun x y) (addfraction_fun y x) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (addfraction_fun x (opfraction_fun x)) fraction0 *) (* Goal: forall (x y : Carrier fraction_set) (_ : @Equal fraction_set x y), @Equal fraction_set (opfraction_fun x) (opfraction_fun y) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (addfraction_fun x fraction0) x *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x) (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x))) (den z)) (@ring_mult (cring_ring (idomain_ring R)) (num z) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y)))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y)) (den z))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x) (@ring_mult (cring_ring (idomain_ring R)) (den y) (den z))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den z)) (@ring_mult (cring_ring (idomain_ring R)) (num z) (den y))) (den x))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y)) (den z))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x) (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x))) (den z)) (@ring_mult (cring_ring (idomain_ring R)) (num z) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y)))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (@ring_mult (cring_ring (idomain_ring R)) (den y) (den z)))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x) (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x))) (den z)) (@ring_mult (cring_ring (idomain_ring R)) (num z) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y)))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y)) (den z))) *) auto with algebra. (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (addfraction_fun x y) z) (addfraction_fun (multfraction_fun x z) (multfraction_fun y z)) *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun x (addfraction_fun y z)) (addfraction_fun (multfraction_fun x y) (multfraction_fun x z)) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun fraction1 x) x *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun x fraction1) x *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (multfraction_fun x y) z) (multfraction_fun x (multfraction_fun y z)) *) (* Goal: forall (x x' y y' : Carrier fraction_set) (_ : @Equal fraction_set x x') (_ : @Equal fraction_set y y'), @Equal fraction_set (multfraction_fun x y) (multfraction_fun x' y') *) (* Goal: forall x y : Carrier fraction_set, @Equal fraction_set (addfraction_fun x y) (addfraction_fun y x) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (addfraction_fun x (opfraction_fun x)) fraction0 *) (* Goal: forall (x y : Carrier fraction_set) (_ : @Equal fraction_set x y), @Equal fraction_set (opfraction_fun x) (opfraction_fun y) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (addfraction_fun x fraction0) x *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x) (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x))) (den z)) (@ring_mult (cring_ring (idomain_ring R)) (num z) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y)))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y)) (den z))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x) (@ring_mult (cring_ring (idomain_ring R)) (den y) (den z))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den z)) (@ring_mult (cring_ring (idomain_ring R)) (num z) (den y))) (den x))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y)) (den z))) *) apply RING_comp. (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (addfraction_fun x y) z) (addfraction_fun (multfraction_fun x z) (multfraction_fun y z)) *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun x (addfraction_fun y z)) (addfraction_fun (multfraction_fun x y) (multfraction_fun x z)) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun fraction1 x) x *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun x fraction1) x *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (multfraction_fun x y) z) (multfraction_fun x (multfraction_fun y z)) *) (* Goal: forall (x x' y y' : Carrier fraction_set) (_ : @Equal fraction_set x x') (_ : @Equal fraction_set y y'), @Equal fraction_set (multfraction_fun x y) (multfraction_fun x' y') *) (* Goal: forall x y : Carrier fraction_set, @Equal fraction_set (addfraction_fun x y) (addfraction_fun y x) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (addfraction_fun x (opfraction_fun x)) fraction0 *) (* Goal: forall (x y : Carrier fraction_set) (_ : @Equal fraction_set x y), @Equal fraction_set (opfraction_fun x) (opfraction_fun y) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (addfraction_fun x fraction0) x *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y)) (den z)) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y)) (den z)) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x) (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x))) (den z)) (@ring_mult (cring_ring (idomain_ring R)) (num z) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x) (@ring_mult (cring_ring (idomain_ring R)) (den y) (den z))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den z)) (@ring_mult (cring_ring (idomain_ring R)) (num z) (den y))) (den x))) *) apply Trans with (sgroup_law R (sgroup_law R (ring_mult (ring_mult (num x) (den y)) (den z)) (ring_mult (ring_mult (num y) (den x)) (den z))) (ring_mult (num z) (ring_mult (den x) (den y)))). (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (addfraction_fun x y) z) (addfraction_fun (multfraction_fun x z) (multfraction_fun y z)) *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun x (addfraction_fun y z)) (addfraction_fun (multfraction_fun x y) (multfraction_fun x z)) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun fraction1 x) x *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun x fraction1) x *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (multfraction_fun x y) z) (multfraction_fun x (multfraction_fun y z)) *) (* Goal: forall (x x' y y' : Carrier fraction_set) (_ : @Equal fraction_set x x') (_ : @Equal fraction_set y y'), @Equal fraction_set (multfraction_fun x y) (multfraction_fun x' y') *) (* Goal: forall x y : Carrier fraction_set, @Equal fraction_set (addfraction_fun x y) (addfraction_fun y x) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (addfraction_fun x (opfraction_fun x)) fraction0 *) (* Goal: forall (x y : Carrier fraction_set) (_ : @Equal fraction_set x y), @Equal fraction_set (opfraction_fun x) (opfraction_fun y) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (addfraction_fun x fraction0) x *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y)) (den z)) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y)) (den z)) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (den y)) (den z)) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x)) (den z))) (@ring_mult (cring_ring (idomain_ring R)) (num z) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x) (@ring_mult (cring_ring (idomain_ring R)) (den y) (den z))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den z)) (@ring_mult (cring_ring (idomain_ring R)) (num z) (den y))) (den x))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x) (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x))) (den z)) (@ring_mult (cring_ring (idomain_ring R)) (num z) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (den y)) (den z)) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x)) (den z))) (@ring_mult (cring_ring (idomain_ring R)) (num z) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y)))) *) auto with algebra. (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (addfraction_fun x y) z) (addfraction_fun (multfraction_fun x z) (multfraction_fun y z)) *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun x (addfraction_fun y z)) (addfraction_fun (multfraction_fun x y) (multfraction_fun x z)) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun fraction1 x) x *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun x fraction1) x *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (multfraction_fun x y) z) (multfraction_fun x (multfraction_fun y z)) *) (* Goal: forall (x x' y y' : Carrier fraction_set) (_ : @Equal fraction_set x x') (_ : @Equal fraction_set y y'), @Equal fraction_set (multfraction_fun x y) (multfraction_fun x' y') *) (* Goal: forall x y : Carrier fraction_set, @Equal fraction_set (addfraction_fun x y) (addfraction_fun y x) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (addfraction_fun x (opfraction_fun x)) fraction0 *) (* Goal: forall (x y : Carrier fraction_set) (_ : @Equal fraction_set x y), @Equal fraction_set (opfraction_fun x) (opfraction_fun y) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (addfraction_fun x fraction0) x *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y)) (den z)) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y)) (den z)) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (den y)) (den z)) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x)) (den z))) (@ring_mult (cring_ring (idomain_ring R)) (num z) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x) (@ring_mult (cring_ring (idomain_ring R)) (den y) (den z))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den z)) (@ring_mult (cring_ring (idomain_ring R)) (num z) (den y))) (den x))) *) apply Trans with (sgroup_law R (ring_mult (ring_mult (num x) (den y)) (den z)) (sgroup_law R (ring_mult (ring_mult (num y) (den x)) (den z)) (ring_mult (num z) (ring_mult (den x) (den y))))). (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (addfraction_fun x y) z) (addfraction_fun (multfraction_fun x z) (multfraction_fun y z)) *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun x (addfraction_fun y z)) (addfraction_fun (multfraction_fun x y) (multfraction_fun x z)) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun fraction1 x) x *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun x fraction1) x *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (multfraction_fun x y) z) (multfraction_fun x (multfraction_fun y z)) *) (* Goal: forall (x x' y y' : Carrier fraction_set) (_ : @Equal fraction_set x x') (_ : @Equal fraction_set y y'), @Equal fraction_set (multfraction_fun x y) (multfraction_fun x' y') *) (* Goal: forall x y : Carrier fraction_set, @Equal fraction_set (addfraction_fun x y) (addfraction_fun y x) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (addfraction_fun x (opfraction_fun x)) fraction0 *) (* Goal: forall (x y : Carrier fraction_set) (_ : @Equal fraction_set x y), @Equal fraction_set (opfraction_fun x) (opfraction_fun y) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (addfraction_fun x fraction0) x *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y)) (den z)) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y)) (den z)) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (den y)) (den z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x)) (den z)) (@ring_mult (cring_ring (idomain_ring R)) (num z) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x) (@ring_mult (cring_ring (idomain_ring R)) (den y) (den z))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den z)) (@ring_mult (cring_ring (idomain_ring R)) (num z) (den y))) (den x))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (den y)) (den z)) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x)) (den z))) (@ring_mult (cring_ring (idomain_ring R)) (num z) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (den y)) (den z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x)) (den z)) (@ring_mult (cring_ring (idomain_ring R)) (num z) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y))))) *) auto with algebra. (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (addfraction_fun x y) z) (addfraction_fun (multfraction_fun x z) (multfraction_fun y z)) *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun x (addfraction_fun y z)) (addfraction_fun (multfraction_fun x y) (multfraction_fun x z)) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun fraction1 x) x *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun x fraction1) x *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (multfraction_fun x y) z) (multfraction_fun x (multfraction_fun y z)) *) (* Goal: forall (x x' y y' : Carrier fraction_set) (_ : @Equal fraction_set x x') (_ : @Equal fraction_set y y'), @Equal fraction_set (multfraction_fun x y) (multfraction_fun x' y') *) (* Goal: forall x y : Carrier fraction_set, @Equal fraction_set (addfraction_fun x y) (addfraction_fun y x) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (addfraction_fun x (opfraction_fun x)) fraction0 *) (* Goal: forall (x y : Carrier fraction_set) (_ : @Equal fraction_set x y), @Equal fraction_set (opfraction_fun x) (opfraction_fun y) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (addfraction_fun x fraction0) x *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y)) (den z)) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y)) (den z)) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (den y)) (den z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x)) (den z)) (@ring_mult (cring_ring (idomain_ring R)) (num z) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x) (@ring_mult (cring_ring (idomain_ring R)) (den y) (den z))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den z)) (@ring_mult (cring_ring (idomain_ring R)) (num z) (den y))) (den x))) *) apply SGROUP_comp. (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (addfraction_fun x y) z) (addfraction_fun (multfraction_fun x z) (multfraction_fun y z)) *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun x (addfraction_fun y z)) (addfraction_fun (multfraction_fun x y) (multfraction_fun x z)) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun fraction1 x) x *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun x fraction1) x *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (multfraction_fun x y) z) (multfraction_fun x (multfraction_fun y z)) *) (* Goal: forall (x x' y y' : Carrier fraction_set) (_ : @Equal fraction_set x x') (_ : @Equal fraction_set y y'), @Equal fraction_set (multfraction_fun x y) (multfraction_fun x' y') *) (* Goal: forall x y : Carrier fraction_set, @Equal fraction_set (addfraction_fun x y) (addfraction_fun y x) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (addfraction_fun x (opfraction_fun x)) fraction0 *) (* Goal: forall (x y : Carrier fraction_set) (_ : @Equal fraction_set x y), @Equal fraction_set (opfraction_fun x) (opfraction_fun y) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (addfraction_fun x fraction0) x *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y)) (den z)) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y)) (den z)) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x)) (den z)) (@ring_mult (cring_ring (idomain_ring R)) (num z) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y)))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den z)) (@ring_mult (cring_ring (idomain_ring R)) (num z) (den y))) (den x)) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (den y)) (den z)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (@ring_mult (cring_ring (idomain_ring R)) (den y) (den z))) *) auto with algebra. (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (addfraction_fun x y) z) (addfraction_fun (multfraction_fun x z) (multfraction_fun y z)) *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun x (addfraction_fun y z)) (addfraction_fun (multfraction_fun x y) (multfraction_fun x z)) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun fraction1 x) x *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun x fraction1) x *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (multfraction_fun x y) z) (multfraction_fun x (multfraction_fun y z)) *) (* Goal: forall (x x' y y' : Carrier fraction_set) (_ : @Equal fraction_set x x') (_ : @Equal fraction_set y y'), @Equal fraction_set (multfraction_fun x y) (multfraction_fun x' y') *) (* Goal: forall x y : Carrier fraction_set, @Equal fraction_set (addfraction_fun x y) (addfraction_fun y x) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (addfraction_fun x (opfraction_fun x)) fraction0 *) (* Goal: forall (x y : Carrier fraction_set) (_ : @Equal fraction_set x y), @Equal fraction_set (opfraction_fun x) (opfraction_fun y) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (addfraction_fun x fraction0) x *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y)) (den z)) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y)) (den z)) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x)) (den z)) (@ring_mult (cring_ring (idomain_ring R)) (num z) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y)))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den z)) (@ring_mult (cring_ring (idomain_ring R)) (num z) (den y))) (den x)) *) apply Trans with (sgroup_law R (ring_mult (ring_mult (num y) (den z)) (den x)) (ring_mult (ring_mult (num z) (den y)) (den x))). (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (addfraction_fun x y) z) (addfraction_fun (multfraction_fun x z) (multfraction_fun y z)) *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun x (addfraction_fun y z)) (addfraction_fun (multfraction_fun x y) (multfraction_fun x z)) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun fraction1 x) x *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun x fraction1) x *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (multfraction_fun x y) z) (multfraction_fun x (multfraction_fun y z)) *) (* Goal: forall (x x' y y' : Carrier fraction_set) (_ : @Equal fraction_set x x') (_ : @Equal fraction_set y y'), @Equal fraction_set (multfraction_fun x y) (multfraction_fun x' y') *) (* Goal: forall x y : Carrier fraction_set, @Equal fraction_set (addfraction_fun x y) (addfraction_fun y x) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (addfraction_fun x (opfraction_fun x)) fraction0 *) (* Goal: forall (x y : Carrier fraction_set) (_ : @Equal fraction_set x y), @Equal fraction_set (opfraction_fun x) (opfraction_fun y) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (addfraction_fun x fraction0) x *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y)) (den z)) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y)) (den z)) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den z)) (den x)) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num z) (den y)) (den x))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den z)) (@ring_mult (cring_ring (idomain_ring R)) (num z) (den y))) (den x)) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x)) (den z)) (@ring_mult (cring_ring (idomain_ring R)) (num z) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den z)) (den x)) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num z) (den y)) (den x))) *) apply SGROUP_comp. (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (addfraction_fun x y) z) (addfraction_fun (multfraction_fun x z) (multfraction_fun y z)) *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun x (addfraction_fun y z)) (addfraction_fun (multfraction_fun x y) (multfraction_fun x z)) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun fraction1 x) x *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun x fraction1) x *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (multfraction_fun x y) z) (multfraction_fun x (multfraction_fun y z)) *) (* Goal: forall (x x' y y' : Carrier fraction_set) (_ : @Equal fraction_set x x') (_ : @Equal fraction_set y y'), @Equal fraction_set (multfraction_fun x y) (multfraction_fun x' y') *) (* Goal: forall x y : Carrier fraction_set, @Equal fraction_set (addfraction_fun x y) (addfraction_fun y x) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (addfraction_fun x (opfraction_fun x)) fraction0 *) (* Goal: forall (x y : Carrier fraction_set) (_ : @Equal fraction_set x y), @Equal fraction_set (opfraction_fun x) (opfraction_fun y) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (addfraction_fun x fraction0) x *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y)) (den z)) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y)) (den z)) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den z)) (den x)) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num z) (den y)) (den x))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den z)) (@ring_mult (cring_ring (idomain_ring R)) (num z) (den y))) (den x)) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (num z) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num z) (den y)) (den x)) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x)) (den z)) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den z)) (den x)) *) auto with algebra. (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (addfraction_fun x y) z) (addfraction_fun (multfraction_fun x z) (multfraction_fun y z)) *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun x (addfraction_fun y z)) (addfraction_fun (multfraction_fun x y) (multfraction_fun x z)) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun fraction1 x) x *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun x fraction1) x *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (multfraction_fun x y) z) (multfraction_fun x (multfraction_fun y z)) *) (* Goal: forall (x x' y y' : Carrier fraction_set) (_ : @Equal fraction_set x x') (_ : @Equal fraction_set y y'), @Equal fraction_set (multfraction_fun x y) (multfraction_fun x' y') *) (* Goal: forall x y : Carrier fraction_set, @Equal fraction_set (addfraction_fun x y) (addfraction_fun y x) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (addfraction_fun x (opfraction_fun x)) fraction0 *) (* Goal: forall (x y : Carrier fraction_set) (_ : @Equal fraction_set x y), @Equal fraction_set (opfraction_fun x) (opfraction_fun y) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (addfraction_fun x fraction0) x *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y)) (den z)) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y)) (den z)) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den z)) (den x)) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num z) (den y)) (den x))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den z)) (@ring_mult (cring_ring (idomain_ring R)) (num z) (den y))) (den x)) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (num z) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num z) (den y)) (den x)) *) apply Trans with (ring_mult (num z) (ring_mult (den y) (den x))); auto with algebra. (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (addfraction_fun x y) z) (addfraction_fun (multfraction_fun x z) (multfraction_fun y z)) *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun x (addfraction_fun y z)) (addfraction_fun (multfraction_fun x y) (multfraction_fun x z)) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun fraction1 x) x *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun x fraction1) x *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (multfraction_fun x y) z) (multfraction_fun x (multfraction_fun y z)) *) (* Goal: forall (x x' y y' : Carrier fraction_set) (_ : @Equal fraction_set x x') (_ : @Equal fraction_set y y'), @Equal fraction_set (multfraction_fun x y) (multfraction_fun x' y') *) (* Goal: forall x y : Carrier fraction_set, @Equal fraction_set (addfraction_fun x y) (addfraction_fun y x) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (addfraction_fun x (opfraction_fun x)) fraction0 *) (* Goal: forall (x y : Carrier fraction_set) (_ : @Equal fraction_set x y), @Equal fraction_set (opfraction_fun x) (opfraction_fun y) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (addfraction_fun x fraction0) x *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y)) (den z)) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y)) (den z)) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den z)) (den x)) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num z) (den y)) (den x))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den z)) (@ring_mult (cring_ring (idomain_ring R)) (num z) (den y))) (den x)) *) auto with algebra. (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (addfraction_fun x y) z) (addfraction_fun (multfraction_fun x z) (multfraction_fun y z)) *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun x (addfraction_fun y z)) (addfraction_fun (multfraction_fun x y) (multfraction_fun x z)) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun fraction1 x) x *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun x fraction1) x *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (multfraction_fun x y) z) (multfraction_fun x (multfraction_fun y z)) *) (* Goal: forall (x x' y y' : Carrier fraction_set) (_ : @Equal fraction_set x x') (_ : @Equal fraction_set y y'), @Equal fraction_set (multfraction_fun x y) (multfraction_fun x' y') *) (* Goal: forall x y : Carrier fraction_set, @Equal fraction_set (addfraction_fun x y) (addfraction_fun y x) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (addfraction_fun x (opfraction_fun x)) fraction0 *) (* Goal: forall (x y : Carrier fraction_set) (_ : @Equal fraction_set x y), @Equal fraction_set (opfraction_fun x) (opfraction_fun y) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (addfraction_fun x fraction0) x *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y)) (den z)) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y)) (den z)) *) auto with algebra. (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (addfraction_fun x y) z) (addfraction_fun (multfraction_fun x z) (multfraction_fun y z)) *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun x (addfraction_fun y z)) (addfraction_fun (multfraction_fun x y) (multfraction_fun x z)) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun fraction1 x) x *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun x fraction1) x *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (multfraction_fun x y) z) (multfraction_fun x (multfraction_fun y z)) *) (* Goal: forall (x x' y y' : Carrier fraction_set) (_ : @Equal fraction_set x x') (_ : @Equal fraction_set y y'), @Equal fraction_set (multfraction_fun x y) (multfraction_fun x' y') *) (* Goal: forall x y : Carrier fraction_set, @Equal fraction_set (addfraction_fun x y) (addfraction_fun y x) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (addfraction_fun x (opfraction_fun x)) fraction0 *) (* Goal: forall (x y : Carrier fraction_set) (_ : @Equal fraction_set x y), @Equal fraction_set (opfraction_fun x) (opfraction_fun y) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (addfraction_fun x fraction0) x *) simpl in |- *. (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (addfraction_fun x y) z) (addfraction_fun (multfraction_fun x z) (multfraction_fun y z)) *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun x (addfraction_fun y z)) (addfraction_fun (multfraction_fun x y) (multfraction_fun x z)) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun fraction1 x) x *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun x fraction1) x *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (multfraction_fun x y) z) (multfraction_fun x (multfraction_fun y z)) *) (* Goal: forall (x x' y y' : Carrier fraction_set) (_ : @Equal fraction_set x x') (_ : @Equal fraction_set y y'), @Equal fraction_set (multfraction_fun x y) (multfraction_fun x' y') *) (* Goal: forall x y : Carrier fraction_set, @Equal fraction_set (addfraction_fun x y) (addfraction_fun y x) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (addfraction_fun x (opfraction_fun x)) fraction0 *) (* Goal: forall (x y : Carrier fraction_set) (_ : @Equal fraction_set x y), @Equal fraction_set (opfraction_fun x) (opfraction_fun y) *) (* Goal: forall x : fraction, eqfraction (addfraction_fun x fraction0) x *) unfold addfraction_fun, eqfraction in |- *; simpl in |- *. (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (addfraction_fun x y) z) (addfraction_fun (multfraction_fun x z) (multfraction_fun y z)) *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun x (addfraction_fun y z)) (addfraction_fun (multfraction_fun x y) (multfraction_fun x z)) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun fraction1 x) x *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun x fraction1) x *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (multfraction_fun x y) z) (multfraction_fun x (multfraction_fun y z)) *) (* Goal: forall (x x' y y' : Carrier fraction_set) (_ : @Equal fraction_set x x') (_ : @Equal fraction_set y y'), @Equal fraction_set (multfraction_fun x y) (multfraction_fun x' y') *) (* Goal: forall x y : Carrier fraction_set, @Equal fraction_set (addfraction_fun x y) (addfraction_fun y x) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (addfraction_fun x (opfraction_fun x)) fraction0 *) (* Goal: forall (x y : Carrier fraction_set) (_ : @Equal fraction_set x y), @Equal fraction_set (opfraction_fun x) (opfraction_fun y) *) (* Goal: forall x : fraction, @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x) (ring_unit (cring_ring (idomain_ring R)))) (@ring_mult (cring_ring (idomain_ring R)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (den x))) (den x)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (@ring_mult (cring_ring (idomain_ring R)) (den x) (ring_unit (cring_ring (idomain_ring R))))) *) intros x; try assumption. (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (addfraction_fun x y) z) (addfraction_fun (multfraction_fun x z) (multfraction_fun y z)) *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun x (addfraction_fun y z)) (addfraction_fun (multfraction_fun x y) (multfraction_fun x z)) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun fraction1 x) x *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun x fraction1) x *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (multfraction_fun x y) z) (multfraction_fun x (multfraction_fun y z)) *) (* Goal: forall (x x' y y' : Carrier fraction_set) (_ : @Equal fraction_set x x') (_ : @Equal fraction_set y y'), @Equal fraction_set (multfraction_fun x y) (multfraction_fun x' y') *) (* Goal: forall x y : Carrier fraction_set, @Equal fraction_set (addfraction_fun x y) (addfraction_fun y x) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (addfraction_fun x (opfraction_fun x)) fraction0 *) (* Goal: forall (x y : Carrier fraction_set) (_ : @Equal fraction_set x y), @Equal fraction_set (opfraction_fun x) (opfraction_fun y) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x) (ring_unit (cring_ring (idomain_ring R)))) (@ring_mult (cring_ring (idomain_ring R)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (den x))) (den x)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (@ring_mult (cring_ring (idomain_ring R)) (den x) (ring_unit (cring_ring (idomain_ring R))))) *) apply Trans with (ring_mult (sgroup_law R (num x) (monoid_unit R)) (den x)); auto with algebra. (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (addfraction_fun x y) z) (addfraction_fun (multfraction_fun x z) (multfraction_fun y z)) *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun x (addfraction_fun y z)) (addfraction_fun (multfraction_fun x y) (multfraction_fun x z)) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun fraction1 x) x *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun x fraction1) x *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (multfraction_fun x y) z) (multfraction_fun x (multfraction_fun y z)) *) (* Goal: forall (x x' y y' : Carrier fraction_set) (_ : @Equal fraction_set x x') (_ : @Equal fraction_set y y'), @Equal fraction_set (multfraction_fun x y) (multfraction_fun x' y') *) (* Goal: forall x y : Carrier fraction_set, @Equal fraction_set (addfraction_fun x y) (addfraction_fun y x) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (addfraction_fun x (opfraction_fun x)) fraction0 *) (* Goal: forall (x y : Carrier fraction_set) (_ : @Equal fraction_set x y), @Equal fraction_set (opfraction_fun x) (opfraction_fun y) *) simpl in |- *. (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (addfraction_fun x y) z) (addfraction_fun (multfraction_fun x z) (multfraction_fun y z)) *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun x (addfraction_fun y z)) (addfraction_fun (multfraction_fun x y) (multfraction_fun x z)) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun fraction1 x) x *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun x fraction1) x *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (multfraction_fun x y) z) (multfraction_fun x (multfraction_fun y z)) *) (* Goal: forall (x x' y y' : Carrier fraction_set) (_ : @Equal fraction_set x x') (_ : @Equal fraction_set y y'), @Equal fraction_set (multfraction_fun x y) (multfraction_fun x' y') *) (* Goal: forall x y : Carrier fraction_set, @Equal fraction_set (addfraction_fun x y) (addfraction_fun y x) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (addfraction_fun x (opfraction_fun x)) fraction0 *) (* Goal: forall (x y : fraction) (_ : eqfraction x y), eqfraction (opfraction_fun x) (opfraction_fun y) *) unfold opfraction_fun, eqfraction in |- *; simpl in |- *. (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (addfraction_fun x y) z) (addfraction_fun (multfraction_fun x z) (multfraction_fun y z)) *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun x (addfraction_fun y z)) (addfraction_fun (multfraction_fun x y) (multfraction_fun x z)) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun fraction1 x) x *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun x fraction1) x *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (multfraction_fun x y) z) (multfraction_fun x (multfraction_fun y z)) *) (* Goal: forall (x x' y y' : Carrier fraction_set) (_ : @Equal fraction_set x x') (_ : @Equal fraction_set y y'), @Equal fraction_set (multfraction_fun x y) (multfraction_fun x' y') *) (* Goal: forall x y : Carrier fraction_set, @Equal fraction_set (addfraction_fun x y) (addfraction_fun y x) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (addfraction_fun x (opfraction_fun x)) fraction0 *) (* Goal: forall (x y : fraction) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (num x) (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x))), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (group_inverse (abelian_group_group (ring_group (cring_ring (idomain_ring R)))) (num x)) (den y)) (@ring_mult (cring_ring (idomain_ring R)) (group_inverse (abelian_group_group (ring_group (cring_ring (idomain_ring R)))) (num y)) (den x)) *) intros x y H'; try assumption. (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (addfraction_fun x y) z) (addfraction_fun (multfraction_fun x z) (multfraction_fun y z)) *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun x (addfraction_fun y z)) (addfraction_fun (multfraction_fun x y) (multfraction_fun x z)) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun fraction1 x) x *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun x fraction1) x *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (multfraction_fun x y) z) (multfraction_fun x (multfraction_fun y z)) *) (* Goal: forall (x x' y y' : Carrier fraction_set) (_ : @Equal fraction_set x x') (_ : @Equal fraction_set y y'), @Equal fraction_set (multfraction_fun x y) (multfraction_fun x' y') *) (* Goal: forall x y : Carrier fraction_set, @Equal fraction_set (addfraction_fun x y) (addfraction_fun y x) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (addfraction_fun x (opfraction_fun x)) fraction0 *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (group_inverse (abelian_group_group (ring_group (cring_ring (idomain_ring R)))) (num x)) (den y)) (@ring_mult (cring_ring (idomain_ring R)) (group_inverse (abelian_group_group (ring_group (cring_ring (idomain_ring R)))) (num y)) (den x)) *) apply Trans with (group_inverse R (ring_mult (num x) (den y))); auto with algebra. (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (addfraction_fun x y) z) (addfraction_fun (multfraction_fun x z) (multfraction_fun y z)) *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun x (addfraction_fun y z)) (addfraction_fun (multfraction_fun x y) (multfraction_fun x z)) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun fraction1 x) x *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun x fraction1) x *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (multfraction_fun x y) z) (multfraction_fun x (multfraction_fun y z)) *) (* Goal: forall (x x' y y' : Carrier fraction_set) (_ : @Equal fraction_set x x') (_ : @Equal fraction_set y y'), @Equal fraction_set (multfraction_fun x y) (multfraction_fun x' y') *) (* Goal: forall x y : Carrier fraction_set, @Equal fraction_set (addfraction_fun x y) (addfraction_fun y x) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (addfraction_fun x (opfraction_fun x)) fraction0 *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (group_inverse (abelian_group_group (ring_group (cring_ring (idomain_ring R)))) (@ring_mult (cring_ring (idomain_ring R)) (num x) (den y))) (@ring_mult (cring_ring (idomain_ring R)) (group_inverse (abelian_group_group (ring_group (cring_ring (idomain_ring R)))) (num y)) (den x)) *) apply Trans with (group_inverse R (ring_mult (num y) (den x))); auto with algebra. (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (addfraction_fun x y) z) (addfraction_fun (multfraction_fun x z) (multfraction_fun y z)) *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun x (addfraction_fun y z)) (addfraction_fun (multfraction_fun x y) (multfraction_fun x z)) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun fraction1 x) x *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun x fraction1) x *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (multfraction_fun x y) z) (multfraction_fun x (multfraction_fun y z)) *) (* Goal: forall (x x' y y' : Carrier fraction_set) (_ : @Equal fraction_set x x') (_ : @Equal fraction_set y y'), @Equal fraction_set (multfraction_fun x y) (multfraction_fun x' y') *) (* Goal: forall x y : Carrier fraction_set, @Equal fraction_set (addfraction_fun x y) (addfraction_fun y x) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (addfraction_fun x (opfraction_fun x)) fraction0 *) simpl in |- *. (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (addfraction_fun x y) z) (addfraction_fun (multfraction_fun x z) (multfraction_fun y z)) *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun x (addfraction_fun y z)) (addfraction_fun (multfraction_fun x y) (multfraction_fun x z)) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun fraction1 x) x *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun x fraction1) x *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (multfraction_fun x y) z) (multfraction_fun x (multfraction_fun y z)) *) (* Goal: forall (x x' y y' : Carrier fraction_set) (_ : @Equal fraction_set x x') (_ : @Equal fraction_set y y'), @Equal fraction_set (multfraction_fun x y) (multfraction_fun x' y') *) (* Goal: forall x y : Carrier fraction_set, @Equal fraction_set (addfraction_fun x y) (addfraction_fun y x) *) (* Goal: forall x : fraction, eqfraction (addfraction_fun x (opfraction_fun x)) fraction0 *) unfold addfraction_fun, opfraction_fun, eqfraction in |- *; simpl in |- *. (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (addfraction_fun x y) z) (addfraction_fun (multfraction_fun x z) (multfraction_fun y z)) *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun x (addfraction_fun y z)) (addfraction_fun (multfraction_fun x y) (multfraction_fun x z)) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun fraction1 x) x *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun x fraction1) x *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (multfraction_fun x y) z) (multfraction_fun x (multfraction_fun y z)) *) (* Goal: forall (x x' y y' : Carrier fraction_set) (_ : @Equal fraction_set x x') (_ : @Equal fraction_set y y'), @Equal fraction_set (multfraction_fun x y) (multfraction_fun x' y') *) (* Goal: forall x y : Carrier fraction_set, @Equal fraction_set (addfraction_fun x y) (addfraction_fun y x) *) (* Goal: forall x : fraction, @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x) (den x)) (@ring_mult (cring_ring (idomain_ring R)) (group_inverse (abelian_group_group (ring_group (cring_ring (idomain_ring R)))) (num x)) (den x))) (ring_unit (cring_ring (idomain_ring R)))) (@ring_mult (cring_ring (idomain_ring R)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den x))) *) intros x; try assumption. (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (addfraction_fun x y) z) (addfraction_fun (multfraction_fun x z) (multfraction_fun y z)) *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun x (addfraction_fun y z)) (addfraction_fun (multfraction_fun x y) (multfraction_fun x z)) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun fraction1 x) x *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun x fraction1) x *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (multfraction_fun x y) z) (multfraction_fun x (multfraction_fun y z)) *) (* Goal: forall (x x' y y' : Carrier fraction_set) (_ : @Equal fraction_set x x') (_ : @Equal fraction_set y y'), @Equal fraction_set (multfraction_fun x y) (multfraction_fun x' y') *) (* Goal: forall x y : Carrier fraction_set, @Equal fraction_set (addfraction_fun x y) (addfraction_fun y x) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x) (den x)) (@ring_mult (cring_ring (idomain_ring R)) (group_inverse (abelian_group_group (ring_group (cring_ring (idomain_ring R)))) (num x)) (den x))) (ring_unit (cring_ring (idomain_ring R)))) (@ring_mult (cring_ring (idomain_ring R)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den x))) *) apply Trans with (sgroup_law R (ring_mult (num x) (den x)) (ring_mult (group_inverse R (num x)) (den x))); auto with algebra. (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (addfraction_fun x y) z) (addfraction_fun (multfraction_fun x z) (multfraction_fun y z)) *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun x (addfraction_fun y z)) (addfraction_fun (multfraction_fun x y) (multfraction_fun x z)) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun fraction1 x) x *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun x fraction1) x *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (multfraction_fun x y) z) (multfraction_fun x (multfraction_fun y z)) *) (* Goal: forall (x x' y y' : Carrier fraction_set) (_ : @Equal fraction_set x x') (_ : @Equal fraction_set y y'), @Equal fraction_set (multfraction_fun x y) (multfraction_fun x' y') *) (* Goal: forall x y : Carrier fraction_set, @Equal fraction_set (addfraction_fun x y) (addfraction_fun y x) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (@ring_mult (cring_ring (idomain_ring R)) (num x) (den x)) (@ring_mult (cring_ring (idomain_ring R)) (group_inverse (abelian_group_group (ring_group (cring_ring (idomain_ring R)))) (num x)) (den x))) (@ring_mult (cring_ring (idomain_ring R)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den x))) *) apply Trans with (ring_mult (sgroup_law R (num x) (group_inverse R (num x))) (den x)); auto with algebra. (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (addfraction_fun x y) z) (addfraction_fun (multfraction_fun x z) (multfraction_fun y z)) *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun x (addfraction_fun y z)) (addfraction_fun (multfraction_fun x y) (multfraction_fun x z)) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun fraction1 x) x *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun x fraction1) x *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (multfraction_fun x y) z) (multfraction_fun x (multfraction_fun y z)) *) (* Goal: forall (x x' y y' : Carrier fraction_set) (_ : @Equal fraction_set x x') (_ : @Equal fraction_set y y'), @Equal fraction_set (multfraction_fun x y) (multfraction_fun x' y') *) (* Goal: forall x y : Carrier fraction_set, @Equal fraction_set (addfraction_fun x y) (addfraction_fun y x) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (num x) (group_inverse (abelian_group_group (ring_group (cring_ring (idomain_ring R)))) (num x))) (den x)) (@ring_mult (cring_ring (idomain_ring R)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den x))) *) apply Trans with (ring_mult (monoid_unit R) (den x)); auto with algebra. (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (addfraction_fun x y) z) (addfraction_fun (multfraction_fun x z) (multfraction_fun y z)) *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun x (addfraction_fun y z)) (addfraction_fun (multfraction_fun x y) (multfraction_fun x z)) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun fraction1 x) x *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun x fraction1) x *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (multfraction_fun x y) z) (multfraction_fun x (multfraction_fun y z)) *) (* Goal: forall (x x' y y' : Carrier fraction_set) (_ : @Equal fraction_set x x') (_ : @Equal fraction_set y y'), @Equal fraction_set (multfraction_fun x y) (multfraction_fun x' y') *) (* Goal: forall x y : Carrier fraction_set, @Equal fraction_set (addfraction_fun x y) (addfraction_fun y x) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (den x)) (@ring_mult (cring_ring (idomain_ring R)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den x))) *) apply Trans with (monoid_unit R); auto with algebra. (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (addfraction_fun x y) z) (addfraction_fun (multfraction_fun x z) (multfraction_fun y z)) *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun x (addfraction_fun y z)) (addfraction_fun (multfraction_fun x y) (multfraction_fun x z)) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun fraction1 x) x *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun x fraction1) x *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (multfraction_fun x y) z) (multfraction_fun x (multfraction_fun y z)) *) (* Goal: forall (x x' y y' : Carrier fraction_set) (_ : @Equal fraction_set x x') (_ : @Equal fraction_set y y'), @Equal fraction_set (multfraction_fun x y) (multfraction_fun x' y') *) (* Goal: forall x y : Carrier fraction_set, @Equal fraction_set (addfraction_fun x y) (addfraction_fun y x) *) exact addfraction_fun_com. (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (addfraction_fun x y) z) (addfraction_fun (multfraction_fun x z) (multfraction_fun y z)) *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun x (addfraction_fun y z)) (addfraction_fun (multfraction_fun x y) (multfraction_fun x z)) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun fraction1 x) x *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun x fraction1) x *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (multfraction_fun x y) z) (multfraction_fun x (multfraction_fun y z)) *) (* Goal: forall (x x' y y' : Carrier fraction_set) (_ : @Equal fraction_set x x') (_ : @Equal fraction_set y y'), @Equal fraction_set (multfraction_fun x y) (multfraction_fun x' y') *) simpl in |- *. (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (addfraction_fun x y) z) (addfraction_fun (multfraction_fun x z) (multfraction_fun y z)) *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun x (addfraction_fun y z)) (addfraction_fun (multfraction_fun x y) (multfraction_fun x z)) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun fraction1 x) x *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun x fraction1) x *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (multfraction_fun x y) z) (multfraction_fun x (multfraction_fun y z)) *) (* Goal: forall (x x' y y' : fraction) (_ : eqfraction x x') (_ : eqfraction y y'), eqfraction (multfraction_fun x y) (multfraction_fun x' y') *) unfold multfraction_fun, eqfraction in |- *; simpl in |- *. (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (addfraction_fun x y) z) (addfraction_fun (multfraction_fun x z) (multfraction_fun y z)) *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun x (addfraction_fun y z)) (addfraction_fun (multfraction_fun x y) (multfraction_fun x z)) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun fraction1 x) x *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun x fraction1) x *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (multfraction_fun x y) z) (multfraction_fun x (multfraction_fun y z)) *) (* Goal: forall (x x' y y' : fraction) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (num x) (den x')) (@ring_mult (cring_ring (idomain_ring R)) (num x') (den x))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den y')) (@ring_mult (cring_ring (idomain_ring R)) (num y') (den y))), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (num y)) (@ring_mult (cring_ring (idomain_ring R)) (den x') (den y'))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x') (num y')) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y))) *) intros x x' y y' H' H'0; try assumption. (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (addfraction_fun x y) z) (addfraction_fun (multfraction_fun x z) (multfraction_fun y z)) *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun x (addfraction_fun y z)) (addfraction_fun (multfraction_fun x y) (multfraction_fun x z)) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun fraction1 x) x *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun x fraction1) x *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (multfraction_fun x y) z) (multfraction_fun x (multfraction_fun y z)) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (num y)) (@ring_mult (cring_ring (idomain_ring R)) (den x') (den y'))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x') (num y')) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y))) *) apply Trans with (ring_mult (ring_mult (num x) (den x')) (ring_mult (num y) (den y'))); auto with algebra. (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (addfraction_fun x y) z) (addfraction_fun (multfraction_fun x z) (multfraction_fun y z)) *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun x (addfraction_fun y z)) (addfraction_fun (multfraction_fun x y) (multfraction_fun x z)) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun fraction1 x) x *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun x fraction1) x *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (multfraction_fun x y) z) (multfraction_fun x (multfraction_fun y z)) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (den x')) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den y'))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x') (num y')) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y))) *) apply Trans with (ring_mult (ring_mult (num x') (den x)) (ring_mult (num y') (den y))); auto with algebra. (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (addfraction_fun x y) z) (addfraction_fun (multfraction_fun x z) (multfraction_fun y z)) *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun x (addfraction_fun y z)) (addfraction_fun (multfraction_fun x y) (multfraction_fun x z)) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun fraction1 x) x *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun x fraction1) x *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (multfraction_fun x y) z) (multfraction_fun x (multfraction_fun y z)) *) simpl in |- *. (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (addfraction_fun x y) z) (addfraction_fun (multfraction_fun x z) (multfraction_fun y z)) *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun x (addfraction_fun y z)) (addfraction_fun (multfraction_fun x y) (multfraction_fun x z)) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun fraction1 x) x *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun x fraction1) x *) (* Goal: forall x y z : fraction, eqfraction (multfraction_fun (multfraction_fun x y) z) (multfraction_fun x (multfraction_fun y z)) *) unfold multfraction_fun, eqfraction in |- *; simpl in |- *. (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (addfraction_fun x y) z) (addfraction_fun (multfraction_fun x z) (multfraction_fun y z)) *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun x (addfraction_fun y z)) (addfraction_fun (multfraction_fun x y) (multfraction_fun x z)) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun fraction1 x) x *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun x fraction1) x *) (* Goal: forall x y z : fraction, @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (num y)) (num z)) (@ring_mult (cring_ring (idomain_ring R)) (den x) (@ring_mult (cring_ring (idomain_ring R)) (den y) (den z)))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (@ring_mult (cring_ring (idomain_ring R)) (num y) (num z))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y)) (den z))) *) auto with algebra. (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (addfraction_fun x y) z) (addfraction_fun (multfraction_fun x z) (multfraction_fun y z)) *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun x (addfraction_fun y z)) (addfraction_fun (multfraction_fun x y) (multfraction_fun x z)) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun fraction1 x) x *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun x fraction1) x *) simpl in |- *. (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (addfraction_fun x y) z) (addfraction_fun (multfraction_fun x z) (multfraction_fun y z)) *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun x (addfraction_fun y z)) (addfraction_fun (multfraction_fun x y) (multfraction_fun x z)) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun fraction1 x) x *) (* Goal: forall x : fraction, eqfraction (multfraction_fun x fraction1) x *) unfold multfraction_fun, eqfraction in |- *; simpl in |- *. (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (addfraction_fun x y) z) (addfraction_fun (multfraction_fun x z) (multfraction_fun y z)) *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun x (addfraction_fun y z)) (addfraction_fun (multfraction_fun x y) (multfraction_fun x z)) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun fraction1 x) x *) (* Goal: forall x : fraction, @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (ring_unit (cring_ring (idomain_ring R)))) (den x)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (@ring_mult (cring_ring (idomain_ring R)) (den x) (ring_unit (cring_ring (idomain_ring R))))) *) auto with algebra. (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (addfraction_fun x y) z) (addfraction_fun (multfraction_fun x z) (multfraction_fun y z)) *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun x (addfraction_fun y z)) (addfraction_fun (multfraction_fun x y) (multfraction_fun x z)) *) (* Goal: forall x : Carrier fraction_set, @Equal fraction_set (multfraction_fun fraction1 x) x *) intros x; try assumption. (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (addfraction_fun x y) z) (addfraction_fun (multfraction_fun x z) (multfraction_fun y z)) *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun x (addfraction_fun y z)) (addfraction_fun (multfraction_fun x y) (multfraction_fun x z)) *) (* Goal: @Equal fraction_set (multfraction_fun fraction1 x) x *) apply Trans with (multfraction_fun x fraction1); auto with algebra. (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (addfraction_fun x y) z) (addfraction_fun (multfraction_fun x z) (multfraction_fun y z)) *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun x (addfraction_fun y z)) (addfraction_fun (multfraction_fun x y) (multfraction_fun x z)) *) (* Goal: @Equal fraction_set (multfraction_fun x fraction1) x *) (* Goal: @Equal fraction_set (multfraction_fun fraction1 x) (multfraction_fun x fraction1) *) apply multfraction_com. (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (addfraction_fun x y) z) (addfraction_fun (multfraction_fun x z) (multfraction_fun y z)) *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun x (addfraction_fun y z)) (addfraction_fun (multfraction_fun x y) (multfraction_fun x z)) *) (* Goal: @Equal fraction_set (multfraction_fun x fraction1) x *) unfold multfraction_fun, eqfraction in |- *; simpl in |- *. (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (addfraction_fun x y) z) (addfraction_fun (multfraction_fun x z) (multfraction_fun y z)) *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun x (addfraction_fun y z)) (addfraction_fun (multfraction_fun x y) (multfraction_fun x z)) *) (* Goal: eqfraction (Build_fraction (@ring_mult (cring_ring (idomain_ring R)) (num x) (ring_unit (cring_ring (idomain_ring R)))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (ring_unit (cring_ring (idomain_ring R)))) (@INTEGRAL_DOMAIN_prop_rev R (den x) (ring_unit (cring_ring (idomain_ring R))) (den_prf x) diff10)) x *) unfold multfraction_fun, eqfraction in |- *; simpl in |- *. (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (addfraction_fun x y) z) (addfraction_fun (multfraction_fun x z) (multfraction_fun y z)) *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun x (addfraction_fun y z)) (addfraction_fun (multfraction_fun x y) (multfraction_fun x z)) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (ring_unit (cring_ring (idomain_ring R)))) (den x)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (@ring_mult (cring_ring (idomain_ring R)) (den x) (ring_unit (cring_ring (idomain_ring R))))) *) auto with algebra. (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (addfraction_fun x y) z) (addfraction_fun (multfraction_fun x z) (multfraction_fun y z)) *) (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun x (addfraction_fun y z)) (addfraction_fun (multfraction_fun x y) (multfraction_fun x z)) *) exact multfraction_dist_l. (* Goal: forall x y z : Carrier fraction_set, @Equal fraction_set (multfraction_fun (addfraction_fun x y) z) (addfraction_fun (multfraction_fun x z) (multfraction_fun y z)) *) intros x y z; try assumption. (* Goal: @Equal fraction_set (multfraction_fun (addfraction_fun x y) z) (addfraction_fun (multfraction_fun x z) (multfraction_fun y z)) *) apply Trans with (multfraction_fun z (addfraction_fun x y)); auto with algebra. (* Goal: @Equal fraction_set (multfraction_fun z (addfraction_fun x y)) (addfraction_fun (multfraction_fun x z) (multfraction_fun y z)) *) (* Goal: @Equal fraction_set (multfraction_fun (addfraction_fun x y) z) (multfraction_fun z (addfraction_fun x y)) *) apply multfraction_com. (* Goal: @Equal fraction_set (multfraction_fun z (addfraction_fun x y)) (addfraction_fun (multfraction_fun x z) (multfraction_fun y z)) *) apply Trans with (addfraction_fun (multfraction_fun z x) (multfraction_fun z y)); auto with algebra. (* Goal: @Equal fraction_set (addfraction_fun (multfraction_fun z x) (multfraction_fun z y)) (addfraction_fun (multfraction_fun x z) (multfraction_fun y z)) *) (* Goal: @Equal fraction_set (multfraction_fun z (addfraction_fun x y)) (addfraction_fun (multfraction_fun z x) (multfraction_fun z y)) *) apply multfraction_dist_l. (* Goal: @Equal fraction_set (addfraction_fun (multfraction_fun z x) (multfraction_fun z y)) (addfraction_fun (multfraction_fun x z) (multfraction_fun y z)) *) apply addfraction_law. (* Goal: @Equal fraction_set (multfraction_fun z y) (multfraction_fun y z) *) (* Goal: @Equal fraction_set (multfraction_fun z x) (multfraction_fun x z) *) apply multfraction_com. (* Goal: @Equal fraction_set (multfraction_fun z y) (multfraction_fun y z) *) apply multfraction_com. Qed. Definition fract_field_ring : CRING. Proof. (* Goal: Ob CRING *) apply (Build_cring (cring_ring:=fract_field_ring_aux)). (* Goal: cring_on fract_field_ring_aux *) apply (Build_cring_on (R:=fract_field_ring_aux)). (* Goal: @commutative (sgroup_set (monoid_sgroup (@Build_monoid (@Build_sgroup (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group fract_field_ring_aux))))) (@ring_mult_sgroup (ring_group fract_field_ring_aux) (ring_on_def fract_field_ring_aux))) (@ring_mult_monoid (ring_group fract_field_ring_aux) (ring_on_def fract_field_ring_aux))))) (@sgroup_law_map (sgroup_set (monoid_sgroup (@Build_monoid (@Build_sgroup (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group fract_field_ring_aux))))) (@ring_mult_sgroup (ring_group fract_field_ring_aux) (ring_on_def fract_field_ring_aux))) (@ring_mult_monoid (ring_group fract_field_ring_aux) (ring_on_def fract_field_ring_aux))))) (sgroup_on_def (monoid_sgroup (@Build_monoid (@Build_sgroup (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group fract_field_ring_aux))))) (@ring_mult_sgroup (ring_group fract_field_ring_aux) (ring_on_def fract_field_ring_aux))) (@ring_mult_monoid (ring_group fract_field_ring_aux) (ring_on_def fract_field_ring_aux)))))) *) exact multfraction_com. Qed. Variable zero_dec : forall x : R, {Equal x (monoid_unit R)} + {~ Equal x (monoid_unit R)}. Definition invfraction_fun : fract_field_ring -> fract_field_ring := fun x : fraction_set => match zero_dec (num x) with | left _ => x | right n => Build_fraction (den x) (num x) n end. Definition invfraction : MAP fract_field_ring fract_field_ring. Proof. (* Goal: Carrier (MAP (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring fract_field_ring)))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring fract_field_ring))))))) *) apply (Build_Map (A:=fract_field_ring) (B:=fract_field_ring) (Ap:=invfraction_fun)). (* Goal: @fun_compatible (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring fract_field_ring)))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring fract_field_ring)))))) invfraction_fun *) red in |- *. (* Goal: forall (x y : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring fract_field_ring))))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring fract_field_ring)))))) x y), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring fract_field_ring)))))) (invfraction_fun x) (invfraction_fun y) *) simpl in |- *. (* Goal: forall (x y : fraction) (_ : eqfraction x y), eqfraction (invfraction_fun x) (invfraction_fun y) *) unfold invfraction_fun, eqfraction in |- *; simpl in |- *. (* Goal: forall (x y : fraction) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (num x) (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x))), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (num match zero_dec (num x) with | left e => x | right n => Build_fraction (den x) (num x) n end) (den match zero_dec (num y) with | left e => y | right n => Build_fraction (den y) (num y) n end)) (@ring_mult (cring_ring (idomain_ring R)) (num match zero_dec (num y) with | left e => y | right n => Build_fraction (den y) (num y) n end) (den match zero_dec (num x) with | left e => x | right n => Build_fraction (den x) (num x) n end)) *) intros x y; try assumption. (* Goal: forall _ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (num x) (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x)), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (num match zero_dec (num x) with | left e => x | right n => Build_fraction (den x) (num x) n end) (den match zero_dec (num y) with | left e => y | right n => Build_fraction (den y) (num y) n end)) (@ring_mult (cring_ring (idomain_ring R)) (num match zero_dec (num y) with | left e => y | right n => Build_fraction (den y) (num y) n end) (den match zero_dec (num x) with | left e => x | right n => Build_fraction (den x) (num x) n end)) *) case (zero_dec (num x)); intros. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (num (Build_fraction (den x) (num x) n)) (den match zero_dec (num y) with | left e => y | right n => Build_fraction (den y) (num y) n end)) (@ring_mult (cring_ring (idomain_ring R)) (num match zero_dec (num y) with | left e => y | right n => Build_fraction (den y) (num y) n end) (den (Build_fraction (den x) (num x) n))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (num x) (den match zero_dec (num y) with | left e => y | right n => Build_fraction (den y) (num y) n end)) (@ring_mult (cring_ring (idomain_ring R)) (num match zero_dec (num y) with | left e => y | right n => Build_fraction (den y) (num y) n end) (den x)) *) case (zero_dec (num y)); intros. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (num (Build_fraction (den x) (num x) n)) (den match zero_dec (num y) with | left e => y | right n => Build_fraction (den y) (num y) n end)) (@ring_mult (cring_ring (idomain_ring R)) (num match zero_dec (num y) with | left e => y | right n => Build_fraction (den y) (num y) n end) (den (Build_fraction (den x) (num x) n))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (num x) (den (Build_fraction (den y) (num y) n))) (@ring_mult (cring_ring (idomain_ring R)) (num (Build_fraction (den y) (num y) n)) (den x)) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (num x) (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x)) *) auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (num (Build_fraction (den x) (num x) n)) (den match zero_dec (num y) with | left e => y | right n => Build_fraction (den y) (num y) n end)) (@ring_mult (cring_ring (idomain_ring R)) (num match zero_dec (num y) with | left e => y | right n => Build_fraction (den y) (num y) n end) (den (Build_fraction (den x) (num x) n))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (num x) (den (Build_fraction (den y) (num y) n))) (@ring_mult (cring_ring (idomain_ring R)) (num (Build_fraction (den y) (num y) n)) (den x)) *) simpl in |- *. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (num (Build_fraction (den x) (num x) n)) (den match zero_dec (num y) with | left e => y | right n => Build_fraction (den y) (num y) n end)) (@ring_mult (cring_ring (idomain_ring R)) (num match zero_dec (num y) with | left e => y | right n => Build_fraction (den y) (num y) n end) (den (Build_fraction (den x) (num x) n))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (num x) (num y)) (@ring_mult (cring_ring (idomain_ring R)) (den y) (den x)) *) cut (Equal (den x) (monoid_unit R)). (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (num (Build_fraction (den x) (num x) n)) (den match zero_dec (num y) with | left e => y | right n => Build_fraction (den y) (num y) n end)) (@ring_mult (cring_ring (idomain_ring R)) (num match zero_dec (num y) with | left e => y | right n => Build_fraction (den y) (num y) n end) (den (Build_fraction (den x) (num x) n))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (den x) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) (* Goal: forall _ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (den x) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (num x) (num y)) (@ring_mult (cring_ring (idomain_ring R)) (den y) (den x)) *) intros H'; try assumption. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (num (Build_fraction (den x) (num x) n)) (den match zero_dec (num y) with | left e => y | right n => Build_fraction (den y) (num y) n end)) (@ring_mult (cring_ring (idomain_ring R)) (num match zero_dec (num y) with | left e => y | right n => Build_fraction (den y) (num y) n end) (den (Build_fraction (den x) (num x) n))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (den x) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (num x) (num y)) (@ring_mult (cring_ring (idomain_ring R)) (den y) (den x)) *) apply Trans with (ring_mult (monoid_unit R) (num y)). (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (num (Build_fraction (den x) (num x) n)) (den match zero_dec (num y) with | left e => y | right n => Build_fraction (den y) (num y) n end)) (@ring_mult (cring_ring (idomain_ring R)) (num match zero_dec (num y) with | left e => y | right n => Build_fraction (den y) (num y) n end) (den (Build_fraction (den x) (num x) n))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (den x) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (num y)) (@ring_mult (cring_ring (idomain_ring R)) (den y) (den x)) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (num x) (num y)) (@ring_mult (cring_ring (idomain_ring R)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (num y)) *) auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (num (Build_fraction (den x) (num x) n)) (den match zero_dec (num y) with | left e => y | right n => Build_fraction (den y) (num y) n end)) (@ring_mult (cring_ring (idomain_ring R)) (num match zero_dec (num y) with | left e => y | right n => Build_fraction (den y) (num y) n end) (den (Build_fraction (den x) (num x) n))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (den x) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (num y)) (@ring_mult (cring_ring (idomain_ring R)) (den y) (den x)) *) apply Trans with (monoid_unit R); auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (num (Build_fraction (den x) (num x) n)) (den match zero_dec (num y) with | left e => y | right n => Build_fraction (den y) (num y) n end)) (@ring_mult (cring_ring (idomain_ring R)) (num match zero_dec (num y) with | left e => y | right n => Build_fraction (den y) (num y) n end) (den (Build_fraction (den x) (num x) n))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (den x) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (den y) (den x)) *) apply Trans with (ring_mult (den y) (monoid_unit R)); auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (num (Build_fraction (den x) (num x) n)) (den match zero_dec (num y) with | left e => y | right n => Build_fraction (den y) (num y) n end)) (@ring_mult (cring_ring (idomain_ring R)) (num match zero_dec (num y) with | left e => y | right n => Build_fraction (den y) (num y) n end) (den (Build_fraction (den x) (num x) n))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (den x) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) apply INTEGRAL_DOMAIN_mult_n0_l with (num y); auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (num (Build_fraction (den x) (num x) n)) (den match zero_dec (num y) with | left e => y | right n => Build_fraction (den y) (num y) n end)) (@ring_mult (cring_ring (idomain_ring R)) (num match zero_dec (num y) with | left e => y | right n => Build_fraction (den y) (num y) n end) (den (Build_fraction (den x) (num x) n))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) apply Trans with (ring_mult (num x) (den y)); auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (num (Build_fraction (den x) (num x) n)) (den match zero_dec (num y) with | left e => y | right n => Build_fraction (den y) (num y) n end)) (@ring_mult (cring_ring (idomain_ring R)) (num match zero_dec (num y) with | left e => y | right n => Build_fraction (den y) (num y) n end) (den (Build_fraction (den x) (num x) n))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (num x) (den y)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) apply Trans with (ring_mult (monoid_unit R) (den y)); auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (num (Build_fraction (den x) (num x) n)) (den match zero_dec (num y) with | left e => y | right n => Build_fraction (den y) (num y) n end)) (@ring_mult (cring_ring (idomain_ring R)) (num match zero_dec (num y) with | left e => y | right n => Build_fraction (den y) (num y) n end) (den (Build_fraction (den x) (num x) n))) *) case (zero_dec (num y)); intros. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (num (Build_fraction (den x) (num x) n)) (den (Build_fraction (den y) (num y) n0))) (@ring_mult (cring_ring (idomain_ring R)) (num (Build_fraction (den y) (num y) n0)) (den (Build_fraction (den x) (num x) n))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (num (Build_fraction (den x) (num x) n)) (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den (Build_fraction (den x) (num x) n))) *) simpl in |- *. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (num (Build_fraction (den x) (num x) n)) (den (Build_fraction (den y) (num y) n0))) (@ring_mult (cring_ring (idomain_ring R)) (num (Build_fraction (den y) (num y) n0)) (den (Build_fraction (den x) (num x) n))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (num x)) *) cut (Equal (den y) (monoid_unit R)). (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (num (Build_fraction (den x) (num x) n)) (den (Build_fraction (den y) (num y) n0))) (@ring_mult (cring_ring (idomain_ring R)) (num (Build_fraction (den y) (num y) n0)) (den (Build_fraction (den x) (num x) n))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (den y) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) (* Goal: forall _ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (den y) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (num x)) *) intros H'; try assumption. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (num (Build_fraction (den x) (num x) n)) (den (Build_fraction (den y) (num y) n0))) (@ring_mult (cring_ring (idomain_ring R)) (num (Build_fraction (den y) (num y) n0)) (den (Build_fraction (den x) (num x) n))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (den y) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (num x)) *) apply Trans with (ring_mult (monoid_unit R) (num x)). (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (num (Build_fraction (den x) (num x) n)) (den (Build_fraction (den y) (num y) n0))) (@ring_mult (cring_ring (idomain_ring R)) (num (Build_fraction (den y) (num y) n0)) (den (Build_fraction (den x) (num x) n))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (den y) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (num x)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (num x)) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y)) (@ring_mult (cring_ring (idomain_ring R)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (num x)) *) auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (num (Build_fraction (den x) (num x) n)) (den (Build_fraction (den y) (num y) n0))) (@ring_mult (cring_ring (idomain_ring R)) (num (Build_fraction (den y) (num y) n0)) (den (Build_fraction (den x) (num x) n))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (den y) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (num x)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (num x)) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y)) (@ring_mult (cring_ring (idomain_ring R)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (num x)) *) apply Trans with (monoid_unit R); auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (num (Build_fraction (den x) (num x) n)) (den (Build_fraction (den y) (num y) n0))) (@ring_mult (cring_ring (idomain_ring R)) (num (Build_fraction (den y) (num y) n0)) (den (Build_fraction (den x) (num x) n))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (den y) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (num x)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (num x)) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den y)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) apply Trans with (ring_mult (den x) (monoid_unit R)); auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (num (Build_fraction (den x) (num x) n)) (den (Build_fraction (den y) (num y) n0))) (@ring_mult (cring_ring (idomain_ring R)) (num (Build_fraction (den y) (num y) n0)) (den (Build_fraction (den x) (num x) n))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (den y) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (num x)) (@ring_mult (cring_ring (idomain_ring R)) (num y) (num x)) *) auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (num (Build_fraction (den x) (num x) n)) (den (Build_fraction (den y) (num y) n0))) (@ring_mult (cring_ring (idomain_ring R)) (num (Build_fraction (den y) (num y) n0)) (den (Build_fraction (den x) (num x) n))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (den y) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) apply INTEGRAL_DOMAIN_mult_n0_l with (num x); auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (num (Build_fraction (den x) (num x) n)) (den (Build_fraction (den y) (num y) n0))) (@ring_mult (cring_ring (idomain_ring R)) (num (Build_fraction (den y) (num y) n0)) (den (Build_fraction (den x) (num x) n))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (num x) (den y)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) apply Trans with (ring_mult (num y) (den x)); auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (num (Build_fraction (den x) (num x) n)) (den (Build_fraction (den y) (num y) n0))) (@ring_mult (cring_ring (idomain_ring R)) (num (Build_fraction (den y) (num y) n0)) (den (Build_fraction (den x) (num x) n))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) apply Trans with (ring_mult (monoid_unit R) (den x)); auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (num (Build_fraction (den x) (num x) n)) (den (Build_fraction (den y) (num y) n0))) (@ring_mult (cring_ring (idomain_ring R)) (num (Build_fraction (den y) (num y) n0)) (den (Build_fraction (den x) (num x) n))) *) simpl in |- *. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (num y)) (@ring_mult (cring_ring (idomain_ring R)) (den y) (num x)) *) apply Trans with (ring_mult (num y) (den x)); auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (num y) (den x)) (@ring_mult (cring_ring (idomain_ring R)) (den y) (num x)) *) apply Trans with (ring_mult (num x) (den y)); auto with algebra. Qed. Let ff_inr_r : forall x : fract_field_ring, ~ Equal x (monoid_unit fract_field_ring) -> Equal (ring_mult x (Ap invfraction x)) (ring_unit fract_field_ring). Proof. (* Goal: forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring fract_field_ring))))))) (_ : not (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring fract_field_ring)))))) x (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring fract_field_ring))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring fract_field_ring)))))))), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring fract_field_ring)))))) (@ring_mult (cring_ring fract_field_ring) x (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring fract_field_ring)))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring fract_field_ring)))))) invfraction x)) (ring_unit (cring_ring fract_field_ring)) *) simpl in |- *. (* Goal: forall (x : fraction) (_ : not (eqfraction x fraction0)), eqfraction (@ring_mult fract_field_ring_aux x (invfraction_fun x)) (ring_unit fract_field_ring_aux) *) unfold invfraction_fun, eqfraction in |- *; simpl in |- *. (* Goal: forall (x : fraction) (_ : not (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (num x) (ring_unit (cring_ring (idomain_ring R)))) (@ring_mult (cring_ring (idomain_ring R)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (den x)))), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (num match zero_dec (num x) with | left e => x | right n => Build_fraction (den x) (num x) n end)) (ring_unit (cring_ring (idomain_ring R)))) (@ring_mult (cring_ring (idomain_ring R)) (ring_unit (cring_ring (idomain_ring R))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den match zero_dec (num x) with | left e => x | right n => Build_fraction (den x) (num x) n end))) *) intros x; try assumption. (* Goal: forall _ : not (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (num x) (ring_unit (cring_ring (idomain_ring R)))) (@ring_mult (cring_ring (idomain_ring R)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (den x))), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (num match zero_dec (num x) with | left e => x | right n => Build_fraction (den x) (num x) n end)) (ring_unit (cring_ring (idomain_ring R)))) (@ring_mult (cring_ring (idomain_ring R)) (ring_unit (cring_ring (idomain_ring R))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den match zero_dec (num x) with | left e => x | right n => Build_fraction (den x) (num x) n end))) *) case (zero_dec (num x)); simpl in |- *; intros. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (den x)) (ring_unit (cring_ring (idomain_ring R)))) (@ring_mult (cring_ring (idomain_ring R)) (ring_unit (cring_ring (idomain_ring R))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (num x))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (num x)) (ring_unit (cring_ring (idomain_ring R)))) (@ring_mult (cring_ring (idomain_ring R)) (ring_unit (cring_ring (idomain_ring R))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (den x))) *) absurd (Equal (num x) (monoid_unit R)); auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (den x)) (ring_unit (cring_ring (idomain_ring R)))) (@ring_mult (cring_ring (idomain_ring R)) (ring_unit (cring_ring (idomain_ring R))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (num x))) *) (* Goal: not (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (num x) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))))) *) intuition. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (den x)) (ring_unit (cring_ring (idomain_ring R)))) (@ring_mult (cring_ring (idomain_ring R)) (ring_unit (cring_ring (idomain_ring R))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (num x))) *) (* Goal: False *) apply H. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (den x)) (ring_unit (cring_ring (idomain_ring R)))) (@ring_mult (cring_ring (idomain_ring R)) (ring_unit (cring_ring (idomain_ring R))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (num x))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (num x) (ring_unit (cring_ring (idomain_ring R)))) (@ring_mult (cring_ring (idomain_ring R)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (den x)) *) apply Trans with (num x); auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (den x)) (ring_unit (cring_ring (idomain_ring R)))) (@ring_mult (cring_ring (idomain_ring R)) (ring_unit (cring_ring (idomain_ring R))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (num x))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (num x) (@ring_mult (cring_ring (idomain_ring R)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (den x)) *) apply Trans with (monoid_unit R); auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (@ring_mult (cring_ring (idomain_ring R)) (num x) (den x)) (ring_unit (cring_ring (idomain_ring R)))) (@ring_mult (cring_ring (idomain_ring R)) (ring_unit (cring_ring (idomain_ring R))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (num x))) *) apply Trans with (ring_mult (num x) (den x)); auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (num x) (den x)) (@ring_mult (cring_ring (idomain_ring R)) (ring_unit (cring_ring (idomain_ring R))) (@ring_mult (cring_ring (idomain_ring R)) (den x) (num x))) *) apply Trans with (ring_mult (den x) (num x)); auto with algebra. Qed. Hint Resolve ff_inr_r: algebra. Let ff_field_on : field_on fract_field_ring. Proof. (* Goal: field_on (cring_ring fract_field_ring) *) apply (Build_field_on (R:=fract_field_ring) (field_inverse_map:=invfraction)). (* Goal: not (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring fract_field_ring)))))) (ring_unit (cring_ring fract_field_ring)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring fract_field_ring))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring fract_field_ring))))))) *) (* Goal: forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring fract_field_ring))))))) (_ : not (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring fract_field_ring)))))) x (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring fract_field_ring))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring fract_field_ring)))))))), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring fract_field_ring)))))) (@ring_mult (cring_ring fract_field_ring) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring fract_field_ring)))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring fract_field_ring)))))) invfraction x) x) (ring_unit (cring_ring fract_field_ring)) *) (* Goal: forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring fract_field_ring))))))) (_ : not (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring fract_field_ring)))))) x (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring fract_field_ring))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring fract_field_ring)))))))), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring fract_field_ring)))))) (@ring_mult (cring_ring fract_field_ring) x (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring fract_field_ring)))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring fract_field_ring)))))) invfraction x)) (ring_unit (cring_ring fract_field_ring)) *) exact ff_inr_r. (* Goal: not (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring fract_field_ring)))))) (ring_unit (cring_ring fract_field_ring)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring fract_field_ring))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring fract_field_ring))))))) *) (* Goal: forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring fract_field_ring))))))) (_ : not (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring fract_field_ring)))))) x (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring fract_field_ring))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring fract_field_ring)))))))), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring fract_field_ring)))))) (@ring_mult (cring_ring fract_field_ring) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring fract_field_ring)))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring fract_field_ring)))))) invfraction x) x) (ring_unit (cring_ring fract_field_ring)) *) intros x H'; try assumption. (* Goal: not (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring fract_field_ring)))))) (ring_unit (cring_ring fract_field_ring)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring fract_field_ring))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring fract_field_ring))))))) *) (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring fract_field_ring)))))) (@ring_mult (cring_ring fract_field_ring) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring fract_field_ring)))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring fract_field_ring)))))) invfraction x) x) (ring_unit (cring_ring fract_field_ring)) *) apply Trans with (ring_mult x (Ap invfraction x)); auto with algebra. (* Goal: not (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring fract_field_ring)))))) (ring_unit (cring_ring fract_field_ring)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring fract_field_ring))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring fract_field_ring))))))) *) simpl in |- *. (* Goal: not (eqfraction (ring_unit fract_field_ring_aux) fraction0) *) unfold eqfraction in |- *; simpl in |- *. (* Goal: not (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (ring_unit (cring_ring (idomain_ring R))) (ring_unit (cring_ring (idomain_ring R)))) (@ring_mult (cring_ring (idomain_ring R)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (ring_unit (cring_ring (idomain_ring R))))) *) unfold not in |- *. (* Goal: forall _ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (ring_unit (cring_ring (idomain_ring R))) (ring_unit (cring_ring (idomain_ring R)))) (@ring_mult (cring_ring (idomain_ring R)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (ring_unit (cring_ring (idomain_ring R)))), False *) intros H'; try assumption. (* Goal: False *) absurd (Equal (ring_unit R:R) (monoid_unit R)); auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (ring_unit (cring_ring (idomain_ring R))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) apply Trans with (ring_mult (ring_unit R) (ring_unit R)); auto with algebra. (* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) (@ring_mult (cring_ring (idomain_ring R)) (ring_unit (cring_ring (idomain_ring R))) (ring_unit (cring_ring (idomain_ring R)))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring R))))))) *) apply Trans with (ring_mult (monoid_unit R) (ring_unit R)); auto with algebra. Qed. Definition fraction_cfield := Build_cfield ff_field_on. End Def.
Require Import securite. Lemma POinvprel7 : forall (l l0 : list C) (k k0 k1 k2 : K) (c c0 c1 c2 : C) (d d0 d1 d2 d3 d4 d5 d6 d7 d8 d9 d10 d11 d12 d13 d14 d15 d16 d17 d18 d19 d20 : D), inv0 (ABSI (MBNaKab d7 d8 d9 k0) (MANbKabCaCb d4 d5 d6 k c c0) (MABNaNbKeyK d d0 d1 d2 d3) l) -> inv1 (ABSI (MBNaKab d7 d8 d9 k0) (MANbKabCaCb d4 d5 d6 k c c0) (MABNaNbKeyK d d0 d1 d2 d3) l) -> invP (ABSI (MBNaKab d7 d8 d9 k0) (MANbKabCaCb d4 d5 d6 k c c0) (MABNaNbKeyK d d0 d1 d2 d3) l) -> rel7 (ABSI (MBNaKab d7 d8 d9 k0) (MANbKabCaCb d4 d5 d6 k c c0) (MABNaNbKeyK d d0 d1 d2 d3) l) (ABSI (MBNaKab d18 d19 d20 k2) (MANbKabCaCb d15 d16 d17 k1 c1 c2) (MABNaNbKeyK d10 d11 d12 d13 d14) l0) -> invP (ABSI (MBNaKab d18 d19 d20 k2) (MANbKabCaCb d15 d16 d17 k1 c1 c2) (MABNaNbKeyK d10 d11 d12 d13 d14) l0). Proof. (* Goal: forall (l l0 : list C) (k k0 k1 k2 : K) (c c0 c1 c2 : C) (d d0 d1 d2 d3 d4 d5 d6 d7 d8 d9 d10 d11 d12 d13 d14 d15 d16 d17 d18 d19 d20 : D) (_ : inv0 (ABSI (MBNaKab d7 d8 d9 k0) (MANbKabCaCb d4 d5 d6 k c c0) (MABNaNbKeyK d d0 d1 d2 d3) l)) (_ : inv1 (ABSI (MBNaKab d7 d8 d9 k0) (MANbKabCaCb d4 d5 d6 k c c0) (MABNaNbKeyK d d0 d1 d2 d3) l)) (_ : invP (ABSI (MBNaKab d7 d8 d9 k0) (MANbKabCaCb d4 d5 d6 k c c0) (MABNaNbKeyK d d0 d1 d2 d3) l)) (_ : rel7 (ABSI (MBNaKab d7 d8 d9 k0) (MANbKabCaCb d4 d5 d6 k c c0) (MABNaNbKeyK d d0 d1 d2 d3) l) (ABSI (MBNaKab d18 d19 d20 k2) (MANbKabCaCb d15 d16 d17 k1 c1 c2) (MABNaNbKeyK d10 d11 d12 d13 d14) l0)), invP (ABSI (MBNaKab d18 d19 d20 k2) (MANbKabCaCb d15 d16 d17 k1 c1 c2) (MABNaNbKeyK d10 d11 d12 d13 d14) l0) *) do 32 intro. (* Goal: forall (_ : inv0 (ABSI (MBNaKab d7 d8 d9 k0) (MANbKabCaCb d4 d5 d6 k c c0) (MABNaNbKeyK d d0 d1 d2 d3) l)) (_ : inv1 (ABSI (MBNaKab d7 d8 d9 k0) (MANbKabCaCb d4 d5 d6 k c c0) (MABNaNbKeyK d d0 d1 d2 d3) l)) (_ : invP (ABSI (MBNaKab d7 d8 d9 k0) (MANbKabCaCb d4 d5 d6 k c c0) (MABNaNbKeyK d d0 d1 d2 d3) l)) (_ : rel7 (ABSI (MBNaKab d7 d8 d9 k0) (MANbKabCaCb d4 d5 d6 k c c0) (MABNaNbKeyK d d0 d1 d2 d3) l) (ABSI (MBNaKab d18 d19 d20 k2) (MANbKabCaCb d15 d16 d17 k1 c1 c2) (MABNaNbKeyK d10 d11 d12 d13 d14) l0)), invP (ABSI (MBNaKab d18 d19 d20 k2) (MANbKabCaCb d15 d16 d17 k1 c1 c2) (MABNaNbKeyK d10 d11 d12 d13 d14) l0) *) unfold inv0, invP, rel7 in |- *; intros know_c_c0_l Inv1 know_Kab and1. (* Goal: not (known_in (B2C (K2B (KeyAB Aid Bid))) (@app C l0 rngDDKKeyABminusKab)) *) elim know_c_c0_l; intros know_c_l know_c0_l. (* Goal: not (known_in (B2C (K2B (KeyAB Aid Bid))) (@app C l0 rngDDKKeyABminusKab)) *) elim and1; intros eq_l0 t1. (* Goal: not (known_in (B2C (K2B (KeyAB Aid Bid))) (@app C l0 rngDDKKeyABminusKab)) *) clear know_c_c0_l Inv1 and1 t1. (* Goal: not (known_in (B2C (K2B (KeyAB Aid Bid))) (@app C l0 rngDDKKeyABminusKab)) *) rewrite eq_l0. (* Goal: not (known_in (B2C (K2B (KeyAB Aid Bid))) (@app C (@cons C (Pair (B2C (D2B d4)) c0) l) rngDDKKeyABminusKab)) *) apply D2. (* Goal: not_comp_of (B2C (K2B (KeyAB Aid Bid))) (@app C (@cons C (Pair (B2C (D2B d4)) c0) l) rngDDKKeyABminusKab) *) simpl in |- *. (* Goal: not_comp_of (B2C (K2B (KeyAB Aid Bid))) (@cons C (Pair (B2C (D2B d4)) c0) (@app C l rngDDKKeyABminusKab)) *) repeat apply C2 || apply C3 || apply C4. (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (Pair (B2C (D2B d4)) c0)) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (B2C (D2B d4))) *) (* Goal: not_comp_of (B2C (K2B (KeyAB Aid Bid))) (@cons C c0 (@app C l rngDDKKeyABminusKab)) *) apply equivncomp with (l ++ rngDDKKeyABminusKab). (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (Pair (B2C (D2B d4)) c0)) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (B2C (D2B d4))) *) (* Goal: not_comp_of (B2C (K2B (KeyAB Aid Bid))) (@app C l rngDDKKeyABminusKab) *) (* Goal: equivS (@app C l rngDDKKeyABminusKab) (@cons C c0 (@app C l rngDDKKeyABminusKab)) *) apply AlreadyIn; apply EP0; assumption. (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (Pair (B2C (D2B d4)) c0)) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (B2C (D2B d4))) *) (* Goal: not_comp_of (B2C (K2B (KeyAB Aid Bid))) (@app C l rngDDKKeyABminusKab) *) apply D1; assumption. (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (Pair (B2C (D2B d4)) c0)) *) (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (B2C (D2B d4))) *) discriminate. (* Goal: not (@eq C (B2C (K2B (KeyAB Aid Bid))) (Pair (B2C (D2B d4)) c0)) *) discriminate. Qed.
Require Export GeoCoq.Elements.OriginalProofs.lemma_ABCequalsCBA. Require Export GeoCoq.Elements.OriginalProofs.proposition_04. Section Euclid. Context `{Ax:euclidean_neutral_ruler_compass}. Lemma proposition_05 : forall A B C, isosceles A B C -> CongA A B C A C B. Proof. (* Goal: forall (A B C : @Point Ax0) (_ : @isosceles Ax0 A B C), @CongA Ax0 A B C A C B *) intros. (* Goal: @CongA Ax0 A B C A C B *) assert ((Triangle A B C /\ Cong A B A C)) by (conclude_def isosceles ). (* Goal: @CongA Ax0 A B C A C B *) assert (Cong A C A B) by (conclude lemma_congruencesymmetric). (* Goal: @CongA Ax0 A B C A C B *) assert (nCol A B C) by (conclude_def Triangle ). (* Goal: @CongA Ax0 A B C A C B *) assert (~ Col C A B). (* Goal: @CongA Ax0 A B C A C B *) (* Goal: not (@Col Ax0 C A B) *) { (* Goal: not (@Col Ax0 C A B) *) intro. (* Goal: False *) assert (Col A B C) by (forward_using lemma_collinearorder). (* Goal: False *) contradict. (* BG Goal: @CongA Ax0 A B C A C B *) } (* Goal: @CongA Ax0 A B C A C B *) assert (CongA C A B B A C) by (conclude lemma_ABCequalsCBA). (* Goal: @CongA Ax0 A B C A C B *) assert ((Cong C B B C /\ CongA A C B A B C /\ CongA A B C A C B)) by (conclude proposition_04). (* Goal: @CongA Ax0 A B C A C B *) close. Qed. End Euclid.
Require Import mathcomp.ssreflect.ssreflect. From mathcomp Require Import ssrbool ssrfun eqtype ssrnat seq div fintype tuple. From mathcomp Require Import tuple bigop prime finset fingroup morphism perm automorphism. From mathcomp Require Import quotient action cyclic pgroup gseries sylow primitive_action. Unset Printing Implicit Defensive. Set Implicit Arguments. Unset Strict Implicit. Import GroupScope. Definition bool_groupMixin := FinGroup.Mixin addbA addFb addbb. Canonical bool_baseGroup := Eval hnf in BaseFinGroupType bool bool_groupMixin. Canonical boolGroup := Eval hnf in FinGroupType addbb. Section SymAltDef. Variable T : finType. Implicit Types (s : {perm T}) (x y z : T). Definition Sym of phant T : {set {perm T}} := setT. Canonical Sym_group phT := Eval hnf in [group of Sym phT]. Local Notation "'Sym_T" := (Sym (Phant T)) (at level 0). Canonical sign_morph := @Morphism _ _ 'Sym_T _ (in2W (@odd_permM _)). Definition Alt of phant T := 'ker (@odd_perm T). Canonical Alt_group phT := Eval hnf in [group of Alt phT]. Local Notation "'Alt_T" := (Alt (Phant T)) (at level 0). Lemma Alt_even p : (p \in 'Alt_T) = ~~ p. Proof. (* Goal: @eq bool (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T)))) p (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) (Alt (Phant (Finite.sort T)))))) (negb (@odd_perm T p)) *) by rewrite !inE /=; case: odd_perm. Qed. Lemma Alt_subset : 'Alt_T \subset 'Sym_T. Proof. (* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) (Alt (Phant (Finite.sort T))))) (@mem (Finite.sort (perm_for_finType T)) (predPredType (Finite.sort (perm_for_finType T))) (@SetDef.pred_of_set (perm_for_finType T) (Sym (Phant (Finite.sort T)))))) *) exact: subsetT. Qed. Lemma Alt_normal : 'Alt_T <| 'Sym_T. Proof. (* Goal: is_true (@normal (perm_finGroupType T) (Alt (Phant (Finite.sort T))) (Sym (Phant (Finite.sort T)))) *) exact: ker_normal. Qed. Lemma Alt_norm : 'Sym_T \subset 'N('Alt_T). Proof. (* Goal: is_true (@subset (perm_for_finType T) (@mem (Finite.sort (perm_for_finType T)) (predPredType (Finite.sort (perm_for_finType T))) (@SetDef.pred_of_set (perm_for_finType T) (Sym (Phant (Finite.sort T))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) (@normaliser (perm_finGroupType T) (Alt (Phant (Finite.sort T))))))) *) by case/andP: Alt_normal. Qed. Let n := #|T|. Lemma Alt_index : 1 < n -> #|'Sym_T : 'Alt_T| = 2. Proof. (* Goal: forall _ : is_true (leq (S (S O)) n), @eq nat (@indexg (perm_of_finGroupType T) (Sym (Phant (Finite.sort T))) (Alt (Phant (Finite.sort T)))) (S (S O)) *) move=> lt1n; rewrite -card_quotient ?Alt_norm //=. (* Goal: @eq nat (@card (@coset_finType (perm_of_finGroupType T) (Alt (Phant (Finite.sort T)))) (@mem (@coset_of (perm_of_finGroupType T) (Alt (Phant (Finite.sort T)))) (predPredType (@coset_of (perm_of_finGroupType T) (Alt (Phant (Finite.sort T))))) (@SetDef.pred_of_set (@coset_finType (perm_of_finGroupType T) (Alt (Phant (Finite.sort T)))) (@quotient (perm_of_finGroupType T) (Sym (Phant (Finite.sort T))) (Alt (Phant (Finite.sort T))))))) (S (S O)) *) have : ('Sym_T / 'Alt_T) \isog (@odd_perm T @* 'Sym_T) by apply: first_isog. (* Goal: forall _ : is_true (@isog (@coset_groupType (perm_of_finGroupType T) (Alt (Phant (Finite.sort T)))) boolGroup (@quotient (perm_of_finGroupType T) (Sym (Phant (Finite.sort T))) (Alt (Phant (Finite.sort T)))) (@morphim (perm_finGroupType T) boolGroup (Sym (Phant (Finite.sort T))) sign_morph (@MorPhantom (perm_finGroupType T) boolGroup (@odd_perm T)) (Sym (Phant (Finite.sort T))))), @eq nat (@card (@coset_finType (perm_of_finGroupType T) (Alt (Phant (Finite.sort T)))) (@mem (@coset_of (perm_of_finGroupType T) (Alt (Phant (Finite.sort T)))) (predPredType (@coset_of (perm_of_finGroupType T) (Alt (Phant (Finite.sort T))))) (@SetDef.pred_of_set (@coset_finType (perm_of_finGroupType T) (Alt (Phant (Finite.sort T)))) (@quotient (perm_of_finGroupType T) (Sym (Phant (Finite.sort T))) (Alt (Phant (Finite.sort T))))))) (S (S O)) *) case/isogP=> g /injmP/card_in_imset <-. (* Goal: forall _ : @eq (@set_of (FinGroup.finType (FinGroup.base boolGroup)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base boolGroup))))) (@morphim (@coset_groupType (perm_of_finGroupType T) (Alt (Phant (Finite.sort T)))) boolGroup (@gval (@coset_groupType (perm_of_finGroupType T) (Alt (Phant (Finite.sort T)))) (@quotient_group (perm_of_finGroupType T) (Sym_group (Phant (Finite.sort T))) (Alt (Phant (Finite.sort T))))) g (@MorPhantom (@coset_groupType (perm_of_finGroupType T) (Alt (Phant (Finite.sort T)))) boolGroup (@mfun (@coset_groupType (perm_of_finGroupType T) (Alt (Phant (Finite.sort T)))) boolGroup (@gval (@coset_groupType (perm_of_finGroupType T) (Alt (Phant (Finite.sort T)))) (@quotient_group (perm_of_finGroupType T) (Sym_group (Phant (Finite.sort T))) (Alt (Phant (Finite.sort T))))) g)) (@gval (@coset_groupType (perm_of_finGroupType T) (Alt (Phant (Finite.sort T)))) (@quotient_group (perm_of_finGroupType T) (Sym_group (Phant (Finite.sort T))) (Alt (Phant (Finite.sort T)))))) (@gval boolGroup (@morphim_group (perm_finGroupType T) boolGroup (Sym_group (Phant (Finite.sort T))) sign_morph (@MorPhantom (perm_finGroupType T) boolGroup (@odd_perm T)) (Sym_group (Phant (Finite.sort T))))), @eq nat (@card (FinGroup.finType (FinGroup.base boolGroup)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base boolGroup))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base boolGroup)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base boolGroup)) (@Imset.imset (FinGroup.arg_finType (FinGroup.base (@coset_groupType (perm_of_finGroupType T) (Alt (Phant (Finite.sort T)))))) (FinGroup.finType (FinGroup.base boolGroup)) (@mfun (@coset_groupType (perm_of_finGroupType T) (Alt (Phant (Finite.sort T)))) boolGroup (@gval (@coset_groupType (perm_of_finGroupType T) (Alt (Phant (Finite.sort T)))) (@quotient_group (perm_of_finGroupType T) (Sym_group (Phant (Finite.sort T))) (Alt (Phant (Finite.sort T))))) g) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType (perm_of_finGroupType T) (Alt (Phant (Finite.sort T))))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType (perm_of_finGroupType T) (Alt (Phant (Finite.sort T)))))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType (perm_of_finGroupType T) (Alt (Phant (Finite.sort T)))))) (@gval (@coset_groupType (perm_of_finGroupType T) (Alt (Phant (Finite.sort T)))) (@quotient_group (perm_of_finGroupType T) (Sym_group (Phant (Finite.sort T))) (Alt (Phant (Finite.sort T))))))))))) (S (S O)) *) rewrite /morphim setIid=> ->; rewrite -card_bool; apply: eq_card => b. (* Goal: @eq bool (@in_mem (Finite.sort (FinGroup.finType (FinGroup.base boolGroup))) b (@mem (Finite.sort (FinGroup.finType (FinGroup.base boolGroup))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base boolGroup)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base boolGroup)) (@gval boolGroup (@morphim_group (perm_finGroupType T) boolGroup (Sym_group (Phant (Finite.sort T))) sign_morph (@MorPhantom (perm_finGroupType T) boolGroup (@odd_perm T)) (Sym_group (Phant (Finite.sort T)))))))) (@in_mem (Finite.sort (FinGroup.finType (FinGroup.base boolGroup))) b (@mem (Finite.sort (FinGroup.finType (FinGroup.base boolGroup))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base boolGroup)))) (@sort_of_simpl_pred bool (pred_of_argType bool)))) *) apply/imsetP; case: b => /=; last first. (* Goal: @ex2 (perm_type T) (fun x : perm_type T => is_true (@in_mem (perm_type T) x (@mem (perm_type T) (predPredType (perm_type T)) (@SetDef.pred_of_set (FinGroup.arg_finType (perm_baseFinGroupType T)) (@setI (FinGroup.arg_finType (perm_baseFinGroupType T)) (Sym (Phant (Finite.sort T))) (Sym (Phant (Finite.sort T)))))))) (fun x : perm_type T => @eq bool true (@odd_perm T x)) *) (* Goal: @ex2 (perm_type T) (fun x : perm_type T => is_true (@in_mem (perm_type T) x (@mem (perm_type T) (predPredType (perm_type T)) (@SetDef.pred_of_set (FinGroup.arg_finType (perm_baseFinGroupType T)) (@setI (FinGroup.arg_finType (perm_baseFinGroupType T)) (Sym (Phant (Finite.sort T))) (Sym (Phant (Finite.sort T)))))))) (fun x : perm_type T => @eq bool false (@odd_perm T x)) *) by exists (1 : {perm T}); [rewrite setIid inE | rewrite odd_perm1]. (* Goal: @ex2 (perm_type T) (fun x : perm_type T => is_true (@in_mem (perm_type T) x (@mem (perm_type T) (predPredType (perm_type T)) (@SetDef.pred_of_set (FinGroup.arg_finType (perm_baseFinGroupType T)) (@setI (FinGroup.arg_finType (perm_baseFinGroupType T)) (Sym (Phant (Finite.sort T))) (Sym (Phant (Finite.sort T)))))))) (fun x : perm_type T => @eq bool true (@odd_perm T x)) *) case: (pickP T) lt1n => [x1 _ | d0]; last by rewrite /n eq_card0. (* Goal: forall _ : is_true (leq (S (S O)) n), @ex2 (perm_type T) (fun x : perm_type T => is_true (@in_mem (perm_type T) x (@mem (perm_type T) (predPredType (perm_type T)) (@SetDef.pred_of_set (FinGroup.arg_finType (perm_baseFinGroupType T)) (@setI (FinGroup.arg_finType (perm_baseFinGroupType T)) (Sym (Phant (Finite.sort T))) (Sym (Phant (Finite.sort T)))))))) (fun x : perm_type T => @eq bool true (@odd_perm T x)) *) rewrite /n (cardD1 x1) ltnS lt0n => /existsP[x2 /=]. (* Goal: forall _ : is_true (andb (negb (@eq_op (Finite.eqType T) x2 x1)) (@in_mem (Finite.sort T) x2 (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@sort_of_simpl_pred (Finite.sort T) (pred_of_argType (Finite.sort T)))))), @ex2 (perm_type T) (fun x : perm_type T => is_true (@in_mem (perm_type T) x (@mem (perm_type T) (predPredType (perm_type T)) (@SetDef.pred_of_set (FinGroup.arg_finType (perm_baseFinGroupType T)) (@setI (FinGroup.arg_finType (perm_baseFinGroupType T)) (Sym (Phant (Finite.sort T))) (Sym (Phant (Finite.sort T)))))))) (fun x : perm_type T => @eq bool true (@odd_perm T x)) *) by rewrite eq_sym andbT -odd_tperm; exists (tperm x1 x2); rewrite ?inE. Qed. Lemma card_Sym : #|'Sym_T| = n`!. Proof. (* Goal: @eq nat (@card (perm_for_finType T) (@mem (Finite.sort (perm_for_finType T)) (predPredType (Finite.sort (perm_for_finType T))) (@SetDef.pred_of_set (perm_for_finType T) (Sym (Phant (Finite.sort T)))))) (factorial n) *) rewrite -[n]cardsE -card_perm; apply: eq_card => p. (* Goal: @eq bool (@in_mem (Finite.sort (perm_for_finType T)) p (@mem (Finite.sort (perm_for_finType T)) (predPredType (Finite.sort (perm_for_finType T))) (@SetDef.pred_of_set (perm_for_finType T) (Sym (Phant (Finite.sort T)))))) (@in_mem (Finite.sort (perm_for_finType T)) p (@mem (Finite.sort (perm_for_finType T)) (predPredType (Finite.sort (perm_for_finType T))) (@perm_on T (@SetDef.finset T (fun x : Finite.sort T => @in_mem (Finite.sort T) x (@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)))))))))) *) by apply/idP/subsetP=> [? ?|]; rewrite !inE. Qed. Lemma card_Alt : 1 < n -> (2 * #|'Alt_T|)%N = n`!. Proof. (* Goal: forall _ : is_true (leq (S (S O)) n), @eq nat (muln (S (S O)) (@card (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) (Alt (Phant (Finite.sort T))))))) (factorial n) *) by move/Alt_index <-; rewrite mulnC (Lagrange Alt_subset) card_Sym. Qed. Lemma Sym_trans : [transitive^n 'Sym_T, on setT | 'P]. Lemma Alt_trans : [transitive^n.-2 'Alt_T, on setT | 'P]. Lemma aperm_faithful (A : {group {perm T}}) : [faithful A, on setT | 'P]. Proof. (* Goal: is_true (@faithful (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 (@gval (perm_of_finGroupType T) A) (@setTfor T (Phant (Finite.sort T))) (perm_action T)) *) by apply/faithfulP=> /= p _ np1; apply/eqP/perm_act1P=> y; rewrite np1 ?inE. Qed. End SymAltDef. Notation "''Sym_' T" := (Sym (Phant T)) (at level 8, T at level 2, format "''Sym_' T") : group_scope. Notation "''Sym_' T" := (Sym_group (Phant T)) : Group_scope. Notation "''Alt_' T" := (Alt (Phant T)) (at level 8, T at level 2, format "''Alt_' T") : group_scope. Notation "''Alt_' T" := (Alt_group (Phant T)) : Group_scope. Lemma trivial_Alt_2 (T : finType) : #|T| <= 2 -> 'Alt_T = 1. Proof. (* Goal: forall _ : is_true (leq (@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)))))) (S (S O))), @eq (@set_of (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T)))))) (@Alt T (Phant (Finite.sort T))) (oneg (group_set_of_baseGroupType (FinGroup.base (perm_finGroupType T)))) *) rewrite leq_eqVlt => /predU1P[] oT. (* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T)))))) (@Alt T (Phant (Finite.sort T))) (oneg (group_set_of_baseGroupType (FinGroup.base (perm_finGroupType T)))) *) (* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T)))))) (@Alt T (Phant (Finite.sort T))) (oneg (group_set_of_baseGroupType (FinGroup.base (perm_finGroupType T)))) *) by apply: card_le1_trivg; rewrite -leq_double -mul2n card_Alt oT. (* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T)))))) (@Alt T (Phant (Finite.sort T))) (oneg (group_set_of_baseGroupType (FinGroup.base (perm_finGroupType T)))) *) suffices Sym1: 'Sym_T = 1 by apply/trivgP; rewrite -Sym1 subsetT. (* Goal: @eq (@set_of (perm_for_finType T) (Phant (@perm_of T (Phant (Finite.sort T))))) (@Sym T (Phant (Finite.sort T))) (oneg (group_set_of_baseGroupType (perm_of_baseFinGroupType T))) *) by apply: card1_trivg; rewrite card_Sym; case: #|T| oT; do 2?case. Qed. Lemma simple_Alt_3 (T : finType) : #|T| = 3 -> simple 'Alt_T. Lemma not_simple_Alt_4 (T : finType) : #|T| = 4 -> ~~ simple 'Alt_T. Proof. (* Goal: forall _ : @eq nat (@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)))))) (S (S (S (S O)))), is_true (negb (@simple (perm_finGroupType T) (@Alt T (Phant (Finite.sort T))))) *) move=> oT; set A := 'Alt_T. (* Goal: is_true (negb (@simple (perm_finGroupType T) A)) *) have oA: #|A| = 12 by apply: double_inj; rewrite -mul2n card_Alt oT. (* Goal: is_true (negb (@simple (perm_finGroupType T) A)) *) suffices [p]: exists p, [/\ prime p, 1 < #|A|`_p < #|A| & #|'Syl_p(A)| == 1%N]. (* Goal: @ex nat (fun p : nat => and3 (is_true (prime p)) (is_true (andb (leq (S (S O)) (partn (@card (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) A))) (nat_pred_of_nat p))) (leq (S (partn (@card (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) A))) (nat_pred_of_nat p))) (@card (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) A)))))) (is_true (@eq_op nat_eqType (@card (group_of_finType (perm_finGroupType T)) (@mem (Finite.sort (group_of_finType (perm_finGroupType T))) (predPredType (Finite.sort (group_of_finType (perm_finGroupType T)))) (@SetDef.pred_of_set (group_of_finType (perm_finGroupType T)) (@Syl (perm_finGroupType T) p A)))) (S O)))) *) (* Goal: forall _ : and3 (is_true (prime p)) (is_true (andb (leq (S (S O)) (partn (@card (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) A))) (nat_pred_of_nat p))) (leq (S (partn (@card (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) A))) (nat_pred_of_nat p))) (@card (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) A)))))) (is_true (@eq_op nat_eqType (@card (group_of_finType (perm_finGroupType T)) (@mem (Finite.sort (group_of_finType (perm_finGroupType T))) (predPredType (Finite.sort (group_of_finType (perm_finGroupType T)))) (@SetDef.pred_of_set (group_of_finType (perm_finGroupType T)) (@Syl (perm_finGroupType T) p A)))) (S O))), is_true (negb (@simple (perm_finGroupType T) A)) *) case=> p_pr pA_int; rewrite /A; case/normal_sylowP=> P; case/pHallP. (* Goal: @ex nat (fun p : nat => and3 (is_true (prime p)) (is_true (andb (leq (S (S O)) (partn (@card (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) A))) (nat_pred_of_nat p))) (leq (S (partn (@card (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) A))) (nat_pred_of_nat p))) (@card (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) A)))))) (is_true (@eq_op nat_eqType (@card (group_of_finType (perm_finGroupType T)) (@mem (Finite.sort (group_of_finType (perm_finGroupType T))) (predPredType (Finite.sort (group_of_finType (perm_finGroupType T)))) (@SetDef.pred_of_set (group_of_finType (perm_finGroupType T)) (@Syl (perm_finGroupType T) p A)))) (S O)))) *) (* Goal: forall (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) (@gval (perm_finGroupType T) P))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) (@gval (perm_finGroupType T) (@Alt_group T (Phant (Finite.sort T)))))))) (_ : @eq nat (@card (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) (@gval (perm_finGroupType T) P)))) (partn (@card (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) (@gval (perm_finGroupType T) (@Alt_group T (Phant (Finite.sort T))))))) (nat_pred_of_nat p))) (_ : is_true (@normal (perm_finGroupType T) (@gval (perm_finGroupType T) P) (@gval (perm_finGroupType T) (@Alt_group T (Phant (Finite.sort T)))))), is_true (negb (@simple (perm_finGroupType T) (@Alt T (Phant (Finite.sort T))))) *) rewrite /= -/A => sPA pP nPA; apply/simpleP=> [] [_]; rewrite -pP in pA_int. (* Goal: @ex nat (fun p : nat => and3 (is_true (prime p)) (is_true (andb (leq (S (S O)) (partn (@card (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) A))) (nat_pred_of_nat p))) (leq (S (partn (@card (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) A))) (nat_pred_of_nat p))) (@card (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) A)))))) (is_true (@eq_op nat_eqType (@card (group_of_finType (perm_finGroupType T)) (@mem (Finite.sort (group_of_finType (perm_finGroupType T))) (predPredType (Finite.sort (group_of_finType (perm_finGroupType T)))) (@SetDef.pred_of_set (group_of_finType (perm_finGroupType T)) (@Syl (perm_finGroupType T) p A)))) (S O)))) *) (* Goal: forall _ : forall (H : @group_of (perm_finGroupType T) (Phant (FinGroup.arg_sort (FinGroup.base (perm_finGroupType T))))) (_ : is_true (@normal (perm_finGroupType T) (@gval (perm_finGroupType T) H) (@gval (perm_finGroupType T) (@Alt_group T (Phant (Finite.sort T)))))), or (@eq (@set_of (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T)))))) (@gval (perm_finGroupType T) H) (oneg (group_set_of_baseGroupType (FinGroup.base (perm_finGroupType T))))) (@eq (@set_of (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T)))))) (@gval (perm_finGroupType T) H) (@gval (perm_finGroupType T) (@Alt_group T (Phant (Finite.sort T))))), False *) by case/(_ P)=> // defP; rewrite defP oA ?cards1 in pA_int. (* Goal: @ex nat (fun p : nat => and3 (is_true (prime p)) (is_true (andb (leq (S (S O)) (partn (@card (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) A))) (nat_pred_of_nat p))) (leq (S (partn (@card (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) A))) (nat_pred_of_nat p))) (@card (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) A)))))) (is_true (@eq_op nat_eqType (@card (group_of_finType (perm_finGroupType T)) (@mem (Finite.sort (group_of_finType (perm_finGroupType T))) (predPredType (Finite.sort (group_of_finType (perm_finGroupType T)))) (@SetDef.pred_of_set (group_of_finType (perm_finGroupType T)) (@Syl (perm_finGroupType T) p A)))) (S O)))) *) have: #|'Syl_3(A)| \in filter [pred d | d %% 3 == 1%N] (divisors 12). (* Goal: forall _ : is_true (@in_mem nat (@card (group_of_finType (perm_finGroupType T)) (@mem (Finite.sort (group_of_finType (perm_finGroupType T))) (predPredType (Finite.sort (group_of_finType (perm_finGroupType T)))) (@SetDef.pred_of_set (group_of_finType (perm_finGroupType T)) (@Syl (perm_finGroupType T) (S (S (S O))) A)))) (@mem (Equality.sort nat_eqType) (seq_predType nat_eqType) (@filter nat (@pred_of_simpl nat (@SimplPred nat (fun d : nat => @eq_op nat_eqType (modn d (S (S (S O)))) (S O)))) (divisors (S (S (S (S (S (S (S (S (S (S (S (S O)))))))))))))))), @ex nat (fun p : nat => and3 (is_true (prime p)) (is_true (andb (leq (S (S O)) (partn (@card (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) A))) (nat_pred_of_nat p))) (leq (S (partn (@card (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) A))) (nat_pred_of_nat p))) (@card (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) A)))))) (is_true (@eq_op nat_eqType (@card (group_of_finType (perm_finGroupType T)) (@mem (Finite.sort (group_of_finType (perm_finGroupType T))) (predPredType (Finite.sort (group_of_finType (perm_finGroupType T)))) (@SetDef.pred_of_set (group_of_finType (perm_finGroupType T)) (@Syl (perm_finGroupType T) p A)))) (S O)))) *) (* Goal: is_true (@in_mem nat (@card (group_of_finType (perm_finGroupType T)) (@mem (Finite.sort (group_of_finType (perm_finGroupType T))) (predPredType (Finite.sort (group_of_finType (perm_finGroupType T)))) (@SetDef.pred_of_set (group_of_finType (perm_finGroupType T)) (@Syl (perm_finGroupType T) (S (S (S O))) A)))) (@mem (Equality.sort nat_eqType) (seq_predType nat_eqType) (@filter nat (@pred_of_simpl nat (@SimplPred nat (fun d : nat => @eq_op nat_eqType (modn d (S (S (S O)))) (S O)))) (divisors (S (S (S (S (S (S (S (S (S (S (S (S O)))))))))))))))) *) by rewrite mem_filter -dvdn_divisors //= -oA card_Syl_dvd ?card_Syl_mod. (* Goal: forall _ : is_true (@in_mem nat (@card (group_of_finType (perm_finGroupType T)) (@mem (Finite.sort (group_of_finType (perm_finGroupType T))) (predPredType (Finite.sort (group_of_finType (perm_finGroupType T)))) (@SetDef.pred_of_set (group_of_finType (perm_finGroupType T)) (@Syl (perm_finGroupType T) (S (S (S O))) A)))) (@mem (Equality.sort nat_eqType) (seq_predType nat_eqType) (@filter nat (@pred_of_simpl nat (@SimplPred nat (fun d : nat => @eq_op nat_eqType (modn d (S (S (S O)))) (S O)))) (divisors (S (S (S (S (S (S (S (S (S (S (S (S O)))))))))))))))), @ex nat (fun p : nat => and3 (is_true (prime p)) (is_true (andb (leq (S (S O)) (partn (@card (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) A))) (nat_pred_of_nat p))) (leq (S (partn (@card (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) A))) (nat_pred_of_nat p))) (@card (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) A)))))) (is_true (@eq_op nat_eqType (@card (group_of_finType (perm_finGroupType T)) (@mem (Finite.sort (group_of_finType (perm_finGroupType T))) (predPredType (Finite.sort (group_of_finType (perm_finGroupType T)))) (@SetDef.pred_of_set (group_of_finType (perm_finGroupType T)) (@Syl (perm_finGroupType T) p A)))) (S O)))) *) rewrite /= oA mem_seq2 orbC. (* Goal: forall _ : is_true (orb (@eq_op nat_eqType (@card (group_of_finType (perm_finGroupType T)) (@mem (@group_of (perm_finGroupType T) (Phant (perm_type T))) (predPredType (@group_of (perm_finGroupType T) (Phant (perm_type T)))) (@SetDef.pred_of_set (group_of_finType (perm_finGroupType T)) (@Syl (perm_finGroupType T) (S (S (S O))) A)))) (S (S (S (S O))))) (@eq_op nat_eqType (@card (group_of_finType (perm_finGroupType T)) (@mem (@group_of (perm_finGroupType T) (Phant (perm_type T))) (predPredType (@group_of (perm_finGroupType T) (Phant (perm_type T)))) (@SetDef.pred_of_set (group_of_finType (perm_finGroupType T)) (@Syl (perm_finGroupType T) (S (S (S O))) A)))) (S O))), @ex nat (fun p : nat => and3 (is_true (prime p)) (is_true (andb (leq (S (S O)) (partn (S (S (S (S (S (S (S (S (S (S (S (S O)))))))))))) (nat_pred_of_nat p))) (leq (S (partn (S (S (S (S (S (S (S (S (S (S (S (S O)))))))))))) (nat_pred_of_nat p))) (S (S (S (S (S (S (S (S (S (S (S (S O))))))))))))))) (is_true (@eq_op nat_eqType (@card (group_of_finType (perm_finGroupType T)) (@mem (@group_of (perm_finGroupType T) (Phant (perm_type T))) (predPredType (@group_of (perm_finGroupType T) (Phant (perm_type T)))) (@SetDef.pred_of_set (group_of_finType (perm_finGroupType T)) (@Syl (perm_finGroupType T) p A)))) (S O)))) *) case/predU1P=> [oQ3|]; [exists 2 | exists 3]; split; rewrite ?p_part //. (* Goal: is_true (@eq_op nat_eqType (@card (group_of_finType (perm_finGroupType T)) (@mem (@group_of (perm_finGroupType T) (Phant (perm_type T))) (predPredType (@group_of (perm_finGroupType T) (Phant (perm_type T)))) (@SetDef.pred_of_set (group_of_finType (perm_finGroupType T)) (@Syl (perm_finGroupType T) (S (S O)) A)))) (S O)) *) pose A3 := [set x : {perm T} | #[x] == 3]; suffices oA3: #|A :&: A3| = 8. (* Goal: @eq nat (@card (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) (@setI (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) A A3)))) (S (S (S (S (S (S (S (S O)))))))) *) (* Goal: is_true (@eq_op nat_eqType (@card (group_of_finType (perm_finGroupType T)) (@mem (@group_of (perm_finGroupType T) (Phant (perm_type T))) (predPredType (@group_of (perm_finGroupType T) (Phant (perm_type T)))) (@SetDef.pred_of_set (group_of_finType (perm_finGroupType T)) (@Syl (perm_finGroupType T) (S (S O)) A)))) (S O)) *) have sQ2 P: P \in 'Syl_2(A) -> P :=: A :\: A3. (* Goal: @eq nat (@card (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) (@setI (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) A A3)))) (S (S (S (S (S (S (S (S O)))))))) *) (* Goal: is_true (@eq_op nat_eqType (@card (group_of_finType (perm_finGroupType T)) (@mem (@group_of (perm_finGroupType T) (Phant (perm_type T))) (predPredType (@group_of (perm_finGroupType T) (Phant (perm_type T)))) (@SetDef.pred_of_set (group_of_finType (perm_finGroupType T)) (@Syl (perm_finGroupType T) (S (S O)) A)))) (S O)) *) (* Goal: forall _ : is_true (@in_mem (Finite.sort (group_of_finType (perm_finGroupType T))) P (@mem (Finite.sort (group_of_finType (perm_finGroupType T))) (predPredType (Finite.sort (group_of_finType (perm_finGroupType T)))) (@SetDef.pred_of_set (group_of_finType (perm_finGroupType T)) (@Syl (perm_finGroupType T) (S (S O)) A)))), @eq (@set_of (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T)))))) (@gval (perm_finGroupType T) P) (@setD (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) A A3) *) rewrite inE pHallE oA p_part -natTrecE /= => /andP[sPA /eqP oP]. (* Goal: @eq nat (@card (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) (@setI (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) A A3)))) (S (S (S (S (S (S (S (S O)))))))) *) (* Goal: is_true (@eq_op nat_eqType (@card (group_of_finType (perm_finGroupType T)) (@mem (@group_of (perm_finGroupType T) (Phant (perm_type T))) (predPredType (@group_of (perm_finGroupType T) (Phant (perm_type T)))) (@SetDef.pred_of_set (group_of_finType (perm_finGroupType T)) (@Syl (perm_finGroupType T) (S (S O)) A)))) (S O)) *) (* Goal: @eq (@set_of (FinGroup.arg_finType (perm_baseFinGroupType T)) (Phant (perm_type T))) (@gval (perm_finGroupType T) P) (@setD (FinGroup.arg_finType (perm_baseFinGroupType T)) A A3) *) apply/eqP; rewrite eqEcard -(leq_add2l 8) -{1}oA3 cardsID oA oP. (* Goal: @eq nat (@card (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) (@setI (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) A A3)))) (S (S (S (S (S (S (S (S O)))))))) *) (* Goal: is_true (@eq_op nat_eqType (@card (group_of_finType (perm_finGroupType T)) (@mem (@group_of (perm_finGroupType T) (Phant (perm_type T))) (predPredType (@group_of (perm_finGroupType T) (Phant (perm_type T)))) (@SetDef.pred_of_set (group_of_finType (perm_finGroupType T)) (@Syl (perm_finGroupType T) (S (S O)) A)))) (S O)) *) (* Goal: is_true (andb (@subset (FinGroup.arg_finType (perm_baseFinGroupType T)) (@mem (Finite.sort (FinGroup.arg_finType (perm_baseFinGroupType T))) (predPredType (Finite.sort (FinGroup.arg_finType (perm_baseFinGroupType T)))) (@SetDef.pred_of_set (FinGroup.arg_finType (perm_baseFinGroupType T)) (@gval (perm_finGroupType T) P))) (@mem (Finite.sort (FinGroup.arg_finType (perm_baseFinGroupType T))) (predPredType (Finite.sort (FinGroup.arg_finType (perm_baseFinGroupType T)))) (@SetDef.pred_of_set (FinGroup.arg_finType (perm_baseFinGroupType T)) (@setD (FinGroup.arg_finType (perm_baseFinGroupType T)) A A3)))) (leq (S (S (S (S (S (S (S (S (S (S (S (S O)))))))))))) (addn (S (S (S (S (S (S (S (S O)))))))) (S (S (S (S O))))))) *) rewrite andbT subsetD sPA; apply/exists_inP=> -[x] /= Px. (* Goal: @eq nat (@card (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) (@setI (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) A A3)))) (S (S (S (S (S (S (S (S O)))))))) *) (* Goal: is_true (@eq_op nat_eqType (@card (group_of_finType (perm_finGroupType T)) (@mem (@group_of (perm_finGroupType T) (Phant (perm_type T))) (predPredType (@group_of (perm_finGroupType T) (Phant (perm_type T)))) (@SetDef.pred_of_set (group_of_finType (perm_finGroupType T)) (@Syl (perm_finGroupType T) (S (S O)) A)))) (S O)) *) (* Goal: forall _ : is_true (@in_mem (perm_type T) x (@mem (perm_type T) (predPredType (perm_type T)) (@SetDef.pred_of_set (FinGroup.arg_finType (perm_baseFinGroupType T)) A3))), False *) by rewrite inE => /eqP ox; have:= order_dvdG Px; rewrite oP ox. (* Goal: @eq nat (@card (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) (@setI (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) A A3)))) (S (S (S (S (S (S (S (S O)))))))) *) (* Goal: is_true (@eq_op nat_eqType (@card (group_of_finType (perm_finGroupType T)) (@mem (@group_of (perm_finGroupType T) (Phant (perm_type T))) (predPredType (@group_of (perm_finGroupType T) (Phant (perm_type T)))) (@SetDef.pred_of_set (group_of_finType (perm_finGroupType T)) (@Syl (perm_finGroupType T) (S (S O)) A)))) (S O)) *) have [/= P sylP] := Sylow_exists 2 [group of A]. (* Goal: @eq nat (@card (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) (@setI (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) A A3)))) (S (S (S (S (S (S (S (S O)))))))) *) (* Goal: is_true (@eq_op nat_eqType (@card (group_of_finType (perm_finGroupType T)) (@mem (@group_of (perm_finGroupType T) (Phant (perm_type T))) (predPredType (@group_of (perm_finGroupType T) (Phant (perm_type T)))) (@SetDef.pred_of_set (group_of_finType (perm_finGroupType T)) (@Syl (perm_finGroupType T) (S (S O)) A)))) (S O)) *) rewrite -(([set P] =P 'Syl_2(A)) _) ?cards1 // eqEsubset sub1set inE sylP. (* Goal: @eq nat (@card (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) (@setI (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) A A3)))) (S (S (S (S (S (S (S (S O)))))))) *) (* Goal: is_true (andb true (@subset (group_of_finType (perm_finGroupType T)) (@mem (Finite.sort (group_of_finType (perm_finGroupType T))) (predPredType (Finite.sort (group_of_finType (perm_finGroupType T)))) (@SetDef.pred_of_set (group_of_finType (perm_finGroupType T)) (@Syl (perm_finGroupType T) (S (S O)) A))) (@mem (Finite.sort (group_of_finType (perm_finGroupType T))) (predPredType (Finite.sort (group_of_finType (perm_finGroupType T)))) (@SetDef.pred_of_set (group_of_finType (perm_finGroupType T)) (@set1 (group_of_finType (perm_finGroupType T)) P))))) *) by apply/subsetP=> Q sylQ; rewrite inE -val_eqE /= !sQ2 // inE. (* Goal: @eq nat (@card (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) (@setI (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) A A3)))) (S (S (S (S (S (S (S (S O)))))))) *) rewrite -[8]/(4 * 2)%N -{}oQ3 -sum1_card -sum_nat_const. (* Goal: @eq nat (@BigOp.bigop nat (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T)))) O (index_enum (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T)))) (fun i : Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) => @BigBody nat (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T)))) i addn (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T)))) i (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) (@setI (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) A A3)))) (S O))) (@BigOp.bigop nat (Finite.sort (group_of_finType (perm_finGroupType T))) O (index_enum (group_of_finType (perm_finGroupType T))) (fun i : Finite.sort (group_of_finType (perm_finGroupType T)) => @BigBody nat (Finite.sort (group_of_finType (perm_finGroupType T))) i addn (@in_mem (Finite.sort (group_of_finType (perm_finGroupType T))) i (@mem (Finite.sort (group_of_finType (perm_finGroupType T))) (predPredType (Finite.sort (group_of_finType (perm_finGroupType T)))) (@SetDef.pred_of_set (group_of_finType (perm_finGroupType T)) (@Syl (perm_finGroupType T) (S (S (S O))) A)))) (S (S O)))) *) rewrite (partition_big (fun x => <[x]>%G) (mem 'Syl_3(A))) => [|x]; last first. (* Goal: @eq nat (@BigOp.bigop nat (Finite.sort (group_of_finType (perm_finGroupType T))) O (index_enum (group_of_finType (perm_finGroupType T))) (fun j : Finite.sort (group_of_finType (perm_finGroupType T)) => @BigBody nat (Finite.sort (group_of_finType (perm_finGroupType T))) j (@Monoid.operator nat O (@Monoid.com_operator nat O addn_comoid)) (@pred_of_simpl (Finite.sort (group_of_finType (perm_finGroupType T))) (@pred_of_mem_pred (Finite.sort (group_of_finType (perm_finGroupType T))) (@mem (Finite.sort (group_of_finType (perm_finGroupType T))) (predPredType (Finite.sort (group_of_finType (perm_finGroupType T)))) (@SetDef.pred_of_set (group_of_finType (perm_finGroupType T)) (@Syl (perm_finGroupType T) (S (S (S O))) A)))) j) (@BigOp.bigop nat (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T)))) O (index_enum (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T)))) (fun i : Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) => @BigBody nat (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T)))) i (@Monoid.operator nat O (@Monoid.com_operator nat O addn_comoid)) (andb (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T)))) i (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) (@setI (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) A A3)))) (@eq_op (Finite.eqType (group_of_finType (perm_finGroupType T))) (@cycle_group (perm_finGroupType T) i) j)) (S O))))) (@BigOp.bigop nat (Finite.sort (group_of_finType (perm_finGroupType T))) O (index_enum (group_of_finType (perm_finGroupType T))) (fun i : Finite.sort (group_of_finType (perm_finGroupType T)) => @BigBody nat (Finite.sort (group_of_finType (perm_finGroupType T))) i addn (@in_mem (Finite.sort (group_of_finType (perm_finGroupType T))) i (@mem (Finite.sort (group_of_finType (perm_finGroupType T))) (predPredType (Finite.sort (group_of_finType (perm_finGroupType T)))) (@SetDef.pred_of_set (group_of_finType (perm_finGroupType T)) (@Syl (perm_finGroupType T) (S (S (S O))) A)))) (S (S O)))) *) (* Goal: forall _ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T)))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) (@setI (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) A A3)))), is_true (@pred_of_simpl (Finite.sort (group_of_finType (perm_finGroupType T))) (@pred_of_mem_pred (Finite.sort (group_of_finType (perm_finGroupType T))) (@mem (Finite.sort (group_of_finType (perm_finGroupType T))) (predPredType (Finite.sort (group_of_finType (perm_finGroupType T)))) (@SetDef.pred_of_set (group_of_finType (perm_finGroupType T)) (@Syl (perm_finGroupType T) (S (S (S O))) A)))) (@cycle_group (perm_finGroupType T) x)) *) by case/setIP=> Ax; rewrite /= !inE pHallE p_part cycle_subG Ax oA. (* Goal: @eq nat (@BigOp.bigop nat (Finite.sort (group_of_finType (perm_finGroupType T))) O (index_enum (group_of_finType (perm_finGroupType T))) (fun j : Finite.sort (group_of_finType (perm_finGroupType T)) => @BigBody nat (Finite.sort (group_of_finType (perm_finGroupType T))) j (@Monoid.operator nat O (@Monoid.com_operator nat O addn_comoid)) (@pred_of_simpl (Finite.sort (group_of_finType (perm_finGroupType T))) (@pred_of_mem_pred (Finite.sort (group_of_finType (perm_finGroupType T))) (@mem (Finite.sort (group_of_finType (perm_finGroupType T))) (predPredType (Finite.sort (group_of_finType (perm_finGroupType T)))) (@SetDef.pred_of_set (group_of_finType (perm_finGroupType T)) (@Syl (perm_finGroupType T) (S (S (S O))) A)))) j) (@BigOp.bigop nat (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T)))) O (index_enum (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T)))) (fun i : Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) => @BigBody nat (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T)))) i (@Monoid.operator nat O (@Monoid.com_operator nat O addn_comoid)) (andb (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T)))) i (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) (@setI (FinGroup.arg_finType (FinGroup.base (perm_finGroupType T))) A A3)))) (@eq_op (Finite.eqType (group_of_finType (perm_finGroupType T))) (@cycle_group (perm_finGroupType T) i) j)) (S O))))) (@BigOp.bigop nat (Finite.sort (group_of_finType (perm_finGroupType T))) O (index_enum (group_of_finType (perm_finGroupType T))) (fun i : Finite.sort (group_of_finType (perm_finGroupType T)) => @BigBody nat (Finite.sort (group_of_finType (perm_finGroupType T))) i addn (@in_mem (Finite.sort (group_of_finType (perm_finGroupType T))) i (@mem (Finite.sort (group_of_finType (perm_finGroupType T))) (predPredType (Finite.sort (group_of_finType (perm_finGroupType T)))) (@SetDef.pred_of_set (group_of_finType (perm_finGroupType T)) (@Syl (perm_finGroupType T) (S (S (S O))) A)))) (S (S O)))) *) apply: eq_bigr => Q; rewrite inE /= inE pHallE oA p_part -?natTrecE //=. (* Goal: forall _ : is_true (andb (@subset (FinGroup.arg_finType (perm_baseFinGroupType T)) (@mem (perm_type T) (predPredType (perm_type T)) (@SetDef.pred_of_set (FinGroup.arg_finType (perm_baseFinGroupType T)) (@gval (perm_finGroupType T) Q))) (@mem (perm_type T) (predPredType (perm_type T)) (@SetDef.pred_of_set (FinGroup.arg_finType (perm_baseFinGroupType T)) (@Alt T (Phant (Finite.sort T)))))) (@eq_op nat_eqType (@card (FinGroup.arg_finType (perm_baseFinGroupType T)) (@mem (perm_type T) (predPredType (perm_type T)) (@SetDef.pred_of_set (FinGroup.arg_finType (perm_baseFinGroupType T)) (@gval (perm_finGroupType T) Q)))) (S (S (S O))))), @eq nat (@BigOp.bigop nat (perm_type T) O (index_enum (FinGroup.arg_finType (perm_baseFinGroupType T))) (fun i : perm_type T => @BigBody nat (perm_type T) i addn (andb (@in_mem (perm_type T) i (@mem (perm_type T) (predPredType (perm_type T)) (@SetDef.pred_of_set (FinGroup.arg_finType (perm_baseFinGroupType T)) (@setI (FinGroup.arg_finType (perm_baseFinGroupType T)) A A3)))) (@eq_op (Finite.eqType (group_of_finType (perm_finGroupType T))) (@cycle_group (perm_finGroupType T) i) Q)) (S O))) (S (S O)) *) case/andP=> sQA /eqP oQ; have:= oQ. (* Goal: forall _ : @eq (Equality.sort nat_eqType) (@card (FinGroup.arg_finType (perm_baseFinGroupType T)) (@mem (perm_type T) (predPredType (perm_type T)) (@SetDef.pred_of_set (FinGroup.arg_finType (perm_baseFinGroupType T)) (@gval (perm_finGroupType T) Q)))) (S (S (S O))), @eq nat (@BigOp.bigop nat (perm_type T) O (index_enum (FinGroup.arg_finType (perm_baseFinGroupType T))) (fun i : perm_type T => @BigBody nat (perm_type T) i addn (andb (@in_mem (perm_type T) i (@mem (perm_type T) (predPredType (perm_type T)) (@SetDef.pred_of_set (FinGroup.arg_finType (perm_baseFinGroupType T)) (@setI (FinGroup.arg_finType (perm_baseFinGroupType T)) A A3)))) (@eq_op (Finite.eqType (group_of_finType (perm_finGroupType T))) (@cycle_group (perm_finGroupType T) i) Q)) (S O))) (S (S O)) *) rewrite (cardsD1 1) group1 -sum1_card => [[/= <-]]; apply: eq_bigl => x. (* Goal: @eq bool (andb (@in_mem (perm_type T) x (@mem (perm_type T) (predPredType (perm_type T)) (@SetDef.pred_of_set (FinGroup.arg_finType (perm_baseFinGroupType T)) (@setI (FinGroup.arg_finType (perm_baseFinGroupType T)) A A3)))) (@eq_op (Finite.eqType (group_of_finType (perm_finGroupType T))) (@cycle_group (perm_finGroupType T) x) Q)) (@in_mem (perm_type T) x (@mem (perm_type T) (predPredType (perm_type T)) (@SetDef.pred_of_set (FinGroup.finType (perm_baseFinGroupType T)) (@setD (FinGroup.finType (perm_baseFinGroupType T)) (@gval (perm_finGroupType T) Q) (@set1 (FinGroup.finType (perm_baseFinGroupType T)) (oneg (perm_baseFinGroupType T))))))) *) rewrite setIC -val_eqE /= 2!inE in_setD1 -andbA -{4}[x]expg1 -order_dvdn dvdn1. (* Goal: @eq bool (andb (@eq_op nat_eqType (@order (perm_of_finGroupType T) x) (S (S (S O)))) (andb (@in_mem (Finite.sort (FinGroup.arg_finType (perm_baseFinGroupType T))) x (@mem (Finite.sort (FinGroup.arg_finType (perm_baseFinGroupType T))) (predPredType (Finite.sort (FinGroup.arg_finType (perm_baseFinGroupType T)))) (@SetDef.pred_of_set (FinGroup.arg_finType (perm_baseFinGroupType T)) A))) (@eq_op (group_set_eqType (perm_baseFinGroupType T)) (@cycle (perm_finGroupType T) x) (@gval (perm_finGroupType T) Q)))) (andb (negb (@eq_op nat_eqType (@order (perm_finGroupType T) x) (S O))) (@in_mem (Finite.sort (perm_finType T)) x (@mem (Finite.sort (perm_finType T)) (predPredType (Finite.sort (perm_finType T))) (@SetDef.pred_of_set (perm_finType T) (@gval (perm_finGroupType T) Q))))) *) apply/and3P/andP=> [[/eqP-> _ /eqP <-] | [ntx Qx]]; first by rewrite cycle_id. (* Goal: and3 (is_true (@eq_op nat_eqType (@order (perm_of_finGroupType T) x) (S (S (S O))))) (is_true (@in_mem (Finite.sort (FinGroup.arg_finType (perm_baseFinGroupType T))) x (@mem (Finite.sort (FinGroup.arg_finType (perm_baseFinGroupType T))) (predPredType (Finite.sort (FinGroup.arg_finType (perm_baseFinGroupType T)))) (@SetDef.pred_of_set (FinGroup.arg_finType (perm_baseFinGroupType T)) A)))) (is_true (@eq_op (group_set_eqType (perm_baseFinGroupType T)) (@cycle (perm_finGroupType T) x) (@gval (perm_finGroupType T) Q))) *) have:= order_dvdG Qx; rewrite oQ dvdn_divisors // mem_seq2 (negPf ntx) /=. (* Goal: forall _ : is_true (@eq_op nat_eqType (@order (perm_finGroupType T) x) (S (S (S O)))), and3 (is_true (@eq_op nat_eqType (@order (perm_of_finGroupType T) x) (S (S (S O))))) (is_true (@in_mem (perm_type T) x (@mem (perm_type T) (predPredType (perm_type T)) (@SetDef.pred_of_set (FinGroup.arg_finType (perm_baseFinGroupType T)) A)))) (is_true (@eq_op (group_set_eqType (perm_baseFinGroupType T)) (@cycle (perm_finGroupType T) x) (@gval (perm_finGroupType T) Q))) *) by rewrite eqEcard cycle_subG Qx (subsetP sQA) // oQ /order => /eqP->. Qed. Lemma simple_Alt5_base (T : finType) : #|T| = 5 -> simple 'Alt_T. Section Restrict. Variables (T : finType) (x : T). Notation T' := {y | y != x}. Lemma rfd_funP (p : {perm T}) (u : T') : let p1 := if p x == x then p else 1 in p1 (val u) != x. Proof. (* Goal: is_true (let p1 := if @eq_op (Finite.eqType T) (@PermDef.fun_of_perm T p x) x then p else oneg (perm_of_baseFinGroupType T) in negb (@eq_op (Finite.eqType T) (@PermDef.fun_of_perm T p1 (@val (Equality.sort (Finite.eqType T)) (fun x0 : Equality.sort (Finite.eqType T) => (fun y : Equality.sort (Finite.eqType T) => negb (@eq_op (Finite.eqType T) y x)) x0) (@sig_subType (Equality.sort (Finite.eqType T)) (fun y : Equality.sort (Finite.eqType T) => negb (@eq_op (Finite.eqType T) y x))) u)) x)) *) case: (p x =P x) => /= [pxx | _]; last by rewrite perm1 (valP u). (* Goal: is_true (negb (@eq_op (Finite.eqType T) (@PermDef.fun_of_perm T p (@proj1_sig (Finite.sort T) (fun x0 : Finite.sort T => is_true (negb (@eq_op (Finite.eqType T) x0 x))) u)) x)) *) by rewrite -[x in _ != x]pxx (inj_eq perm_inj); apply: (valP u). Qed. Definition rfd_fun p := [fun u => Sub ((_ : {perm T}) _) (rfd_funP p u) : T']. Lemma rfdP p : injective (rfd_fun p). Proof. (* Goal: @injective (@sig (Equality.sort (Finite.eqType T)) (fun y : Equality.sort (Finite.eqType T) => is_true (negb (@eq_op (Finite.eqType T) y x)))) (@sig (Equality.sort (Finite.eqType T)) (fun y : Equality.sort (Finite.eqType T) => is_true (negb (@eq_op (Finite.eqType T) y x)))) (@fun_of_simpl (@sig (Equality.sort (Finite.eqType T)) (fun y : Equality.sort (Finite.eqType T) => is_true (negb (@eq_op (Finite.eqType T) y x)))) (@sig (Equality.sort (Finite.eqType T)) (fun y : Equality.sort (Finite.eqType T) => is_true (negb (@eq_op (Finite.eqType T) y x)))) (rfd_fun p)) *) apply: can_inj (rfd_fun p^-1) _ => u; apply: val_inj => /=. (* Goal: @eq (Finite.sort T) (@PermDef.fun_of_perm T (if @eq_op (Finite.eqType T) (@PermDef.fun_of_perm T (@invg (perm_of_baseFinGroupType T) p) x) x then @invg (perm_of_baseFinGroupType T) p else oneg (perm_of_baseFinGroupType T)) (@PermDef.fun_of_perm T (if @eq_op (Finite.eqType T) (@PermDef.fun_of_perm T p x) x then p else oneg (perm_of_baseFinGroupType T)) (@proj1_sig (Finite.sort T) (fun x0 : Finite.sort T => is_true (negb (@eq_op (Finite.eqType T) x0 x))) u))) (@proj1_sig (Finite.sort T) (fun x0 : Finite.sort T => is_true (negb (@eq_op (Finite.eqType T) x0 x))) u) *) rewrite -(can_eq (permK p)) permKV eq_sym. (* Goal: @eq (Finite.sort T) (@PermDef.fun_of_perm T (if @eq_op (Finite.eqType T) (@PermDef.fun_of_perm T p x) x then @invg (perm_of_baseFinGroupType T) p else oneg (perm_of_baseFinGroupType T)) (@PermDef.fun_of_perm T (if @eq_op (Finite.eqType T) (@PermDef.fun_of_perm T p x) x then p else oneg (perm_of_baseFinGroupType T)) (@proj1_sig (Finite.sort T) (fun x0 : Finite.sort T => is_true (negb (@eq_op (Finite.eqType T) x0 x))) u))) (@proj1_sig (Finite.sort T) (fun x0 : Finite.sort T => is_true (negb (@eq_op (Finite.eqType T) x0 x))) u) *) by case: eqP => _; rewrite !(perm1, permK). Qed. Definition rfd p := perm (@rfdP p). Hypothesis card_T : 2 < #|T|. Lemma rfd_morph : {in 'C_('Sym_T)[x | 'P] &, {morph rfd : y z / y * z}}. Canonical rfd_morphism := Morphism rfd_morph. Definition rgd_fun (p : {perm T'}) := [fun x1 => if insub x1 is Some u then sval (p u) else x]. Lemma rgdP p : injective (rgd_fun p). Proof. (* Goal: @injective (Finite.sort T) (choice.Choice.sort (Finite.choiceType T)) (@fun_of_simpl (choice.Choice.sort (Finite.choiceType T)) (Finite.sort T) (rgd_fun p)) *) apply: can_inj (rgd_fun p^-1) _ => y /=. (* Goal: @eq (Finite.sort T) match @insub (Finite.sort T) (fun x0 : Finite.sort T => negb (@eq_op (Finite.eqType T) x0 x)) (@sig_subType (Finite.sort T) (fun y : Finite.sort T => negb (@eq_op (Finite.eqType T) y x))) match @insub (Finite.sort T) (fun x0 : Finite.sort T => negb (@eq_op (Finite.eqType T) x0 x)) (@sig_subType (Finite.sort T) (fun y : Finite.sort T => negb (@eq_op (Finite.eqType T) y x))) y with | Some u => @proj1_sig (Finite.sort T) (fun x0 : Finite.sort T => is_true (negb (@eq_op (Finite.eqType T) x0 x))) (@PermDef.fun_of_perm (@sig_finType T (fun y : Finite.sort T => negb (@eq_op (Finite.eqType T) y x))) p u) | None => x end with | Some u => @proj1_sig (Finite.sort T) (fun x0 : Finite.sort T => is_true (negb (@eq_op (Finite.eqType T) x0 x))) (@PermDef.fun_of_perm (@sig_finType T (fun y : Finite.sort T => negb (@eq_op (Finite.eqType T) y x))) (@invg (perm_of_baseFinGroupType (@sig_finType T (fun y : Finite.sort T => negb (@eq_op (Finite.eqType T) y x)))) p) u) | None => x end y *) case: (insubP _ y) => [u _ val_u|]; first by rewrite valK permK. (* Goal: forall _ : is_true (negb (negb (@eq_op (Finite.eqType T) y x))), @eq (Finite.sort T) match @insub (Finite.sort T) (fun x0 : Finite.sort T => negb (@eq_op (Finite.eqType T) x0 x)) (@sig_subType (Finite.sort T) (fun y : Finite.sort T => negb (@eq_op (Finite.eqType T) y x))) x with | Some u => @proj1_sig (Finite.sort T) (fun x0 : Finite.sort T => is_true (negb (@eq_op (Finite.eqType T) x0 x))) (@PermDef.fun_of_perm (@sig_finType T (fun y : Finite.sort T => negb (@eq_op (Finite.eqType T) y x))) (@invg (perm_of_baseFinGroupType (@sig_finType T (fun y : Finite.sort T => negb (@eq_op (Finite.eqType T) y x)))) p) u) | None => x end y *) by rewrite negbK; move/eqP->; rewrite insubF //= eqxx. Qed. Definition rgd p := perm (@rgdP p). Lemma rfd_odd (p : {perm T}) : p x = x -> rfd p = p :> bool. Lemma rfd_iso : 'C_('Alt_T)[x | 'P] \isog 'Alt_T'. End Restrict. Lemma simple_Alt5 (T : finType) : #|T| >= 5 -> simple 'Alt_T.
Require Export Numerals. Section factorization. Variable A : Set. Variable BASE : BT. Let b := base BASE. Let Num := num BASE. Let Digit := digit BASE. Let Tl := tl Digit. Let Cons := cons Digit. Let Nil := nil Digit. Let Val_bound := val_bound BASE. Section Definitions_for_Relations. Definition Diveucl (a b q r : nat) : Prop := a = b * q + r /\ r < b. Definition Zero : inf 1 := Val_bound 0 Nil. Variable R : forall n : nat, A -> inf n -> inf n -> A -> Prop. Definition factorizable : Prop := forall (m n : nat) (q q' : inf m) (r r' : inf n) (a a1 a' : A) (x x' : inf (m * n)), Diveucl (val_inf (m * n) x) n (val_inf m q) (val_inf n r) -> Diveucl (val_inf (m * n) x') n (val_inf m q') (val_inf n r') -> R m a q q' a1 -> R n a1 r r' a' -> R (m * n) a x x' a'. Definition proper : Prop := forall a : A, R 1 a Zero Zero a. End Definitions_for_Relations. Section Three_inputs. 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. Lemma prop_Rel : proper R -> forall (X Y : Num 0) (a : A), R 1 a (Val_bound 0 X) (Val_bound 0 Y) a. Proof. (* Goal: forall (_ : proper R) (X Y : Num O) (a : A), R (S O) a (Val_bound O X) (Val_bound O Y) a *) intros P X Y a. (* Goal: R (S O) a (Val_bound O X) (Val_bound O Y) a *) replace X with (nil (digit BASE)); auto with arith. (* Goal: R (S O) a (Val_bound O (nil (digit BASE))) (Val_bound O Y) a *) replace Y with (nil (digit BASE)); auto with arith. Qed. Lemma fact_Rel : factorizable R -> forall (n : nat) (X Y : Num (S n)) (a a' : 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)) a' -> R (exp b (S n)) a (Val_bound (S n) X) (Val_bound (S n) Y) a'. Proof. (* Goal: forall (_ : factorizable R) (n : nat) (X Y : Num (S n)) (a a' : 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)) a'), R (exp b (S n)) a (Val_bound (S n) X) (Val_bound (S n) Y) a' *) intros F n X Y a a' H. (* Goal: R (exp b (S n)) a (Val_bound (S n) X) (Val_bound (S n) Y) a' *) simpl in |- *. (* Goal: R (Init.Nat.mul b (exp b n)) a (Val_bound (S n) X) (Val_bound (S n) Y) a' *) generalize (non_empty (inf b) n X). (* Goal: forall _ : @sigT (inf b) (fun a : inf b => @sig (list (inf b) n) (fun t : list (inf b) n => @eq (list (inf b) (S n)) X (cons (inf b) n a t))), R (Init.Nat.mul b (exp b n)) a (Val_bound (S n) X) (Val_bound (S n) Y) a' *) generalize (non_empty (inf b) n Y). (* Goal: forall (_ : @sigT (inf b) (fun a : inf b => @sig (list (inf b) n) (fun t : list (inf b) n => @eq (list (inf b) (S n)) Y (cons (inf b) n a t)))) (_ : @sigT (inf b) (fun a : inf b => @sig (list (inf b) n) (fun t : list (inf b) n => @eq (list (inf b) (S n)) X (cons (inf b) n a t)))), R (Init.Nat.mul b (exp b n)) a (Val_bound (S n) X) (Val_bound (S n) Y) a' *) intros H1 H2. (* Goal: R (Init.Nat.mul b (exp b n)) a (Val_bound (S n) X) (Val_bound (S n) Y) a' *) elim H1; elim H2; clear H1 H2. (* Goal: forall (x : inf b) (_ : @sig (list (inf b) n) (fun t : list (inf b) n => @eq (list (inf b) (S n)) X (cons (inf b) n x t))) (x0 : inf b) (_ : @sig (list (inf b) n) (fun t : list (inf b) n => @eq (list (inf b) (S n)) Y (cons (inf b) n x0 t))), R (Init.Nat.mul b (exp b n)) a (Val_bound (S n) X) (Val_bound (S n) Y) a' *) intros d D d' D'. (* Goal: R (Init.Nat.mul b (exp b n)) a (Val_bound (S n) X) (Val_bound (S n) Y) a' *) elim D; elim D'; clear D D'. (* Goal: forall (x : list (inf b) n) (_ : @eq (list (inf b) (S n)) Y (cons (inf b) n d' x)) (x0 : list (inf b) n) (_ : @eq (list (inf b) (S n)) X (cons (inf b) n d x0)), R (Init.Nat.mul b (exp b n)) a (Val_bound (S n) X) (Val_bound (S n) Y) a' *) intros D' HD' D HD. (* Goal: R (Init.Nat.mul b (exp b n)) a (Val_bound (S n) X) (Val_bound (S n) Y) a' *) rewrite HD; rewrite HD'. (* Goal: R (Init.Nat.mul b (exp b n)) a (Val_bound (S n) (cons (inf b) n d D)) (Val_bound (S n) (cons (inf b) n d' D')) a' *) apply F with d d' (Val_bound n (Tl (S n) X)) (Val_bound n (Tl (S n) Y)) (FR b a (Hd Digit n X) (Hd Digit n Y)). (* Goal: R (exp (base BASE) 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)) a' *) (* Goal: R b a d d' (FR b a (Hd Digit n X) (Hd Digit n Y)) *) (* Goal: Diveucl (val_inf (Init.Nat.mul b (exp (base BASE) n)) (Val_bound (S n) (cons (inf b) n d' D'))) (exp (base BASE) n) (val_inf b d') (val_inf (exp (base BASE) n) (Val_bound n (Tl (S n) Y))) *) (* Goal: Diveucl (val_inf (Init.Nat.mul b (exp (base BASE) n)) (Val_bound (S n) (cons (inf b) n d D))) (exp (base BASE) n) (val_inf b d) (val_inf (exp (base BASE) n) (Val_bound n (Tl (S n) X))) *) unfold Diveucl in |- *; split; simpl in |- *. (* Goal: R (exp (base BASE) 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)) a' *) (* Goal: R b a d d' (FR b a (Hd Digit n X) (Hd Digit n Y)) *) (* Goal: Diveucl (val_inf (Init.Nat.mul b (exp (base BASE) n)) (Val_bound (S n) (cons (inf b) n d' D'))) (exp (base BASE) n) (val_inf b d') (val_inf (exp (base BASE) n) (Val_bound n (Tl (S n) Y))) *) (* Goal: lt (Val BASE n (Tl (S n) X)) (exp (base BASE) n) *) (* Goal: @eq nat (Init.Nat.add (Init.Nat.mul (val BASE d) (exp (base BASE) n)) (Val BASE n D)) (Init.Nat.add (Init.Nat.mul (exp (base BASE) n) (val_inf b d)) (Val BASE n (Tl (S n) X))) *) rewrite HD; simpl in |- *. (* Goal: R (exp (base BASE) 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)) a' *) (* Goal: R b a d d' (FR b a (Hd Digit n X) (Hd Digit n Y)) *) (* Goal: Diveucl (val_inf (Init.Nat.mul b (exp (base BASE) n)) (Val_bound (S n) (cons (inf b) n d' D'))) (exp (base BASE) n) (val_inf b d') (val_inf (exp (base BASE) n) (Val_bound n (Tl (S n) Y))) *) (* Goal: lt (Val BASE n (Tl (S n) X)) (exp (base BASE) n) *) (* Goal: @eq nat (Init.Nat.add (Init.Nat.mul (val BASE d) (exp (base BASE) n)) (Val BASE n D)) (Init.Nat.add (Init.Nat.mul (exp (base BASE) n) (val_inf b d)) (Val BASE n D)) *) elim (mult_comm (val_inf b d) (exp b n)); auto with arith. (* Goal: R (exp (base BASE) 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)) a' *) (* Goal: R b a d d' (FR b a (Hd Digit n X) (Hd Digit n Y)) *) (* Goal: Diveucl (val_inf (Init.Nat.mul b (exp (base BASE) n)) (Val_bound (S n) (cons (inf b) n d' D'))) (exp (base BASE) n) (val_inf b d') (val_inf (exp (base BASE) n) (Val_bound n (Tl (S n) Y))) *) (* Goal: lt (Val BASE n (Tl (S n) X)) (exp (base BASE) n) *) rewrite HD; simpl in |- *. (* Goal: R (exp (base BASE) 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)) a' *) (* Goal: R b a d d' (FR b a (Hd Digit n X) (Hd Digit n Y)) *) (* Goal: Diveucl (val_inf (Init.Nat.mul b (exp (base BASE) n)) (Val_bound (S n) (cons (inf b) n d' D'))) (exp (base BASE) n) (val_inf b d') (val_inf (exp (base BASE) n) (Val_bound n (Tl (S n) Y))) *) (* Goal: lt (Val BASE n D) (exp (base BASE) n) *) unfold b in |- *; apply upper_bound. (* Goal: R (exp (base BASE) 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)) a' *) (* Goal: R b a d d' (FR b a (Hd Digit n X) (Hd Digit n Y)) *) (* Goal: Diveucl (val_inf (Init.Nat.mul b (exp (base BASE) n)) (Val_bound (S n) (cons (inf b) n d' D'))) (exp (base BASE) n) (val_inf b d') (val_inf (exp (base BASE) n) (Val_bound n (Tl (S n) Y))) *) unfold Diveucl in |- *; split; simpl in |- *. (* Goal: R (exp (base BASE) 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)) a' *) (* Goal: R b a d d' (FR b a (Hd Digit n X) (Hd Digit n Y)) *) (* Goal: lt (Val BASE n (Tl (S n) Y)) (exp (base BASE) n) *) (* Goal: @eq nat (Init.Nat.add (Init.Nat.mul (val BASE d') (exp (base BASE) n)) (Val BASE n D')) (Init.Nat.add (Init.Nat.mul (exp (base BASE) n) (val_inf b d')) (Val BASE n (Tl (S n) Y))) *) rewrite HD'; simpl in |- *. (* Goal: R (exp (base BASE) 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)) a' *) (* Goal: R b a d d' (FR b a (Hd Digit n X) (Hd Digit n Y)) *) (* Goal: lt (Val BASE n (Tl (S n) Y)) (exp (base BASE) n) *) (* Goal: @eq nat (Init.Nat.add (Init.Nat.mul (val BASE d') (exp (base BASE) n)) (Val BASE n D')) (Init.Nat.add (Init.Nat.mul (exp (base BASE) n) (val_inf b d')) (Val BASE n D')) *) elim (mult_comm (val_inf b d') (exp b n)); auto with arith. (* Goal: R (exp (base BASE) 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)) a' *) (* Goal: R b a d d' (FR b a (Hd Digit n X) (Hd Digit n Y)) *) (* Goal: lt (Val BASE n (Tl (S n) Y)) (exp (base BASE) n) *) rewrite HD'; simpl in |- *. (* Goal: R (exp (base BASE) 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)) a' *) (* Goal: R b a d d' (FR b a (Hd Digit n X) (Hd Digit n Y)) *) (* Goal: lt (Val BASE n D') (exp (base BASE) n) *) unfold b in |- *; apply upper_bound. (* Goal: R (exp (base BASE) 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)) a' *) (* Goal: R b a d d' (FR b a (Hd Digit n X) (Hd Digit n Y)) *) unfold R in |- *. (* Goal: R (exp (base BASE) 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)) a' *) (* Goal: @eq A (FR b a (Hd Digit n X) (Hd Digit n Y)) (FR b a d d') *) rewrite HD; rewrite HD'. (* Goal: R (exp (base BASE) 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)) a' *) (* Goal: @eq A (FR b a (Hd Digit n (cons (inf b) n d D)) (Hd Digit n (cons (inf b) n d' D'))) (FR b a d d') *) rewrite Non_empty_Hd; rewrite Non_empty_Hd; auto with arith. (* Goal: R (exp (base BASE) 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)) a' *) try trivial with arith. Qed. End Three_inputs. End factorization.
Require Export GeoCoq.Elements.OriginalProofs.lemma_squarerectangle. Section Euclid. Context `{Ax:area}. Lemma proposition_48A : forall A B C D a b c d, SQ A B C D -> SQ a b c d -> EF A B C D a b c d -> Cong A B a b. Proof. (* Goal: forall (A B C D a b c d : @Point Ax0) (_ : @SQ Ax0 A B C D) (_ : @SQ Ax0 a b c d) (_ : @EF Ax0 Ax1 Ax2 Ax A B C D a b c d), @Cong Ax0 A B a b *) intros. (* Goal: @Cong Ax0 A B a b *) assert (PG A B C D) by (conclude lemma_squareparallelogram). (* Goal: @Cong Ax0 A B a b *) assert (PG a b c d) by (conclude lemma_squareparallelogram). (* Goal: @Cong Ax0 A B a b *) assert (Cong_3 B A D D C B) by (conclude proposition_34). (* Goal: @Cong Ax0 A B a b *) assert (Cong_3 b a d d c b) by (conclude proposition_34). (* Goal: @Cong Ax0 A B a b *) assert (ET B A D D C B) by (conclude axiom_congruentequal). (* Goal: @Cong Ax0 A B a b *) assert (ET b a d d c b) by (conclude axiom_congruentequal). (* Goal: @Cong Ax0 A B a b *) assert (ET B A D B D C) by (forward_using axiom_ETpermutation). (* Goal: @Cong Ax0 A B a b *) assert (ET B D C B A D) by (conclude axiom_ETsymmetric). (* Goal: @Cong Ax0 A B a b *) assert (ET B D C A B D) by (forward_using axiom_ETpermutation). (* Goal: @Cong Ax0 A B a b *) assert (ET A B D B D C) by (conclude axiom_ETsymmetric). (* Goal: @Cong Ax0 A B a b *) assert (ET b a d b d c) by (forward_using axiom_ETpermutation). (* Goal: @Cong Ax0 A B a b *) assert (ET b d c b a d) by (conclude axiom_ETsymmetric). (* Goal: @Cong Ax0 A B a b *) assert (ET b d c a b d) by (forward_using axiom_ETpermutation). (* Goal: @Cong Ax0 A B a b *) assert (ET a b d b d c) by (conclude axiom_ETsymmetric). (* Goal: @Cong Ax0 A B a b *) assert (RE A B C D) by (conclude lemma_squarerectangle). (* Goal: @Cong Ax0 A B a b *) assert (RE a b c d) by (conclude lemma_squarerectangle). (* Goal: @Cong Ax0 A B a b *) assert (CR A C B D) by (conclude_def RE ). (* Goal: @Cong Ax0 A B a b *) assert (CR a c b d) by (conclude_def RE ). (* Goal: @Cong Ax0 A B a b *) assert (Par A B C D) by (conclude_def PG ). (* Goal: @Cong Ax0 A B a b *) assert (nCol A B D) by (forward_using lemma_parallelNC). (* Goal: @Cong Ax0 A B a b *) assert (Par a b c d) by (conclude_def PG ). (* Goal: @Cong Ax0 A B a b *) assert (nCol a b d) by (forward_using lemma_parallelNC). (* Goal: @Cong Ax0 A B a b *) assert (TS A B D C) by (forward_using lemma_crossimpliesopposite). (* Goal: @Cong Ax0 A B a b *) assert (TS a b d c) by (forward_using lemma_crossimpliesopposite). (* Goal: @Cong Ax0 A B a b *) assert (ET A B D a b d) by (conclude axiom_halvesofequals). (* Goal: @Cong Ax0 A B a b *) assert (Cong a b d a) by (conclude_def SQ ). (* Goal: @Cong Ax0 A B a b *) assert (Cong A B D A) by (conclude_def SQ ). (* Goal: @Cong Ax0 A B a b *) assert (Cong a b a d) by (forward_using lemma_congruenceflip). (* Goal: @Cong Ax0 A B a b *) assert (Cong A B A D) by (forward_using lemma_congruenceflip). (* Goal: @Cong Ax0 A B a b *) assert (~ Lt a b A B). (* Goal: @Cong Ax0 A B a b *) (* Goal: not (@Lt Ax0 a b A B) *) { (* Goal: not (@Lt Ax0 a b A B) *) intro. (* Goal: False *) let Tf:=fresh in assert (Tf:exists E, (BetS A E B /\ Cong A E a b)) by (conclude_def Lt );destruct Tf as [E];spliter. (* Goal: False *) assert (Lt a d A B) by (conclude lemma_lessthancongruence2). (* Goal: False *) assert (Lt a d A D) by (conclude lemma_lessthancongruence). (* Goal: False *) let Tf:=fresh in assert (Tf:exists F, (BetS A F D /\ Cong A F a d)) by (conclude_def Lt );destruct Tf as [F];spliter. (* Goal: False *) assert (Per D A B) by (conclude_def SQ ). (* Goal: False *) assert (Per d a b) by (conclude_def SQ ). (* Goal: False *) assert (neq A D) by (forward_using lemma_betweennotequal). (* Goal: False *) assert (neq A B) by (forward_using lemma_betweennotequal). (* Goal: False *) assert (Out A D F) by (conclude lemma_ray4). (* Goal: False *) assert (Out A B E) by (conclude lemma_ray4). (* Goal: False *) assert (nCol D A B) by (forward_using lemma_NCorder). (* Goal: False *) assert (CongA D A B D A B) by (conclude lemma_equalanglesreflexive). (* Goal: False *) assert (CongA D A B F A E) by (conclude lemma_equalangleshelper). (* Goal: False *) assert (CongA F A E D A B) by (conclude lemma_equalanglessymmetric). (* Goal: False *) assert (Per F A E) by (conclude lemma_equaltorightisright). (* Goal: False *) assert (CongA F A E d a b) by (conclude lemma_Euclid4). (* Goal: False *) assert (Cong F E d b) by (conclude proposition_04). (* Goal: False *) assert (Cong F A d a) by (forward_using lemma_congruenceflip). (* Goal: False *) assert (Cong_3 F A E d a b) by (conclude_def Cong_3 ). (* Goal: False *) assert (ET F A E d a b) by (conclude axiom_congruentequal). (* Goal: False *) assert (ET F A E a b d) by (forward_using axiom_ETpermutation). (* Goal: False *) assert (ET a b d A B D) by (conclude axiom_ETsymmetric). (* Goal: False *) assert (ET F A E A B D) by (conclude axiom_ETtransitive). (* Goal: False *) assert (ET F A E D A B) by (forward_using axiom_ETpermutation). (* Goal: False *) assert (ET D A B F A E) by (conclude axiom_ETsymmetric). (* Goal: False *) assert (Triangle D A B) by (conclude_def Triangle ). (* Goal: False *) assert (~ ET D A B F A E) by (conclude axiom_deZolt2). (* Goal: False *) contradict. (* BG Goal: @Cong Ax0 A B a b *) } (* Goal: @Cong Ax0 A B a b *) assert (~ Lt A B a b). (* Goal: @Cong Ax0 A B a b *) (* Goal: not (@Lt Ax0 A B a b) *) { (* Goal: not (@Lt Ax0 A B a b) *) intro. (* Goal: False *) let Tf:=fresh in assert (Tf:exists e, (BetS a e b /\ Cong a e A B)) by (conclude_def Lt );destruct Tf as [e];spliter. (* Goal: False *) assert (Lt A D a b) by (conclude lemma_lessthancongruence2). (* Goal: False *) assert (Lt A D a d) by (conclude lemma_lessthancongruence). (* Goal: False *) let Tf:=fresh in assert (Tf:exists f, (BetS a f d /\ Cong a f A D)) by (conclude_def Lt );destruct Tf as [f];spliter. (* Goal: False *) assert (Per d a b) by (conclude_def SQ ). (* Goal: False *) assert (Per D A B) by (conclude_def SQ ). (* Goal: False *) assert (neq a d) by (forward_using lemma_betweennotequal). (* Goal: False *) assert (neq a b) by (forward_using lemma_betweennotequal). (* Goal: False *) assert (Out a d f) by (conclude lemma_ray4). (* Goal: False *) assert (Out a b e) by (conclude lemma_ray4). (* Goal: False *) assert (nCol d a b) by (forward_using lemma_NCorder). (* Goal: False *) assert (CongA d a b d a b) by (conclude lemma_equalanglesreflexive). (* Goal: False *) assert (CongA d a b f a e) by (conclude lemma_equalangleshelper). (* Goal: False *) assert (CongA f a e d a b) by (conclude lemma_equalanglessymmetric). (* Goal: False *) assert (Per f a e) by (conclude lemma_equaltorightisright). (* Goal: False *) assert (CongA f a e D A B) by (conclude lemma_Euclid4). (* Goal: False *) assert (Cong f e D B) by (conclude proposition_04). (* Goal: False *) assert (Cong f a D A) by (forward_using lemma_congruenceflip). (* Goal: False *) assert (Cong_3 f a e D A B) by (conclude_def Cong_3 ). (* Goal: False *) assert (ET f a e D A B) by (conclude axiom_congruentequal). (* Goal: False *) assert (ET f a e A B D) by (forward_using axiom_ETpermutation). (* Goal: False *) assert (ET A B D f a e) by (conclude axiom_ETsymmetric). (* Goal: False *) assert (ET f a e a b d) by (conclude axiom_ETtransitive). (* Goal: False *) assert (ET f a e d a b) by (forward_using axiom_ETpermutation). (* Goal: False *) assert (ET d a b f a e) by (conclude axiom_ETsymmetric). (* Goal: False *) assert (Triangle d a b) by (conclude_def Triangle ). (* Goal: False *) assert (~ ET d a b f a e) by (conclude axiom_deZolt2). (* Goal: False *) contradict. (* BG Goal: @Cong Ax0 A B a b *) } (* Goal: @Cong Ax0 A B a b *) assert (neq A B) by (forward_using lemma_NCdistinct). (* Goal: @Cong Ax0 A B a b *) assert (neq a b) by (forward_using lemma_NCdistinct). (* Goal: @Cong Ax0 A B a b *) assert (Cong A B a b) by (conclude lemma_trichotomy1). (* Goal: @Cong Ax0 A B a b *) close. Qed. End Euclid.
Require Import securite. Lemma POinvprel6 : forall (l l0 : list C) (k k0 k1 k2 : K) (c c0 c1 c2 : C) (d d0 d1 d2 d3 d4 d5 d6 d7 d8 d9 d10 d11 d12 d13 d14 d15 d16 d17 d18 d19 d20 : D), inv0 (ABSI (MBNaKab d7 d8 d9 k0) (MANbKabCaCb d4 d5 d6 k c c0) (MABNaNbKeyK d d0 d1 d2 d3) l) -> inv1 (ABSI (MBNaKab d7 d8 d9 k0) (MANbKabCaCb d4 d5 d6 k c c0) (MABNaNbKeyK d d0 d1 d2 d3) l) -> invP (ABSI (MBNaKab d7 d8 d9 k0) (MANbKabCaCb d4 d5 d6 k c c0) (MABNaNbKeyK d d0 d1 d2 d3) l) -> rel6 (ABSI (MBNaKab d7 d8 d9 k0) (MANbKabCaCb d4 d5 d6 k c c0) (MABNaNbKeyK d d0 d1 d2 d3) l) (ABSI (MBNaKab d18 d19 d20 k2) (MANbKabCaCb d15 d16 d17 k1 c1 c2) (MABNaNbKeyK d10 d11 d12 d13 d14) l0) -> invP (ABSI (MBNaKab d18 d19 d20 k2) (MANbKabCaCb d15 d16 d17 k1 c1 c2) (MABNaNbKeyK d10 d11 d12 d13 d14) l0). Proof. (* Goal: forall (l l0 : list C) (k k0 k1 k2 : K) (c c0 c1 c2 : C) (d d0 d1 d2 d3 d4 d5 d6 d7 d8 d9 d10 d11 d12 d13 d14 d15 d16 d17 d18 d19 d20 : D) (_ : inv0 (ABSI (MBNaKab d7 d8 d9 k0) (MANbKabCaCb d4 d5 d6 k c c0) (MABNaNbKeyK d d0 d1 d2 d3) l)) (_ : inv1 (ABSI (MBNaKab d7 d8 d9 k0) (MANbKabCaCb d4 d5 d6 k c c0) (MABNaNbKeyK d d0 d1 d2 d3) l)) (_ : invP (ABSI (MBNaKab d7 d8 d9 k0) (MANbKabCaCb d4 d5 d6 k c c0) (MABNaNbKeyK d d0 d1 d2 d3) l)) (_ : rel6 (ABSI (MBNaKab d7 d8 d9 k0) (MANbKabCaCb d4 d5 d6 k c c0) (MABNaNbKeyK d d0 d1 d2 d3) l) (ABSI (MBNaKab d18 d19 d20 k2) (MANbKabCaCb d15 d16 d17 k1 c1 c2) (MABNaNbKeyK d10 d11 d12 d13 d14) l0)), invP (ABSI (MBNaKab d18 d19 d20 k2) (MANbKabCaCb d15 d16 d17 k1 c1 c2) (MABNaNbKeyK d10 d11 d12 d13 d14) l0) *) do 32 intro. (* Goal: forall (_ : inv0 (ABSI (MBNaKab d7 d8 d9 k0) (MANbKabCaCb d4 d5 d6 k c c0) (MABNaNbKeyK d d0 d1 d2 d3) l)) (_ : inv1 (ABSI (MBNaKab d7 d8 d9 k0) (MANbKabCaCb d4 d5 d6 k c c0) (MABNaNbKeyK d d0 d1 d2 d3) l)) (_ : invP (ABSI (MBNaKab d7 d8 d9 k0) (MANbKabCaCb d4 d5 d6 k c c0) (MABNaNbKeyK d d0 d1 d2 d3) l)) (_ : rel6 (ABSI (MBNaKab d7 d8 d9 k0) (MANbKabCaCb d4 d5 d6 k c c0) (MABNaNbKeyK d d0 d1 d2 d3) l) (ABSI (MBNaKab d18 d19 d20 k2) (MANbKabCaCb d15 d16 d17 k1 c1 c2) (MABNaNbKeyK d10 d11 d12 d13 d14) l0)), invP (ABSI (MBNaKab d18 d19 d20 k2) (MANbKabCaCb d15 d16 d17 k1 c1 c2) (MABNaNbKeyK d10 d11 d12 d13 d14) l0) *) unfold rel6 in |- *; intros Inv0 Inv1 InvP and1. (* Goal: invP (ABSI (MBNaKab d18 d19 d20 k2) (MANbKabCaCb d15 d16 d17 k1 c1 c2) (MABNaNbKeyK d10 d11 d12 d13 d14) l0) *) elim and1; intros t1 and2; elim and2; intros t2 and3; elim and3; intros t3 and4; elim and4; intros eq_l0 t4. (* Goal: invP (ABSI (MBNaKab d18 d19 d20 k2) (MANbKabCaCb d15 d16 d17 k1 c1 c2) (MABNaNbKeyK d10 d11 d12 d13 d14) l0) *) elim eq_l0; assumption. Qed.
Require Import environments. Require Import List. Require Import syntax. Inductive TC : ty_env -> tm -> ty -> Prop := | TC_o : forall H : ty_env, TC H o nat_ty | TC_ttt : forall H : ty_env, TC H ttt bool_ty | TC_fff : forall H : ty_env, TC H fff bool_ty | TC_succ : forall (H : ty_env) (e : tm), TC H e nat_ty -> TC H (succ e) nat_ty | TC_prd : forall (H : ty_env) (e : tm), TC H e nat_ty -> TC H (prd e) nat_ty | TC_is_o : forall (H : ty_env) (e : tm), TC H e nat_ty -> TC H (is_o e) bool_ty | TC_var : forall (H : ty_env) (v : vari) (t : ty), mapsto v t H -> TC H (var v) t | TC_appl : forall (H : ty_env) (e e1 : tm) (s t : ty), TC H e (arr s t) -> TC H e1 s -> TC H (appl e e1) t | TC_abs : forall (H : ty_env) (v : vari) (e : tm) (s t : ty), TC ((v, s) :: H) e t -> TC H (abs v s e) (arr s t) | TC_cond : forall (H : ty_env) (e1 e2 e3 : tm) (t : ty), TC H e1 bool_ty -> TC H e2 t -> TC H e3 t -> TC H (cond e1 e2 e3) t | TC_fix : forall (H : ty_env) (e : tm) (t : ty) (v : vari), TC ((v, t) :: H) e t -> TC H (Fix v t e) t | TC_clos : forall (H : ty_env) (e e1 : tm) (s t : ty) (v : vari), TC H e1 s -> TC ((v, s) :: H) e t -> TC H (clos e v s e1) t. Definition tc (H : ty_env) (e : tm) (t : ty) := match e return Prop with | o => t = nat_ty | ttt => t = bool_ty | fff => t = bool_ty | abs v s e => exists r : ty, t = arr s r /\ TC ((v, s) :: H) e r | appl e1 e2 => exists s : ty, TC H e1 (arr s t) /\ TC H e2 s | cond e1 e2 e3 => TC H e1 bool_ty /\ TC H e2 t /\ TC H e3 t | var v => mapsto v t H | succ n => t = nat_ty /\ TC H n nat_ty | prd n => t = nat_ty /\ TC H n nat_ty | is_o n => t = bool_ty /\ TC H n nat_ty | Fix v s e1 => s = t /\ TC ((v, s) :: H) e1 t | clos e v s e1 => TC H e1 s /\ TC ((v, s) :: H) e t end. Goal forall (H : ty_env) (e : tm) (t : ty), TC H e t -> tc H e t. simple induction 1; simpl in |- *; intros. reflexivity. reflexivity. reflexivity. split; reflexivity || assumption. split; reflexivity || assumption. split; reflexivity || assumption. assumption. exists s; split; assumption. exists t0; split; reflexivity || assumption. split; assumption || split; assumption. split; reflexivity || assumption. split; assumption. Save TC_tc. Goal forall (H : ty_env) (t : ty), TC H o t -> t = nat_ty. intros H t HTC. change (tc H o t) in |- *. apply TC_tc; assumption. Save inv_TC_o. Goal forall (H : ty_env) (t : ty), TC H ttt t -> t = bool_ty. intros H t HTC. change (tc H ttt t) in |- *. apply TC_tc; assumption. Save inv_TC_ttt. Goal forall (H : ty_env) (t : ty), TC H fff t -> t = bool_ty. intros H t HTC. change (tc H fff t) in |- *. apply TC_tc; assumption. Save inv_TC_fff. Goal forall (H : ty_env) (t : ty) (e0 : tm), TC H (prd e0) t -> t = nat_ty /\ TC H e0 nat_ty. intros H t e0 HTC. change (tc H (prd e0) t) in |- *. apply TC_tc; assumption. Save inv_TC_prd. Goal forall (H : ty_env) (t : ty) (e0 : tm), TC H (succ e0) t -> t = nat_ty /\ TC H e0 nat_ty. intros H t e0 HTC. change (tc H (succ e0) t) in |- *. apply TC_tc; assumption. Save inv_TC_succ. Goal forall (H : ty_env) (t : ty) (e0 : tm), TC H (is_o e0) t -> t = bool_ty /\ TC H e0 nat_ty. intros H t e0 HTC. change (tc H (is_o e0) t) in |- *. apply TC_tc; assumption. Save inv_TC_is_o. Goal forall (H : ty_env) (t : ty) (v : vari), TC H (var v) t -> mapsto v t H. intros H t v HTC. change (tc H (var v) t) in |- *. apply TC_tc; assumption. Save inv_TC_var. Goal forall (H : ty_env) (t : ty) (e1 e2 : tm), TC H (appl e1 e2) t -> exists s : ty, TC H e1 (arr s t) /\ TC H e2 s. intros H t e1 e2 HTC. change (tc H (appl e1 e2) t) in |- *. apply TC_tc; assumption. Save inv_TC_appl. Goal forall (H : ty_env) (t s : ty) (v : vari) (e : tm), TC H (abs v s e) t -> exists r : ty, t = arr s r /\ TC ((v, s) :: H) e r. intros H t s v e HTC. change (tc H (abs v s e) t) in |- *. apply TC_tc; assumption. Save inv_TC_abs. Goal forall (H : ty_env) (t : ty) (e1 e2 e3 : tm), TC H (cond e1 e2 e3) t -> TC H e1 bool_ty /\ TC H e2 t /\ TC H e3 t. intros H t e1 e2 e3 HTC. change (tc H (cond e1 e2 e3) t) in |- *. apply TC_tc; assumption. Save inv_TC_cond. Goal forall (H : ty_env) (s t : ty) (e : tm) (v : vari), TC H (Fix v s e) t -> s = t /\ TC ((v, s) :: H) e t. intros H s t e v HTC. change (tc H (Fix v s e) t) in |- *. apply TC_tc; assumption. Save inv_TC_fix. Goal forall (H : ty_env) (t s : ty) (e e1 : tm) (v : vari), TC H (clos e v s e1) t -> TC H e1 s /\ TC ((v, s) :: H) e t. intros H t s e e1 v HTC. change (tc H (clos e v s e1) t) in |- *. apply TC_tc; assumption. Save inv_TC_clos.
From mathcomp Require Import ssreflect seq. From LemmaOverloading Require Import rels. Set Implicit Arguments. Unset Strict Implicit. Unset Printing Implicit Defensive. Structure tagged_seq := TagS {untags :> seq Prop}. Definition recurse := TagS. Structure tagged_prop := Tag {untag :> Prop}. Definition var_tag := Tag. Definition all_tag := var_tag. Definition imp_tag := all_tag. Definition orL_tag := imp_tag. Definition orR_tag := orL_tag. Lemma auto (p : form [::]) : untag p. Proof. (* Goal: untag (@prop_of (@nil Prop) p) *) by case: p=>[[s]] H; apply: H. Qed. Example ex9 (p : nat -> Prop) : (forall x, p x) -> p 3. Proof. try apply: auto. Abort.
Require Import mathcomp.ssreflect.ssreflect. From mathcomp Require Import ssrbool ssrfun eqtype ssrnat seq div choice fintype. From mathcomp Require Import tuple finfun bigop finset prime binomial ssralg poly polydiv. From mathcomp Require Import fingroup perm morphism quotient gproduct finalg zmodp cyclic. From mathcomp Require Import matrix mxalgebra mxpoly polyXY vector falgebra fieldext. Set Implicit Arguments. Unset Strict Implicit. Unset Printing Implicit Defensive. Local Open Scope ring_scope. Import GRing.Theory. Section SeparablePoly. Variable R : idomainType. Implicit Types p q d u v : {poly R}. Definition separable_poly p := coprimep p p^`(). Local Notation separable := separable_poly. Local Notation lcn_neq0 := (Pdiv.Idomain.lc_expn_scalp_neq0 _). Lemma separable_poly_neq0 p : separable p -> p != 0. Proof. (* Goal: forall _ : is_true (separable_poly p), is_true (negb (@eq_op (poly_eqType (GRing.IntegralDomain.ringType R)) p (GRing.zero (poly_zmodType (GRing.IntegralDomain.ringType R))))) *) by apply: contraTneq => ->; rewrite /separable deriv0 coprime0p eqp01. Qed. Lemma poly_square_freeP p : (forall u v, u * v %| p -> coprimep u v) <-> (forall u, size u != 1%N -> ~~ (u ^+ 2 %| p)). Proof. (* Goal: iff (forall (u v : @poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))) (_ : is_true (Pdiv.Field.dvdp R (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType R)) u v) p)), is_true (coprimep R u v)) (forall (u : @poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))) (_ : is_true (negb (@eq_op nat_eqType (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) u)) (S O)))), is_true (negb (Pdiv.Field.dvdp R (@GRing.exp (poly_ringType (GRing.IntegralDomain.ringType R)) u (S (S O))) p))) *) split=> [sq'p u | sq'p u v dvd_uv_p]. (* Goal: is_true (coprimep R u v) *) (* Goal: forall _ : is_true (negb (@eq_op nat_eqType (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) u)) (S O))), is_true (negb (Pdiv.Field.dvdp R (@GRing.exp (poly_ringType (GRing.IntegralDomain.ringType R)) u (S (S O))) p)) *) by apply: contra => /sq'p; rewrite coprimepp. (* Goal: is_true (coprimep R u v) *) rewrite coprimep_def (contraLR (sq'p _)) // (dvdp_trans _ dvd_uv_p) //. (* Goal: is_true (@dvdp R (@GRing.exp (poly_ringType (GRing.IntegralDomain.ringType R)) (gcdp R u v) (S (S O))) (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType R)) u v)) *) by rewrite dvdp_mul ?dvdp_gcdl ?dvdp_gcdr. Qed. Lemma separable_polyP {p} : reflect [/\ forall u v, u * v %| p -> coprimep u v & forall u, u %| p -> 1 < size u -> u^`() != 0] (separable p). Proof. (* Goal: Bool.reflect (and (forall (u v : @poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))) (_ : is_true (Pdiv.Field.dvdp R (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType R)) u v) p)), is_true (coprimep R u v)) (forall (u : @poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))) (_ : is_true (Pdiv.Field.dvdp R u p)) (_ : is_true (leq (S (S O)) (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) u)))), is_true (negb (@eq_op (poly_eqType (GRing.IntegralDomain.ringType R)) (@deriv (GRing.IntegralDomain.ringType R) u) (GRing.zero (poly_zmodType (GRing.IntegralDomain.ringType R))))))) (separable_poly p) *) apply: (iffP idP) => [sep_p | [sq'p nz_der1p]]. (* Goal: is_true (separable_poly p) *) (* Goal: and (forall (u v : @poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))) (_ : is_true (Pdiv.Field.dvdp R (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType R)) u v) p)), is_true (coprimep R u v)) (forall (u : @poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))) (_ : is_true (Pdiv.Field.dvdp R u p)) (_ : is_true (leq (S (S O)) (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) u)))), is_true (negb (@eq_op (poly_eqType (GRing.IntegralDomain.ringType R)) (@deriv (GRing.IntegralDomain.ringType R) u) (GRing.zero (poly_zmodType (GRing.IntegralDomain.ringType R)))))) *) split=> [u v | u u_dv_p]; last first. (* Goal: is_true (separable_poly p) *) (* Goal: forall _ : is_true (Pdiv.Field.dvdp R (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType R)) u v) p), is_true (coprimep R u v) *) (* Goal: forall _ : is_true (leq (S (S O)) (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) u))), is_true (negb (@eq_op (poly_eqType (GRing.IntegralDomain.ringType R)) (@deriv (GRing.IntegralDomain.ringType R) u) (GRing.zero (poly_zmodType (GRing.IntegralDomain.ringType R))))) *) apply: contraTneq => u'0; rewrite -leqNgt -(eqnP sep_p). (* Goal: is_true (separable_poly p) *) (* Goal: forall _ : is_true (Pdiv.Field.dvdp R (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType R)) u v) p), is_true (coprimep R u v) *) (* Goal: is_true (leq (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) u)) (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) (gcdp R p (@deriv (GRing.IntegralDomain.ringType R) p))))) *) rewrite dvdp_leq -?size_poly_eq0 ?(eqnP sep_p) // dvdp_gcd u_dv_p. (* Goal: is_true (separable_poly p) *) (* Goal: forall _ : is_true (Pdiv.Field.dvdp R (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType R)) u v) p), is_true (coprimep R u v) *) (* Goal: is_true (andb true (@dvdp R u (@deriv (GRing.IntegralDomain.ringType R) p))) *) have /dvdp_scaler <-: lead_coef u ^+ scalp p u != 0 by rewrite lcn_neq0. (* Goal: is_true (separable_poly p) *) (* Goal: forall _ : is_true (Pdiv.Field.dvdp R (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType R)) u v) p), is_true (coprimep R u v) *) (* Goal: is_true (andb true (@dvdp R u (@GRing.scale (GRing.IntegralDomain.ringType R) (poly_lmodType (GRing.IntegralDomain.ringType R)) (@GRing.exp (GRing.IntegralDomain.ringType R) (@lead_coef (GRing.IntegralDomain.ringType R) u) (@scalp R p u)) (@deriv (GRing.IntegralDomain.ringType R) p)))) *) by rewrite -derivZ -Pdiv.Idomain.divpK //= derivM u'0 mulr0 addr0 dvdp_mull. (* Goal: is_true (separable_poly p) *) (* Goal: forall _ : is_true (Pdiv.Field.dvdp R (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType R)) u v) p), is_true (coprimep R u v) *) rewrite Pdiv.Idomain.dvdp_eq mulrCA mulrA; set c := _ ^+ _ => /eqP Dcp. (* Goal: is_true (separable_poly p) *) (* Goal: is_true (coprimep R u v) *) have nz_c: c != 0 by rewrite lcn_neq0. (* Goal: is_true (separable_poly p) *) (* Goal: is_true (coprimep R u v) *) move: sep_p; rewrite coprimep_sym -[separable _](coprimep_scalel _ _ nz_c). (* Goal: is_true (separable_poly p) *) (* Goal: forall _ : is_true (coprimep R (@GRing.scale (GRing.IntegralDomain.ringType R) (poly_lmodType (GRing.IntegralDomain.ringType R)) c p) (@deriv (GRing.IntegralDomain.ringType R) p)), is_true (coprimep R v u) *) rewrite -(coprimep_scaler _ _ nz_c) -derivZ Dcp derivM coprimep_mull. (* Goal: is_true (separable_poly p) *) (* Goal: forall _ : is_true (andb (coprimep R (@GRing.mul (GRing.ComRing.ringType (poly_comRingType (GRing.ComUnitRing.comRingType (GRing.IntegralDomain.comUnitRingType R)))) u (@divp R p (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType R)) u v))) (@GRing.add (GRing.Ring.zmodType (poly_ringType (GRing.IntegralDomain.ringType R))) (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType R)) (@deriv (GRing.IntegralDomain.ringType R) (@GRing.mul (GRing.ComRing.ringType (poly_comRingType (GRing.ComUnitRing.comRingType (GRing.IntegralDomain.comUnitRingType R)))) u (@divp R p (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType R)) u v)))) v) (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType R)) (@GRing.mul (GRing.ComRing.ringType (poly_comRingType (GRing.ComUnitRing.comRingType (GRing.IntegralDomain.comUnitRingType R)))) u (@divp R p (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType R)) u v))) (@deriv (GRing.IntegralDomain.ringType R) v)))) (coprimep R v (@GRing.add (GRing.Ring.zmodType (poly_ringType (GRing.IntegralDomain.ringType R))) (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType R)) (@deriv (GRing.IntegralDomain.ringType R) (@GRing.mul (GRing.ComRing.ringType (poly_comRingType (GRing.ComUnitRing.comRingType (GRing.IntegralDomain.comUnitRingType R)))) u (@divp R p (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType R)) u v)))) v) (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType R)) (@GRing.mul (GRing.ComRing.ringType (poly_comRingType (GRing.ComUnitRing.comRingType (GRing.IntegralDomain.comUnitRingType R)))) u (@divp R p (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType R)) u v))) (@deriv (GRing.IntegralDomain.ringType R) v))))), is_true (coprimep R v u) *) by rewrite coprimep_addl_mul !coprimep_mulr -andbA => /and4P[]. (* Goal: is_true (separable_poly p) *) rewrite /separable coprimep_def eqn_leq size_poly_gt0; set g := gcdp _ _. (* Goal: is_true (andb (leq (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) g)) (S O)) (negb (@eq_op (poly_eqType (GRing.IntegralDomain.ringType R)) g (GRing.zero (poly_zmodType (GRing.IntegralDomain.ringType R)))))) *) have nz_g: g != 0. (* Goal: is_true (andb (leq (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) g)) (S O)) (negb (@eq_op (poly_eqType (GRing.IntegralDomain.ringType R)) g (GRing.zero (poly_zmodType (GRing.IntegralDomain.ringType R)))))) *) (* Goal: is_true (negb (@eq_op (poly_eqType (GRing.IntegralDomain.ringType R)) g (GRing.zero (poly_zmodType (GRing.IntegralDomain.ringType R))))) *) rewrite -dvd0p dvdp_gcd -(mulr0 0); apply/nandP; left. (* Goal: is_true (andb (leq (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) g)) (S O)) (negb (@eq_op (poly_eqType (GRing.IntegralDomain.ringType R)) g (GRing.zero (poly_zmodType (GRing.IntegralDomain.ringType R)))))) *) (* Goal: is_true (negb (@dvdp R (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType R)) (GRing.zero (GRing.Ring.zmodType (poly_ringType (GRing.IntegralDomain.ringType R)))) (GRing.zero (GRing.Ring.zmodType (poly_ringType (GRing.IntegralDomain.ringType R))))) p)) *) by have /poly_square_freeP-> := sq'p; rewrite ?size_poly0. (* Goal: is_true (andb (leq (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) g)) (S O)) (negb (@eq_op (poly_eqType (GRing.IntegralDomain.ringType R)) g (GRing.zero (poly_zmodType (GRing.IntegralDomain.ringType R)))))) *) have [g_p]: g %| p /\ g %| p^`() by rewrite dvdp_gcdr ?dvdp_gcdl. (* Goal: forall _ : is_true (Pdiv.Field.dvdp R g (@deriv (GRing.IntegralDomain.ringType R) p)), is_true (andb (leq (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) g)) (S O)) (negb (@eq_op (poly_eqType (GRing.IntegralDomain.ringType R)) g (GRing.zero (poly_zmodType (GRing.IntegralDomain.ringType R)))))) *) pose c := lead_coef g ^+ scalp p g; have nz_c: c != 0 by rewrite lcn_neq0. (* Goal: forall _ : is_true (Pdiv.Field.dvdp R g (@deriv (GRing.IntegralDomain.ringType R) p)), is_true (andb (leq (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) g)) (S O)) (negb (@eq_op (poly_eqType (GRing.IntegralDomain.ringType R)) g (GRing.zero (poly_zmodType (GRing.IntegralDomain.ringType R)))))) *) have Dcp: c *: p = p %/ g * g by rewrite Pdiv.Idomain.divpK. (* Goal: forall _ : is_true (Pdiv.Field.dvdp R g (@deriv (GRing.IntegralDomain.ringType R) p)), is_true (andb (leq (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) g)) (S O)) (negb (@eq_op (poly_eqType (GRing.IntegralDomain.ringType R)) g (GRing.zero (poly_zmodType (GRing.IntegralDomain.ringType R)))))) *) rewrite nz_g andbT leqNgt -(dvdp_scaler _ _ nz_c) -derivZ Dcp derivM. (* Goal: forall _ : is_true (@dvdp R g (@GRing.add (GRing.Ring.zmodType (poly_ringType (GRing.IntegralDomain.ringType R))) (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType R)) (@deriv (GRing.IntegralDomain.ringType R) (Pdiv.Field.divp R p g)) g) (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType R)) (Pdiv.Field.divp R p g) (@deriv (GRing.IntegralDomain.ringType R) g)))), is_true (negb (leq (S (S O)) (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) g)))) *) rewrite dvdp_addr; last by rewrite dvdp_mull. (* Goal: forall _ : is_true (@dvdp R g (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType R)) (Pdiv.Field.divp R p g) (@deriv (GRing.IntegralDomain.ringType R) g))), is_true (negb (leq (S (S O)) (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) g)))) *) rewrite Gauss_dvdpr; last by rewrite sq'p // mulrC -Dcp dvdp_scalel. (* Goal: forall _ : is_true (@dvdp R g (@deriv (GRing.IntegralDomain.ringType R) g)), is_true (negb (leq (S (S O)) (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) g)))) *) by apply: contraL => /nz_der1p nz_g'; rewrite gtNdvdp ?nz_g' ?lt_size_deriv. Qed. Lemma separable_coprime p u v : separable p -> u * v %| p -> coprimep u v. Proof. (* Goal: forall (_ : is_true (separable_poly p)) (_ : is_true (Pdiv.Field.dvdp R (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType R)) u v) p)), is_true (coprimep R u v) *) by move=> /separable_polyP[sq'p _] /sq'p. Qed. Lemma separable_nosquare p u k : separable p -> 1 < k -> size u != 1%N -> (u ^+ k %| p) = false. Proof. (* Goal: forall (_ : is_true (separable_poly p)) (_ : is_true (leq (S (S O)) k)) (_ : is_true (negb (@eq_op nat_eqType (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) u)) (S O)))), @eq bool (Pdiv.Field.dvdp R (@GRing.exp (poly_ringType (GRing.IntegralDomain.ringType R)) u k) p) false *) move=> /separable_polyP[/poly_square_freeP sq'p _] /subnKC <- /sq'p. (* Goal: forall _ : is_true (negb (Pdiv.Field.dvdp R (@GRing.exp (poly_ringType (GRing.IntegralDomain.ringType R)) u (S (S O))) p)), @eq bool (Pdiv.Field.dvdp R (@GRing.exp (poly_ringType (GRing.IntegralDomain.ringType R)) u (addn (S (S O)) (subn k (S (S O))))) p) false *) by apply: contraNF; apply: dvdp_trans; rewrite exprD dvdp_mulr. Qed. Lemma separable_deriv_eq0 p u : separable p -> u %| p -> 1 < size u -> (u^`() == 0) = false. Proof. (* Goal: forall (_ : is_true (separable_poly p)) (_ : is_true (Pdiv.Field.dvdp R u p)) (_ : is_true (leq (S (S O)) (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) u)))), @eq bool (@eq_op (poly_eqType (GRing.IntegralDomain.ringType R)) (@deriv (GRing.IntegralDomain.ringType R) u) (GRing.zero (poly_zmodType (GRing.IntegralDomain.ringType R)))) false *) by move=> /separable_polyP[_ nz_der1p] u_p /nz_der1p/negPf->. Qed. Lemma dvdp_separable p q : q %| p -> separable p -> separable q. Proof. (* Goal: forall (_ : is_true (Pdiv.Field.dvdp R q p)) (_ : is_true (separable_poly p)), is_true (separable_poly q) *) move=> /(dvdp_trans _)q_dv_p /separable_polyP[sq'p nz_der1p]. (* Goal: is_true (separable_poly q) *) by apply/separable_polyP; split=> [u v /q_dv_p/sq'p | u /q_dv_p/nz_der1p]. Qed. Lemma separable_mul p q : separable (p * q) = [&& separable p, separable q & coprimep p q]. Proof. (* Goal: @eq bool (separable_poly (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType R)) p q)) (andb (separable_poly p) (andb (separable_poly q) (coprimep R p q))) *) apply/idP/and3P => [sep_pq | [sep_p seq_q co_pq]]. (* Goal: is_true (separable_poly (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType R)) p q)) *) (* Goal: and3 (is_true (separable_poly p)) (is_true (separable_poly q)) (is_true (coprimep R p q)) *) rewrite !(dvdp_separable _ sep_pq) ?dvdp_mulIr ?dvdp_mulIl //. (* Goal: is_true (separable_poly (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType R)) p q)) *) (* Goal: and3 (is_true true) (is_true true) (is_true (coprimep R p q)) *) by rewrite (separable_coprime sep_pq). (* Goal: is_true (separable_poly (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType R)) p q)) *) rewrite /separable derivM coprimep_mull {1}addrC mulrC !coprimep_addl_mul. (* Goal: is_true (andb (coprimep R p (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType R)) (@deriv (GRing.IntegralDomain.ringType R) p) q)) (coprimep R q (@GRing.mul (GRing.ComRing.ringType (poly_comRingType (GRing.IntegralDomain.comRingType R))) (@deriv (GRing.IntegralDomain.ringType R) q) p))) *) by rewrite !coprimep_mulr (coprimep_sym q p) co_pq !andbT; apply/andP. Qed. Lemma eqp_separable p q : p %= q -> separable p = separable q. Proof. (* Goal: forall _ : is_true (Pdiv.Field.eqp R p q), @eq bool (separable_poly p) (separable_poly q) *) by case/andP=> p_q q_p; apply/idP/idP=> /dvdp_separable->. Qed. Lemma separable_root p x : separable (p * ('X - x%:P)) = separable p && ~~ root p x. Proof. (* Goal: @eq bool (separable_poly (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType R)) p (@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) x))))) (andb (separable_poly p) (negb (@root (GRing.IntegralDomain.ringType R) p x))) *) rewrite separable_mul; apply: andb_id2l => seq_p. (* Goal: @eq bool (andb (separable_poly (@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) x)))) (coprimep R p (@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) x))))) (negb (@root (GRing.IntegralDomain.ringType R) p x)) *) by rewrite /separable derivXsubC coprimep1 coprimep_XsubC. Qed. Lemma separable_prod_XsubC (r : seq R) : separable (\prod_(x <- r) ('X - x%:P)) = uniq r. Proof. (* Goal: @eq bool (separable_poly (@BigOp.bigop (GRing.Ring.sort (poly_ringType (GRing.IntegralDomain.ringType R))) (GRing.IntegralDomain.sort R) (GRing.one (poly_ringType (GRing.IntegralDomain.ringType R))) r (fun x : GRing.IntegralDomain.sort R => @BigBody (GRing.Ring.sort (poly_ringType (GRing.IntegralDomain.ringType R))) (GRing.IntegralDomain.sort R) x (@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) x)))))) (@uniq (GRing.IntegralDomain.eqType R) r) *) elim: r => [|x r IH]; first by rewrite big_nil /separable_poly coprime1p. (* Goal: @eq bool (separable_poly (@BigOp.bigop (GRing.Ring.sort (poly_ringType (GRing.IntegralDomain.ringType R))) (GRing.IntegralDomain.sort R) (GRing.one (poly_ringType (GRing.IntegralDomain.ringType R))) (@cons (GRing.IntegralDomain.sort R) x r) (fun x : GRing.IntegralDomain.sort R => @BigBody (GRing.Ring.sort (poly_ringType (GRing.IntegralDomain.ringType R))) (GRing.IntegralDomain.sort R) x (@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) x)))))) (@uniq (GRing.IntegralDomain.eqType R) (@cons (GRing.IntegralDomain.sort R) x r)) *) by rewrite big_cons mulrC separable_root IH root_prod_XsubC andbC. Qed. Lemma make_separable p : p != 0 -> separable (p %/ gcdp p p^`()). End SeparablePoly. Arguments separable_polyP {R p}. Lemma separable_map (F : fieldType) (R : idomainType) (f : {rmorphism F -> R}) (p : {poly F}) : separable_poly (map_poly f p) = separable_poly p. Proof. (* Goal: @eq bool (@separable_poly R (@map_poly (GRing.Field.ringType F) (GRing.IntegralDomain.ringType R) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.IntegralDomain.ringType R) (Phant (forall _ : GRing.Field.sort F, GRing.IntegralDomain.sort R)) f) p)) (@separable_poly (GRing.Field.idomainType F) p) *) by rewrite /separable_poly deriv_map /coprimep -gcdp_map size_map_poly. Qed. Section InfinitePrimitiveElementTheorem. Local Notation "p ^ f" := (map_poly f p) : ring_scope. Variables (F L : fieldType) (iota : {rmorphism F -> L}). Variables (x y : L) (p : {poly F}). Hypotheses (nz_p : p != 0) (px_0 : root (p ^ iota) x). Let inFz z w := exists q, (q ^ iota).[z] = w. Lemma large_field_PET q : root (q ^ iota) y -> separable_poly q -> exists2 r, r != 0 & forall t (z := iota t * y - x), ~~ root r (iota t) -> inFz z x /\ inFz z y. Lemma char0_PET (q : {poly F}) : q != 0 -> root (q ^ iota) y -> [char F] =i pred0 -> exists n, let z := y *+ n - x in inFz z x /\ inFz z y. Proof. (* Goal: forall (_ : is_true (negb (@eq_op (poly_eqType (GRing.Field.ringType F)) q (GRing.zero (poly_zmodType (GRing.Field.ringType F)))))) (_ : is_true (@root (GRing.Field.ringType L) (@map_poly (GRing.Field.ringType F) (GRing.Field.ringType L) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType L) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort L)) iota) q) y)) (_ : @eq_mem nat (@mem nat nat_pred_pred (@GRing.char (GRing.Field.ringType F) (Phant (GRing.Field.sort F)))) (@mem nat (simplPredType nat) (@pred0 nat))), @ex nat (fun n : nat => let z := @GRing.add (GRing.Field.zmodType L) (@GRing.natmul (GRing.Field.zmodType L) y n) (@GRing.opp (GRing.Field.zmodType L) x) in and (inFz z x) (inFz z y)) *) move=> nz_q qy_0 /charf0P charF0. (* Goal: @ex nat (fun n : nat => let z := @GRing.add (GRing.Field.zmodType L) (@GRing.natmul (GRing.Field.zmodType L) y n) (@GRing.opp (GRing.Field.zmodType L) x) in and (inFz z x) (inFz z y)) *) without loss{nz_q} sep_q: q qy_0 / separable_poly q. (* Goal: @ex nat (fun n : nat => let z := @GRing.add (GRing.Field.zmodType L) (@GRing.natmul (GRing.Field.zmodType L) y n) (@GRing.opp (GRing.Field.zmodType L) x) in and (inFz z x) (inFz z y)) *) (* Goal: forall _ : forall (q : @poly_of (GRing.Field.ringType F) (Phant (GRing.Field.sort F))) (_ : is_true (@root (GRing.Field.ringType L) (@map_poly (GRing.Field.ringType F) (GRing.Field.ringType L) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType L) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort L)) iota) q) y)) (_ : is_true (@separable_poly (GRing.Field.idomainType F) q)), @ex nat (fun n : nat => let z := @GRing.add (GRing.Field.zmodType L) (@GRing.natmul (GRing.Field.zmodType L) y n) (@GRing.opp (GRing.Field.zmodType L) x) in and (inFz z x) (inFz z y)), @ex nat (fun n : nat => let z := @GRing.add (GRing.Field.zmodType L) (@GRing.natmul (GRing.Field.zmodType L) y n) (@GRing.opp (GRing.Field.zmodType L) x) in and (inFz z x) (inFz z y)) *) move=> IHq; apply: IHq (make_separable nz_q). (* Goal: @ex nat (fun n : nat => let z := @GRing.add (GRing.Field.zmodType L) (@GRing.natmul (GRing.Field.zmodType L) y n) (@GRing.opp (GRing.Field.zmodType L) x) in and (inFz z x) (inFz z y)) *) (* Goal: is_true (@root (GRing.Field.ringType L) (@map_poly (GRing.Field.ringType F) (GRing.Field.ringType L) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType L) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort L)) iota) (Pdiv.Field.divp (GRing.Field.idomainType F) q (gcdp (GRing.Field.idomainType F) q (@deriv (GRing.IntegralDomain.ringType (GRing.Field.idomainType F)) q)))) y) *) have /dvdpP[q1 Dq] := dvdp_gcdl q q^`(). (* Goal: @ex nat (fun n : nat => let z := @GRing.add (GRing.Field.zmodType L) (@GRing.natmul (GRing.Field.zmodType L) y n) (@GRing.opp (GRing.Field.zmodType L) x) in and (inFz z x) (inFz z y)) *) (* Goal: is_true (@root (GRing.Field.ringType L) (@map_poly (GRing.Field.ringType F) (GRing.Field.ringType L) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType L) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort L)) iota) (Pdiv.Field.divp (GRing.Field.idomainType F) q (gcdp (GRing.Field.idomainType F) q (@deriv (GRing.IntegralDomain.ringType (GRing.Field.idomainType F)) q)))) y) *) rewrite {1}Dq mulpK ?gcdp_eq0; last by apply/nandP; left. (* Goal: @ex nat (fun n : nat => let z := @GRing.add (GRing.Field.zmodType L) (@GRing.natmul (GRing.Field.zmodType L) y n) (@GRing.opp (GRing.Field.zmodType L) x) in and (inFz z x) (inFz z y)) *) (* Goal: is_true (@root (GRing.Field.ringType L) (@map_poly (GRing.Field.ringType F) (GRing.Field.ringType L) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType L) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort L)) iota) q1) y) *) have [n [r nz_ry Dr]] := multiplicity_XsubC (q ^ iota) y. (* Goal: @ex nat (fun n : nat => let z := @GRing.add (GRing.Field.zmodType L) (@GRing.natmul (GRing.Field.zmodType L) y n) (@GRing.opp (GRing.Field.zmodType L) x) in and (inFz z x) (inFz z y)) *) (* Goal: is_true (@root (GRing.Field.ringType L) (@map_poly (GRing.Field.ringType F) (GRing.Field.ringType L) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType L) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort L)) iota) q1) y) *) rewrite map_poly_eq0 nz_q /= in nz_ry. (* Goal: @ex nat (fun n : nat => let z := @GRing.add (GRing.Field.zmodType L) (@GRing.natmul (GRing.Field.zmodType L) y n) (@GRing.opp (GRing.Field.zmodType L) x) in and (inFz z x) (inFz z y)) *) (* Goal: is_true (@root (GRing.Field.ringType L) (@map_poly (GRing.Field.ringType F) (GRing.Field.ringType L) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType L) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort L)) iota) q1) y) *) case: n => [|n] in Dr; first by rewrite Dr mulr1 (negPf nz_ry) in qy_0. (* Goal: @ex nat (fun n : nat => let z := @GRing.add (GRing.Field.zmodType L) (@GRing.natmul (GRing.Field.zmodType L) y n) (@GRing.opp (GRing.Field.zmodType L) x) in and (inFz z x) (inFz z y)) *) (* Goal: is_true (@root (GRing.Field.ringType L) (@map_poly (GRing.Field.ringType F) (GRing.Field.ringType L) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType L) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort L)) iota) q1) y) *) have: ('X - y%:P) ^+ n.+1 %| q ^ iota by rewrite Dr dvdp_mulIr. (* Goal: @ex nat (fun n : nat => let z := @GRing.add (GRing.Field.zmodType L) (@GRing.natmul (GRing.Field.zmodType L) y n) (@GRing.opp (GRing.Field.zmodType L) x) in and (inFz z x) (inFz z y)) *) (* Goal: forall _ : is_true (Pdiv.Field.dvdp (GRing.Field.idomainType L) (@GRing.exp (poly_ringType (GRing.Field.ringType L)) (@GRing.add (poly_zmodType (GRing.Field.ringType L)) (polyX (GRing.Field.ringType L)) (@GRing.opp (poly_zmodType (GRing.Field.ringType L)) (@polyC (GRing.Field.ringType L) y))) (S n)) (@map_poly (GRing.Field.ringType F) (GRing.Field.ringType L) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType L) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort L)) iota) q)), is_true (@root (GRing.Field.ringType L) (@map_poly (GRing.Field.ringType F) (GRing.Field.ringType L) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType L) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort L)) iota) q1) y) *) rewrite Dq rmorphM /= gcdp_map -(eqp_dvdr _ (gcdp_mul2l _ _ _)) -deriv_map Dr. (* Goal: @ex nat (fun n : nat => let z := @GRing.add (GRing.Field.zmodType L) (@GRing.natmul (GRing.Field.zmodType L) y n) (@GRing.opp (GRing.Field.zmodType L) x) in and (inFz z x) (inFz z y)) *) (* Goal: forall _ : is_true (@dvdp (GRing.Field.idomainType L) (@GRing.exp (poly_ringType (GRing.Field.ringType L)) (@GRing.add (poly_zmodType (GRing.Field.ringType L)) (polyX (GRing.Field.ringType L)) (@GRing.opp (poly_zmodType (GRing.Field.ringType L)) (@polyC (GRing.Field.ringType L) y))) (S n)) (gcdp (GRing.Field.idomainType L) (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType (GRing.Field.idomainType L))) (@map_poly (GRing.Field.ringType F) (GRing.Field.ringType L) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType L) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort L)) iota) q1) (@GRing.mul (poly_ringType (GRing.Field.ringType L)) r (@GRing.exp (poly_ringType (GRing.Field.ringType L)) (@GRing.add (poly_zmodType (GRing.Field.ringType L)) (polyX (GRing.Field.ringType L)) (@GRing.opp (poly_zmodType (GRing.Field.ringType L)) (@polyC (GRing.Field.ringType L) y))) (S n)))) (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType (GRing.Field.idomainType L))) (@map_poly (GRing.Field.ringType F) (GRing.Field.ringType L) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType L) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort L)) iota) q1) (@deriv (GRing.IntegralDomain.ringType (GRing.Field.idomainType L)) (@GRing.mul (poly_ringType (GRing.Field.ringType L)) r (@GRing.exp (poly_ringType (GRing.Field.ringType L)) (@GRing.add (poly_zmodType (GRing.Field.ringType L)) (polyX (GRing.Field.ringType L)) (@GRing.opp (poly_zmodType (GRing.Field.ringType L)) (@polyC (GRing.Field.ringType L) y))) (S n))))))), is_true (@root (GRing.Field.ringType L) (@map_poly (GRing.Field.ringType F) (GRing.Field.ringType L) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType L) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort L)) iota) q1) y) *) rewrite dvdp_gcd derivM deriv_exp derivXsubC mul1r !mulrA dvdp_mulIr /=. (* Goal: @ex nat (fun n : nat => let z := @GRing.add (GRing.Field.zmodType L) (@GRing.natmul (GRing.Field.zmodType L) y n) (@GRing.opp (GRing.Field.zmodType L) x) in and (inFz z x) (inFz z y)) *) (* Goal: forall _ : is_true (@dvdp (GRing.Field.idomainType L) (@GRing.exp (poly_ringType (GRing.Field.ringType L)) (@GRing.add (poly_zmodType (GRing.Field.ringType L)) (polyX (GRing.Field.ringType L)) (@GRing.opp (poly_zmodType (GRing.Field.ringType L)) (@polyC (GRing.Field.ringType L) y))) (S n)) (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType (GRing.Field.idomainType L))) (@map_poly (GRing.Field.ringType F) (GRing.Field.ringType L) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType L) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort L)) iota) q1) (@GRing.add (GRing.Ring.zmodType (poly_ringType (GRing.IntegralDomain.ringType (GRing.Field.idomainType L)))) (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType (GRing.Field.idomainType L))) (@deriv (GRing.IntegralDomain.ringType (GRing.Field.idomainType L)) r) (@GRing.exp (poly_ringType (GRing.Field.ringType L)) (@GRing.add (poly_zmodType (GRing.Field.ringType L)) (polyX (GRing.Field.ringType L)) (@GRing.opp (poly_zmodType (GRing.Field.ringType L)) (@polyC (GRing.Field.ringType L) y))) (S n))) (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType (GRing.Field.idomainType L))) r (@GRing.natmul (GRing.Ring.zmodType (poly_ringType (GRing.ComRing.ringType (GRing.IntegralDomain.comRingType (GRing.Field.idomainType L))))) (@GRing.exp (poly_ringType (GRing.ComRing.ringType (GRing.IntegralDomain.comRingType (GRing.Field.idomainType L)))) (@GRing.add (poly_zmodType (GRing.Field.ringType L)) (polyX (GRing.Field.ringType L)) (@GRing.opp (poly_zmodType (GRing.Field.ringType L)) (@polyC (GRing.Field.ringType L) y))) n) (S n)))))), is_true (@root (GRing.Field.ringType L) (@map_poly (GRing.Field.ringType F) (GRing.Field.ringType L) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType L) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort L)) iota) q1) y) *) rewrite mulrDr mulrA dvdp_addr ?dvdp_mulIr // exprS -scaler_nat -!scalerAr. (* Goal: @ex nat (fun n : nat => let z := @GRing.add (GRing.Field.zmodType L) (@GRing.natmul (GRing.Field.zmodType L) y n) (@GRing.opp (GRing.Field.zmodType L) x) in and (inFz z x) (inFz z y)) *) (* Goal: forall _ : is_true (@dvdp (GRing.Field.idomainType L) (@GRing.mul (poly_ringType (GRing.Field.ringType L)) (@GRing.add (poly_zmodType (GRing.Field.ringType L)) (polyX (GRing.Field.ringType L)) (@GRing.opp (poly_zmodType (GRing.Field.ringType L)) (@polyC (GRing.Field.ringType L) y))) (@GRing.exp (poly_ringType (GRing.Field.ringType L)) (@GRing.add (poly_zmodType (GRing.Field.ringType L)) (polyX (GRing.Field.ringType L)) (@GRing.opp (poly_zmodType (GRing.Field.ringType L)) (@polyC (GRing.Field.ringType L) y))) n)) (@GRing.scale (GRing.ComRing.ringType (GRing.IntegralDomain.comRingType (GRing.Field.idomainType L))) (@GRing.Lalgebra.lmod_ringType (GRing.ComRing.ringType (GRing.IntegralDomain.comRingType (GRing.Field.idomainType L))) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.IntegralDomain.comRingType (GRing.Field.idomainType L))))) (@GRing.Algebra.lalgType (GRing.ComRing.ringType (GRing.IntegralDomain.comRingType (GRing.Field.idomainType L))) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.IntegralDomain.comRingType (GRing.Field.idomainType L))))) (poly_algType (GRing.IntegralDomain.comRingType (GRing.Field.idomainType L))))) (@GRing.natmul (GRing.Ring.zmodType (GRing.ComRing.ringType (GRing.IntegralDomain.comRingType (GRing.Field.idomainType L)))) (GRing.one (GRing.ComRing.ringType (GRing.IntegralDomain.comRingType (GRing.Field.idomainType L)))) (S n)) (@GRing.mul (@GRing.Algebra.ringType (GRing.ComRing.ringType (GRing.IntegralDomain.comRingType (GRing.Field.idomainType L))) (Phant (GRing.ComRing.sort (GRing.IntegralDomain.comRingType (GRing.Field.idomainType L)))) (poly_algType (GRing.IntegralDomain.comRingType (GRing.Field.idomainType L)))) (@map_poly (GRing.Field.ringType F) (GRing.Field.ringType L) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType L) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort L)) iota) q1) (@GRing.mul (@GRing.Algebra.ringType (GRing.ComRing.ringType (GRing.IntegralDomain.comRingType (GRing.Field.idomainType L))) (Phant (GRing.ComRing.sort (GRing.IntegralDomain.comRingType (GRing.Field.idomainType L)))) (poly_algType (GRing.IntegralDomain.comRingType (GRing.Field.idomainType L)))) r (@GRing.exp (poly_ringType (GRing.ComRing.ringType (GRing.IntegralDomain.comRingType (GRing.Field.idomainType L)))) (@GRing.add (poly_zmodType (GRing.Field.ringType L)) (polyX (GRing.Field.ringType L)) (@GRing.opp (poly_zmodType (GRing.Field.ringType L)) (@polyC (GRing.Field.ringType L) y))) n))))), is_true (@root (GRing.Field.ringType L) (@map_poly (GRing.Field.ringType F) (GRing.Field.ringType L) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType L) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort L)) iota) q1) y) *) rewrite dvdp_scaler -?(rmorph_nat iota) ?fmorph_eq0 ?charF0 //. (* Goal: @ex nat (fun n : nat => let z := @GRing.add (GRing.Field.zmodType L) (@GRing.natmul (GRing.Field.zmodType L) y n) (@GRing.opp (GRing.Field.zmodType L) x) in and (inFz z x) (inFz z y)) *) (* Goal: forall _ : is_true (@dvdp (GRing.Field.idomainType L) (@GRing.mul (poly_ringType (GRing.Field.ringType L)) (@GRing.add (poly_zmodType (GRing.Field.ringType L)) (polyX (GRing.Field.ringType L)) (@GRing.opp (poly_zmodType (GRing.Field.ringType L)) (@polyC (GRing.Field.ringType L) y))) (@GRing.exp (poly_ringType (GRing.Field.ringType L)) (@GRing.add (poly_zmodType (GRing.Field.ringType L)) (polyX (GRing.Field.ringType L)) (@GRing.opp (poly_zmodType (GRing.Field.ringType L)) (@polyC (GRing.Field.ringType L) y))) n)) (@GRing.mul (@GRing.Algebra.ringType (GRing.ComRing.ringType (GRing.IntegralDomain.comRingType (GRing.Field.idomainType L))) (Phant (GRing.ComRing.sort (GRing.IntegralDomain.comRingType (GRing.Field.idomainType L)))) (poly_algType (GRing.IntegralDomain.comRingType (GRing.Field.idomainType L)))) (@map_poly (GRing.Field.ringType F) (GRing.Field.ringType L) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType L) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort L)) iota) q1) (@GRing.mul (@GRing.Algebra.ringType (GRing.ComRing.ringType (GRing.IntegralDomain.comRingType (GRing.Field.idomainType L))) (Phant (GRing.ComRing.sort (GRing.IntegralDomain.comRingType (GRing.Field.idomainType L)))) (poly_algType (GRing.IntegralDomain.comRingType (GRing.Field.idomainType L)))) r (@GRing.exp (poly_ringType (GRing.ComRing.ringType (GRing.IntegralDomain.comRingType (GRing.Field.idomainType L)))) (@GRing.add (poly_zmodType (GRing.Field.ringType L)) (polyX (GRing.Field.ringType L)) (@GRing.opp (poly_zmodType (GRing.Field.ringType L)) (@polyC (GRing.Field.ringType L) y))) n)))), is_true (@root (GRing.Field.ringType L) (@map_poly (GRing.Field.ringType F) (GRing.Field.ringType L) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType L) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort L)) iota) q1) y) *) rewrite mulrA dvdp_mul2r ?expf_neq0 ?polyXsubC_eq0 //. (* Goal: @ex nat (fun n : nat => let z := @GRing.add (GRing.Field.zmodType L) (@GRing.natmul (GRing.Field.zmodType L) y n) (@GRing.opp (GRing.Field.zmodType L) x) in and (inFz z x) (inFz z y)) *) (* Goal: forall _ : is_true (@dvdp (GRing.Field.idomainType L) (@GRing.add (poly_zmodType (GRing.Field.ringType L)) (polyX (GRing.Field.ringType L)) (@GRing.opp (poly_zmodType (GRing.Field.ringType L)) (@polyC (GRing.Field.ringType L) y))) (@GRing.mul (@GRing.Algebra.ringType (GRing.ComRing.ringType (GRing.IntegralDomain.comRingType (GRing.Field.idomainType L))) (Phant (GRing.ComRing.sort (GRing.IntegralDomain.comRingType (GRing.Field.idomainType L)))) (poly_algType (GRing.IntegralDomain.comRingType (GRing.Field.idomainType L)))) (@map_poly (GRing.Field.ringType F) (GRing.Field.ringType L) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType L) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort L)) iota) q1) r)), is_true (@root (GRing.Field.ringType L) (@map_poly (GRing.Field.ringType F) (GRing.Field.ringType L) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType L) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort L)) iota) q1) y) *) by rewrite Gauss_dvdpl ?dvdp_XsubCl // coprimep_sym coprimep_XsubC. (* Goal: @ex nat (fun n : nat => let z := @GRing.add (GRing.Field.zmodType L) (@GRing.natmul (GRing.Field.zmodType L) y n) (@GRing.opp (GRing.Field.zmodType L) x) in and (inFz z x) (inFz z y)) *) have [r nz_r PETxy] := large_field_PET qy_0 sep_q. (* Goal: @ex nat (fun n : nat => let z := @GRing.add (GRing.Field.zmodType L) (@GRing.natmul (GRing.Field.zmodType L) y n) (@GRing.opp (GRing.Field.zmodType L) x) in and (inFz z x) (inFz z y)) *) pose ts := mkseq (fun n => iota n%:R) (size r). (* Goal: @ex nat (fun n : nat => let z := @GRing.add (GRing.Field.zmodType L) (@GRing.natmul (GRing.Field.zmodType L) y n) (@GRing.opp (GRing.Field.zmodType L) x) in and (inFz z x) (inFz z y)) *) have /(max_ring_poly_roots nz_r)/=/implyP: uniq_roots ts. (* Goal: forall _ : is_true (implb (@all (GRing.Field.sort L) (@root (GRing.UnitRing.ringType (GRing.Field.unitRingType L)) r) ts) (leq (S (@size (GRing.Field.sort L) ts)) (@size (GRing.Field.sort L) (@polyseq (GRing.UnitRing.ringType (GRing.Field.unitRingType L)) r)))), @ex nat (fun n : nat => and (inFz (@GRing.add (GRing.Field.zmodType L) (@GRing.natmul (GRing.Field.zmodType L) y n) (@GRing.opp (GRing.Field.zmodType L) x)) x) (inFz (@GRing.add (GRing.Field.zmodType L) (@GRing.natmul (GRing.Field.zmodType L) y n) (@GRing.opp (GRing.Field.zmodType L) x)) y)) *) (* Goal: is_true (@uniq_roots (GRing.Field.unitRingType L) ts) *) rewrite uniq_rootsE mkseq_uniq // => m n eq_mn; apply/eqP; rewrite eqn_leq. (* Goal: forall _ : is_true (implb (@all (GRing.Field.sort L) (@root (GRing.UnitRing.ringType (GRing.Field.unitRingType L)) r) ts) (leq (S (@size (GRing.Field.sort L) ts)) (@size (GRing.Field.sort L) (@polyseq (GRing.UnitRing.ringType (GRing.Field.unitRingType L)) r)))), @ex nat (fun n : nat => and (inFz (@GRing.add (GRing.Field.zmodType L) (@GRing.natmul (GRing.Field.zmodType L) y n) (@GRing.opp (GRing.Field.zmodType L) x)) x) (inFz (@GRing.add (GRing.Field.zmodType L) (@GRing.natmul (GRing.Field.zmodType L) y n) (@GRing.opp (GRing.Field.zmodType L) x)) y)) *) (* Goal: is_true (andb (leq m n) (leq n m)) *) wlog suffices: m n eq_mn / m <= n by move=> IHmn; rewrite !IHmn. (* Goal: forall _ : is_true (implb (@all (GRing.Field.sort L) (@root (GRing.UnitRing.ringType (GRing.Field.unitRingType L)) r) ts) (leq (S (@size (GRing.Field.sort L) ts)) (@size (GRing.Field.sort L) (@polyseq (GRing.UnitRing.ringType (GRing.Field.unitRingType L)) r)))), @ex nat (fun n : nat => and (inFz (@GRing.add (GRing.Field.zmodType L) (@GRing.natmul (GRing.Field.zmodType L) y n) (@GRing.opp (GRing.Field.zmodType L) x)) x) (inFz (@GRing.add (GRing.Field.zmodType L) (@GRing.natmul (GRing.Field.zmodType L) y n) (@GRing.opp (GRing.Field.zmodType L) x)) y)) *) (* Goal: is_true (leq m n) *) move/fmorph_inj/eqP: eq_mn; rewrite -subr_eq0 leqNgt; apply: contraL => lt_mn. (* Goal: forall _ : is_true (implb (@all (GRing.Field.sort L) (@root (GRing.UnitRing.ringType (GRing.Field.unitRingType L)) r) ts) (leq (S (@size (GRing.Field.sort L) ts)) (@size (GRing.Field.sort L) (@polyseq (GRing.UnitRing.ringType (GRing.Field.unitRingType L)) r)))), @ex nat (fun n : nat => and (inFz (@GRing.add (GRing.Field.zmodType L) (@GRing.natmul (GRing.Field.zmodType L) y n) (@GRing.opp (GRing.Field.zmodType L) x)) x) (inFz (@GRing.add (GRing.Field.zmodType L) (@GRing.natmul (GRing.Field.zmodType L) y n) (@GRing.opp (GRing.Field.zmodType L) x)) y)) *) (* Goal: is_true (negb (@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)) m) (@GRing.opp (GRing.Ring.zmodType (GRing.Field.ringType F)) (@GRing.natmul (GRing.Ring.zmodType (GRing.Field.ringType F)) (GRing.one (GRing.Field.ringType F)) n))) (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType F))))) *) by rewrite -natrB ?(ltnW lt_mn) // charF0 -lt0n subn_gt0. (* Goal: forall _ : is_true (implb (@all (GRing.Field.sort L) (@root (GRing.UnitRing.ringType (GRing.Field.unitRingType L)) r) ts) (leq (S (@size (GRing.Field.sort L) ts)) (@size (GRing.Field.sort L) (@polyseq (GRing.UnitRing.ringType (GRing.Field.unitRingType L)) r)))), @ex nat (fun n : nat => and (inFz (@GRing.add (GRing.Field.zmodType L) (@GRing.natmul (GRing.Field.zmodType L) y n) (@GRing.opp (GRing.Field.zmodType L) x)) x) (inFz (@GRing.add (GRing.Field.zmodType L) (@GRing.natmul (GRing.Field.zmodType L) y n) (@GRing.opp (GRing.Field.zmodType L) x)) y)) *) rewrite size_mkseq ltnn implybF all_map => /allPn[n _ /= /PETxy]. (* Goal: forall _ : and (inFz (@GRing.add (GRing.Ring.zmodType (GRing.Field.ringType L)) (@GRing.mul (GRing.Field.ringType L) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType L) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort L)) iota (@GRing.natmul (GRing.Ring.zmodType (GRing.Field.ringType F)) (GRing.one (GRing.Field.ringType F)) n)) y) (@GRing.opp (GRing.Field.zmodType L) x)) x) (inFz (@GRing.add (GRing.Ring.zmodType (GRing.Field.ringType L)) (@GRing.mul (GRing.Field.ringType L) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType L) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort L)) iota (@GRing.natmul (GRing.Ring.zmodType (GRing.Field.ringType F)) (GRing.one (GRing.Field.ringType F)) n)) y) (@GRing.opp (GRing.Field.zmodType L) x)) y), @ex nat (fun n : nat => and (inFz (@GRing.add (GRing.Field.zmodType L) (@GRing.natmul (GRing.Field.zmodType L) y n) (@GRing.opp (GRing.Field.zmodType L) x)) x) (inFz (@GRing.add (GRing.Field.zmodType L) (@GRing.natmul (GRing.Field.zmodType L) y n) (@GRing.opp (GRing.Field.zmodType L) x)) y)) *) by rewrite rmorph_nat mulr_natl; exists n. Qed. End InfinitePrimitiveElementTheorem. Section Separable. Variables (F : fieldType) (L : fieldExtType F). Implicit Types (U V W : {vspace L}) (E K M : {subfield L}) (D : 'End(L)). Section Derivation. Variables (K : {vspace L}) (D : 'End(L)). Definition Derivation (s := vbasis K) : bool := all (fun u => all (fun v => D (u * v) == D u * v + u * D v) s) s. Hypothesis derD : Derivation. Lemma Derivation_mul : {in K &, forall u v, D (u * v) = D u * v + u * D v}. Proof. (* Goal: @prop_in2 (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@pred_of_vspace F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) K)) (fun u v : GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) => @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) D (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) u v)) (@GRing.add (GRing.Ring.zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L)))) (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) D u) v) (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) u (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) D v)))) (inPhantom (forall u v : GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))), @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) D (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) u v)) (@GRing.add (GRing.Ring.zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L)))) (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) D u) v) (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) u (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) D v))))) *) move=> u v /coord_vbasis-> /coord_vbasis->. (* Goal: @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) D (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))))) (Finite.sort (ordinal_finType (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))))) (index_enum (ordinal_finType (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K))) (fun i : ordinal (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))))) (ordinal (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K)) i (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))))) true (@GRing.scale (GRing.Field.ringType F) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@coord F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vbasis F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) i u) (@nth (GRing.Zmodule.sort (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@tval (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@vbasis F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K)) (@nat_of_ord (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) i))))) (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))))) (Finite.sort (ordinal_finType (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))))) (index_enum (ordinal_finType (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K))) (fun i : ordinal (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))))) (ordinal (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K)) i (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))))) true (@GRing.scale (GRing.Field.ringType F) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@coord F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vbasis F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) i v) (@nth (GRing.Zmodule.sort (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@tval (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@vbasis F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K)) (@nat_of_ord (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) i))))))) (@GRing.add (GRing.Ring.zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L)))) (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) D (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))))) (Finite.sort (ordinal_finType (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))))) (index_enum (ordinal_finType (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K))) (fun i : ordinal (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))))) (ordinal (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K)) i (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))))) true (@GRing.scale (GRing.Field.ringType F) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@coord F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vbasis F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) i u) (@nth (GRing.Zmodule.sort (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@tval (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@vbasis F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K)) (@nat_of_ord (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) i)))))) (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))))) (Finite.sort (ordinal_finType (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))))) (index_enum (ordinal_finType (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K))) (fun i : ordinal (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))))) (ordinal (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K)) i (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))))) true (@GRing.scale (GRing.Field.ringType F) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@coord F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vbasis F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) i v) (@nth (GRing.Zmodule.sort (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@tval (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@vbasis F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K)) (@nat_of_ord (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) i)))))) (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))))) (Finite.sort (ordinal_finType (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))))) (index_enum (ordinal_finType (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K))) (fun i : ordinal (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))))) (ordinal (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K)) i (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))))) true (@GRing.scale (GRing.Field.ringType F) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@coord F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vbasis F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) i u) (@nth (GRing.Zmodule.sort (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@tval (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@vbasis F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K)) (@nat_of_ord (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) i))))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) D (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))))) (Finite.sort (ordinal_finType (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))))) (index_enum (ordinal_finType (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K))) (fun i : ordinal (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))))) (ordinal (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K)) i (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))))) true (@GRing.scale (GRing.Field.ringType F) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@coord F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vbasis F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) i v) (@nth (GRing.Zmodule.sort (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@tval (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@vbasis F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K)) (@nat_of_ord (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) i)))))))) *) rewrite !(mulr_sumr, linear_sum) -big_split; apply: eq_bigr => /= j _. (* Goal: @eq (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) D (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@BigOp.bigop (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (ordinal (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K)) (GRing.zero (@GRing.Zmodule.Pack (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@GRing.Ring.base (let '@FieldExt.Pack _ _ T c := L in T) (@GRing.Lalgebra.base (GRing.Field.ringType F) (let '@FieldExt.Pack _ _ T c := L in T) (@GRing.Algebra.base (GRing.Field.ringType F) (let '@FieldExt.Pack _ _ T c := L in T) (@GRing.UnitAlgebra.base (GRing.Field.ringType F) (let '@FieldExt.Pack _ _ T c := L in T) (@Falgebra.base1 (GRing.Field.ringType F) (let '@FieldExt.Pack _ _ T c := L in T) (@FieldExt.base (GRing.Field.ringType F) (let '@FieldExt.Pack _ _ T c := L in T) (@FieldExt.class (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))))))) (index_enum (ordinal_finType (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K))) (fun i : ordinal (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) => @BigBody (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (ordinal (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K)) i (@GRing.add (@GRing.Zmodule.Pack (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@GRing.Ring.base (let '@FieldExt.Pack _ _ T c := L in T) (@GRing.Lalgebra.base (GRing.Field.ringType F) (let '@FieldExt.Pack _ _ T c := L in T) (@GRing.Algebra.base (GRing.Field.ringType F) (let '@FieldExt.Pack _ _ T c := L in T) (@GRing.UnitAlgebra.base (GRing.Field.ringType F) (let '@FieldExt.Pack _ _ T c := L in T) (@Falgebra.base1 (GRing.Field.ringType F) (let '@FieldExt.Pack _ _ T c := L in T) (@FieldExt.base (GRing.Field.ringType F) (let '@FieldExt.Pack _ _ T c := L in T) (@FieldExt.class (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))))))) true (@GRing.scale (GRing.Field.ringType F) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@coord F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vbasis F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) i u) (@nth (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@tval (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@vbasis F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K)) (@nat_of_ord (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) i))))) (@GRing.scale (GRing.Field.ringType F) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@coord F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vbasis F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) j v) (@nth (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@tval (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@vbasis F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K)) (@nat_of_ord (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) j))))) (@GRing.add (GRing.Ring.zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@BigOp.bigop (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (ordinal (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K)) (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (index_enum (ordinal_finType (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K))) (fun i : ordinal (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) => @BigBody (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (ordinal (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K)) i (@GRing.add (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) true (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) D (@GRing.scale (GRing.Field.ringType F) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@coord F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vbasis F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) i u) (@nth (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@tval (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@vbasis F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K)) (@nat_of_ord (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) i)))))) (@GRing.scale (GRing.Field.ringType F) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@coord F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vbasis F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) j v) (@nth (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@tval (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@vbasis F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K)) (@nat_of_ord (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) j)))) (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@BigOp.bigop (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (ordinal (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K)) (GRing.zero (@GRing.Zmodule.Pack (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@GRing.Ring.base (let '@FieldExt.Pack _ _ T c := L in T) (@GRing.Lalgebra.base (GRing.Field.ringType F) (let '@FieldExt.Pack _ _ T c := L in T) (@GRing.Algebra.base (GRing.Field.ringType F) (let '@FieldExt.Pack _ _ T c := L in T) (@GRing.UnitAlgebra.base (GRing.Field.ringType F) (let '@FieldExt.Pack _ _ T c := L in T) (@Falgebra.base1 (GRing.Field.ringType F) (let '@FieldExt.Pack _ _ T c := L in T) (@FieldExt.base (GRing.Field.ringType F) (let '@FieldExt.Pack _ _ T c := L in T) (@FieldExt.class (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))))))) (index_enum (ordinal_finType (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K))) (fun i : ordinal (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) => @BigBody (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (ordinal (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K)) i (@GRing.add (@GRing.Zmodule.Pack (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@GRing.Ring.base (let '@FieldExt.Pack _ _ T c := L in T) (@GRing.Lalgebra.base (GRing.Field.ringType F) (let '@FieldExt.Pack _ _ T c := L in T) (@GRing.Algebra.base (GRing.Field.ringType F) (let '@FieldExt.Pack _ _ T c := L in T) (@GRing.UnitAlgebra.base (GRing.Field.ringType F) (let '@FieldExt.Pack _ _ T c := L in T) (@Falgebra.base1 (GRing.Field.ringType F) (let '@FieldExt.Pack _ _ T c := L in T) (@FieldExt.base (GRing.Field.ringType F) (let '@FieldExt.Pack _ _ T c := L in T) (@FieldExt.class (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))))))) true (@GRing.scale (GRing.Field.ringType F) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@coord F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vbasis F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) i u) (@nth (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@tval (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@vbasis F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K)) (@nat_of_ord (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) i))))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) D (@GRing.scale (GRing.Field.ringType F) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@coord F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vbasis F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) j v) (@nth (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@tval (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@vbasis F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K)) (@nat_of_ord (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) j)))))) *) rewrite !mulr_suml linear_sum -big_split; apply: eq_bigr => /= i _. (* Goal: @eq (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) D (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.scale (GRing.Field.ringType F) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@coord F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vbasis F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) i u) (@nth (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@tval (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@vbasis F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K)) (@nat_of_ord (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) i))) (@GRing.scale (GRing.Field.ringType F) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@coord F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vbasis F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) j v) (@nth (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@tval (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@vbasis F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K)) (@nat_of_ord (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) j))))) (@GRing.add (GRing.Ring.zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) D (@GRing.scale (GRing.Field.ringType F) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@coord F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vbasis F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) i u) (@nth (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@tval (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@vbasis F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K)) (@nat_of_ord (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) i)))) (@GRing.scale (GRing.Field.ringType F) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@coord F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vbasis F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) j v) (@nth (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@tval (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@vbasis F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K)) (@nat_of_ord (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) j)))) (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.scale (GRing.Field.ringType F) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@coord F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vbasis F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) i u) (@nth (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@tval (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@vbasis F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K)) (@nat_of_ord (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) i))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) D (@GRing.scale (GRing.Field.ringType F) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@coord F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vbasis F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) j v) (@nth (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@tval (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@vbasis F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K)) (@nat_of_ord (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) j)))))) *) rewrite !(=^~ scalerAl, linearZZ) -!scalerAr linearZZ -!scalerDr !scalerA /=. (* Goal: @eq (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@GRing.scale (GRing.Field.ringType F) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.mul (GRing.Field.ringType F) (@coord F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vbasis F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) i u) (@coord F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vbasis F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) j v)) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) D (@GRing.mul (@GRing.Algebra.ringType (GRing.ComRing.ringType (GRing.Field.comRingType F)) (Phant (GRing.Field.sort F)) (@Falgebra.vect_algType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@nth (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@tval (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@vbasis F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K)) (@nat_of_ord (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) i)) (@nth (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@tval (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@vbasis F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K)) (@nat_of_ord (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) j))))) (@GRing.scale (GRing.Field.ringType F) (@GRing.Lalgebra.lmod_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.mul (GRing.Field.ringType F) (@coord F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vbasis F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) i u) (@coord F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vbasis F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) j v)) (@GRing.add (@GRing.Zmodule.Pack (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@GRing.Ring.base (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@GRing.Lalgebra.base (GRing.Field.ringType F) (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@GRing.Algebra.base (GRing.Field.ringType F) (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@GRing.UnitAlgebra.base (GRing.Field.ringType F) (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@Falgebra.base1 (GRing.Field.ringType F) (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.base (GRing.Field.ringType F) (let '@FieldExt.Pack _ _ T c := L in T) (@FieldExt.class (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))))))) (@GRing.mul (@GRing.Algebra.ringType (GRing.ComRing.ringType (GRing.Field.comRingType F)) (Phant (GRing.Field.sort F)) (@Falgebra.vect_algType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) D (@nth (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@tval (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@vbasis F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K)) (@nat_of_ord (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) i))) (@nth (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@tval (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@vbasis F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K)) (@nat_of_ord (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) j))) (@GRing.mul (@GRing.Algebra.ringType (GRing.ComRing.ringType (GRing.Field.comRingType F)) (Phant (GRing.Field.sort F)) (@Falgebra.vect_algType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@nth (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@tval (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@vbasis F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K)) (@nat_of_ord (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) i)) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) D (@nth (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@tval (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@vbasis F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K)) (@nat_of_ord (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) j)))))) *) by congr (_ *: _); apply/eqP; rewrite (allP (allP derD _ _)) ?memt_nth. Qed. Lemma Derivation_mul_poly (Dp := map_poly D) : {in polyOver K &, forall p q, Dp (p * q) = Dp p * q + p * Dp q}. Proof. (* Goal: @prop_in2 (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@pred_of_vspace F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) K)))) (fun p q : GRing.Ring.sort (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L)))) => @eq (@poly_of (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (Phant (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L)))))) (Dp (@GRing.mul (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L)))) p q)) (@GRing.add (GRing.Ring.zmodType (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))))) (@GRing.mul (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L)))) (Dp p) q) (@GRing.mul (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L)))) p (Dp q)))) (inPhantom (forall p q : GRing.Ring.sort (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L)))), @eq (@poly_of (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (Phant (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L)))))) (Dp (@GRing.mul (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L)))) p q)) (@GRing.add (GRing.Ring.zmodType (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))))) (@GRing.mul (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L)))) (Dp p) q) (@GRing.mul (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L)))) p (Dp q))))) *) move=> p q Kp Kq; apply/polyP=> i; rewrite {}/Dp coefD coef_map /= !coefM. (* Goal: @eq (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) D (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (Finite.sort (ordinal_finType (S i))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (index_enum (ordinal_finType (S i))) (fun j : ordinal (S i) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (ordinal (S i)) j (@GRing.add (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) true (@GRing.mul (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) p) (@nat_of_ord (S i) j)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) q) (subn i (@nat_of_ord (S i) j))))))) (@GRing.add (GRing.Ring.zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (Finite.sort (ordinal_finType (S i))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (index_enum (ordinal_finType (S i))) (fun j : ordinal (S i) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (ordinal (S i)) j (@GRing.add (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) true (@GRing.mul (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@map_poly (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) D) p)) (@nat_of_ord (S i) j)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) q) (subn i (@nat_of_ord (S i) j)))))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (Finite.sort (ordinal_finType (S i))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (index_enum (ordinal_finType (S i))) (fun j : ordinal (S i) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (ordinal (S i)) j (@GRing.add (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) true (@GRing.mul (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) p) (@nat_of_ord (S i) j)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@map_poly (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) D) q)) (subn i (@nat_of_ord (S i) j))))))) *) rewrite linear_sum -big_split; apply: eq_bigr => /= j _. (* Goal: @eq (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) D (@GRing.mul (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@nth (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) p) (@nat_of_ord (S i) j)) (@nth (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) q) (subn i (@nat_of_ord (S i) j))))) (@GRing.add (GRing.Ring.zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@GRing.mul (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@nth (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@map_poly (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) D) p)) (@nat_of_ord (S i) j)) (@nth (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) q) (subn i (@nat_of_ord (S i) j)))) (@GRing.mul (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@nth (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) p) (@nat_of_ord (S i) j)) (@nth (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@map_poly (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) D) q)) (subn i (@nat_of_ord (S i) j))))) *) by rewrite !{1}coef_map Derivation_mul ?(polyOverP _). Qed. End Derivation. Lemma DerivationS E K D : (K <= E)%VS -> Derivation E D -> Derivation K D. Section DerivationAlgebra. Variables (E : {subfield L}) (D : 'End(L)). Hypothesis derD : Derivation E D. Lemma Derivation1 : D 1 = 0. Proof. (* Goal: @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) D (GRing.one (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))))) (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) *) apply: (addIr (D (1 * 1))); rewrite add0r {1}mul1r. (* Goal: @eq (GRing.Zmodule.sort (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@GRing.add (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) D (GRing.one (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) D (GRing.one (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L)))))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) D (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (GRing.one (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L)))) (GRing.one (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L)))))) *) by rewrite (Derivation_mul derD) ?mem1v // mulr1 mul1r. Qed. Lemma Derivation_scalar x : x \in 1%VS -> D x = 0. Proof. (* Goal: forall _ : is_true (@in_mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) x (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))))), @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) D x) (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) *) by case/vlineP=> y ->; rewrite linearZ /= Derivation1 scaler0. Qed. Lemma Derivation_exp x m : x \in E -> D (x ^+ m) = x ^+ m.-1 *+ m * D x. Proof. (* Goal: forall _ : is_true (@in_mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) x (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E)))), @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) D (@GRing.exp (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) x m)) (@GRing.mul (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.natmul (GRing.Ring.zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.exp (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) x (Nat.pred m)) m) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) D x)) *) move=> Ex; case: m; first by rewrite expr0 mulr0n mul0r Derivation1. (* Goal: forall n : nat, @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) D (@GRing.exp (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) x (S n))) (@GRing.mul (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.natmul (GRing.Ring.zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.exp (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) x (Nat.pred (S n))) (S n)) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) D x)) *) elim=> [|m IHm]; first by rewrite mul1r. (* Goal: @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) D (@GRing.exp (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) x (S (S m)))) (@GRing.mul (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.natmul (GRing.Ring.zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.exp (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) x (Nat.pred (S (S m)))) (S (S m))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) D x)) *) rewrite exprS (Derivation_mul derD) //; last by apply: rpredX. (* Goal: @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.add (GRing.Ring.zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L)))) (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) D x) (@GRing.exp (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) x (S m))) (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) x (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) D (@GRing.exp (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) x (S m))))) (@GRing.mul (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.natmul (GRing.Ring.zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.exp (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) x (Nat.pred (S (S m)))) (S (S m))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) D x)) *) by rewrite mulrC IHm mulrA mulrnAr -exprS -mulrDl. Qed. Lemma Derivation_horner p x : p \is a polyOver E -> x \in E -> D p.[x] = (map_poly D p).[x] + p^`().[x] * D x. End DerivationAlgebra. Definition separable_element U x := separable_poly (minPoly U x). Section SeparableElement. Variables (K : {subfield L}) (x : L). Let sKxK : (K <= <<K; x>>)%VS := subv_adjoin K x. Let Kx_x : x \in <<K; x>>%VS := memv_adjoin K x. Lemma separable_elementP : reflect (exists f, [/\ f \is a polyOver K, root f x & separable_poly f]) (separable_element K x). Proof. (* Goal: Bool.reflect (@ex (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (fun f : @poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) => and3 (is_true (@in_mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) f (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K))))))) (is_true (@root (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) f x)) (is_true (@separable_poly (@FieldExt.vect_idomainType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f)))) (separable_element (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x) *) apply: (iffP idP) => [sep_x | [f [Kf /(minPoly_dvdp Kf)/dvdpP[g ->]]]]. (* Goal: forall _ : is_true (@separable_poly (@FieldExt.vect_idomainType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@GRing.mul (poly_ringType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) g (@minPoly F L (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x))), is_true (separable_element (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x) *) (* Goal: @ex (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (fun f : @poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) => and3 (is_true (@in_mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) f (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K))))))) (is_true (@root (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) f x)) (is_true (@separable_poly (@FieldExt.vect_idomainType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f))) *) by exists (minPoly K x); rewrite minPolyOver root_minPoly. (* Goal: forall _ : is_true (@separable_poly (@FieldExt.vect_idomainType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@GRing.mul (poly_ringType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) g (@minPoly F L (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x))), is_true (separable_element (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x) *) by rewrite separable_mul => /and3P[]. Qed. Lemma base_separable : x \in K -> separable_element K x. Lemma separable_nz_der : separable_element K x = ((minPoly K x)^`() != 0). Lemma separablePn : reflect (exists2 p, p \in [char L] & exists2 g, g \is a polyOver K & minPoly K x = g \Po 'X^p) (~~ separable_element K x). Proof. (* Goal: Bool.reflect (@ex2 nat (fun p : nat => is_true (@in_mem nat p (@mem nat nat_pred_pred (@GRing.char (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))))) (fun p : nat => @ex2 (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (fun g : @poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) => is_true (@in_mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) g (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K))))))) (fun g : @poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) => @eq (@poly_of (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@minPoly F L (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x) (@comp_poly (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.exp (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (polyX (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) p) g)))) (negb (separable_element (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x)) *) rewrite separable_nz_der negbK; set f := minPoly K x. (* Goal: Bool.reflect (@ex2 nat (fun p : nat => is_true (@in_mem nat p (@mem nat nat_pred_pred (@GRing.char (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))))) (fun p : nat => @ex2 (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (fun g : @poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) => is_true (@in_mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) g (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K))))))) (fun g : @poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) => @eq (@poly_of (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) f (@comp_poly (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.exp (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (polyX (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) p) g)))) (@eq_op (poly_eqType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@deriv (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) (GRing.zero (poly_zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) *) apply: (iffP eqP) => [f'0 | [p Hp [g _ ->]]]; last first. (* Goal: @ex2 nat (fun p : nat => is_true (@in_mem nat p (@mem nat nat_pred_pred (@GRing.char (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))))) (fun p : nat => @ex2 (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (fun g : @poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) => is_true (@in_mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) g (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K))))))) (fun g : @poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) => @eq (@poly_of (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) f (@comp_poly (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.exp (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (polyX (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) p) g))) *) (* Goal: @eq (Equality.sort (poly_eqType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@deriv (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@comp_poly (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.exp (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (polyX (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) p) g)) (GRing.zero (poly_zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) *) by rewrite deriv_comp derivXn -scaler_nat (charf0 Hp) scale0r mulr0. (* Goal: @ex2 nat (fun p : nat => is_true (@in_mem nat p (@mem nat nat_pred_pred (@GRing.char (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))))) (fun p : nat => @ex2 (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (fun g : @poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) => is_true (@in_mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) g (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K))))))) (fun g : @poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) => @eq (@poly_of (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) f (@comp_poly (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.exp (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (polyX (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) p) g))) *) pose n := adjoin_degree K x; have sz_f: size f = n.+1 := size_minPoly K x. (* Goal: @ex2 nat (fun p : nat => is_true (@in_mem nat p (@mem nat nat_pred_pred (@GRing.char (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))))) (fun p : nat => @ex2 (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (fun g : @poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) => is_true (@in_mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) g (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K))))))) (fun g : @poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) => @eq (@poly_of (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) f (@comp_poly (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.exp (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (polyX (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) p) g))) *) have fn1: f`_n = 1 by rewrite -(monicP (monic_minPoly K x)) lead_coefE sz_f. (* Goal: @ex2 nat (fun p : nat => is_true (@in_mem nat p (@mem nat nat_pred_pred (@GRing.char (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))))) (fun p : nat => @ex2 (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (fun g : @poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) => is_true (@in_mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) g (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K))))))) (fun g : @poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) => @eq (@poly_of (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) f (@comp_poly (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.exp (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (polyX (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) p) g))) *) have dimKx: (adjoin_degree K x)%:R == 0 :> L. (* Goal: @ex2 nat (fun p : nat => is_true (@in_mem nat p (@mem nat nat_pred_pred (@GRing.char (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))))) (fun p : nat => @ex2 (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (fun g : @poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) => is_true (@in_mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) g (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K))))))) (fun g : @poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) => @eq (@poly_of (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) f (@comp_poly (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.exp (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (polyX (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) p) g))) *) (* Goal: is_true (@eq_op (@FieldExt.eqType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@GRing.natmul (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (GRing.one (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@adjoin_degree F L (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x)) (GRing.zero (@FieldExt.zmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) *) by rewrite -(coef0 _ n.-1) -f'0 coef_deriv fn1. (* Goal: @ex2 nat (fun p : nat => is_true (@in_mem nat p (@mem nat nat_pred_pred (@GRing.char (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))))) (fun p : nat => @ex2 (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (fun g : @poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) => is_true (@in_mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) g (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K))))))) (fun g : @poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) => @eq (@poly_of (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) f (@comp_poly (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.exp (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (polyX (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) p) g))) *) have /natf0_char[// | p charLp] := dimKx. (* Goal: @ex2 nat (fun p : nat => is_true (@in_mem nat p (@mem nat nat_pred_pred (@GRing.char (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))))) (fun p : nat => @ex2 (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (fun g : @poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) => is_true (@in_mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) g (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K))))))) (fun g : @poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) => @eq (@poly_of (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) f (@comp_poly (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.exp (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (polyX (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) p) g))) *) have /dvdnP[r Dn]: (p %| n)%N by rewrite (dvdn_charf charLp). (* Goal: @ex2 nat (fun p : nat => is_true (@in_mem nat p (@mem nat nat_pred_pred (@GRing.char (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))))) (fun p : nat => @ex2 (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (fun g : @poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) => is_true (@in_mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) g (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K))))))) (fun g : @poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) => @eq (@poly_of (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) f (@comp_poly (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.exp (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (polyX (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) p) g))) *) exists p => //; exists (\poly_(i < r.+1) f`_(i * p)). (* Goal: @eq (@poly_of (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) f (@comp_poly (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.exp (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (polyX (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) p) (@poly (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (S r) (fun i : nat => @nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) (muln i p)))) *) (* Goal: is_true (@in_mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@poly (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (S r) (fun i : nat => @nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) (muln i p))) (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K)))))) *) by apply: polyOver_poly => i _; rewrite (polyOverP _) ?minPolyOver. (* Goal: @eq (@poly_of (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) f (@comp_poly (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.exp (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (polyX (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) p) (@poly (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (S r) (fun i : nat => @nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) (muln i p)))) *) rewrite comp_polyE size_poly_eq -?Dn ?fn1 ?oner_eq0 //. (* Goal: @eq (@poly_of (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) f (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@GRing.Lalgebra.lmod_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (poly_lalgType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@GRing.Lmodule.base (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.Lmodule.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@GRing.Lalgebra.lmod_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (poly_lalgType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@GRing.Lmodule.class (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@GRing.Lalgebra.lmod_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (poly_lalgType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))))))) (Finite.sort (ordinal_finType (S r))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@GRing.Lalgebra.lmod_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (poly_lalgType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@GRing.Lmodule.base (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.Lmodule.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@GRing.Lalgebra.lmod_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (poly_lalgType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@GRing.Lmodule.class (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@GRing.Lalgebra.lmod_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (poly_lalgType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))))))) (index_enum (ordinal_finType (S r))) (fun i : ordinal (S r) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@GRing.Lalgebra.lmod_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (poly_lalgType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@GRing.Lmodule.base (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.Lmodule.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@GRing.Lalgebra.lmod_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (poly_lalgType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@GRing.Lmodule.class (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@GRing.Lalgebra.lmod_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (poly_lalgType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))))))) (ordinal (S r)) i (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@GRing.Lalgebra.lmod_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (poly_lalgType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@GRing.Lmodule.base (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.Lmodule.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@GRing.Lalgebra.lmod_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (poly_lalgType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@GRing.Lmodule.class (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@GRing.Lalgebra.lmod_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (poly_lalgType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))))))) true (@GRing.scale (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.Lalgebra.lmod_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (poly_lalgType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (GRing.zero (GRing.Ring.zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@polyseq (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@poly (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (S r) (fun i0 : nat => @nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) (muln i0 p)))) (@nat_of_ord (S r) i)) (@GRing.exp (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.exp (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (polyX (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) p) (@nat_of_ord (S r) i))))) *) have pr_p := charf_prime charLp; have p_gt0 := prime_gt0 pr_p. (* Goal: @eq (@poly_of (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) f (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@GRing.Lalgebra.lmod_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (poly_lalgType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@GRing.Lmodule.base (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.Lmodule.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@GRing.Lalgebra.lmod_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (poly_lalgType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@GRing.Lmodule.class (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@GRing.Lalgebra.lmod_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (poly_lalgType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))))))) (Finite.sort (ordinal_finType (S r))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@GRing.Lalgebra.lmod_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (poly_lalgType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@GRing.Lmodule.base (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.Lmodule.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@GRing.Lalgebra.lmod_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (poly_lalgType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@GRing.Lmodule.class (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@GRing.Lalgebra.lmod_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (poly_lalgType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))))))) (index_enum (ordinal_finType (S r))) (fun i : ordinal (S r) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@GRing.Lalgebra.lmod_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (poly_lalgType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@GRing.Lmodule.base (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.Lmodule.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@GRing.Lalgebra.lmod_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (poly_lalgType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@GRing.Lmodule.class (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@GRing.Lalgebra.lmod_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (poly_lalgType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))))))) (ordinal (S r)) i (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@GRing.Lalgebra.lmod_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (poly_lalgType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@GRing.Lmodule.base (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.Lmodule.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@GRing.Lalgebra.lmod_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (poly_lalgType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@GRing.Lmodule.class (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@GRing.Lalgebra.lmod_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (poly_lalgType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))))))) true (@GRing.scale (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.Lalgebra.lmod_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (poly_lalgType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (GRing.zero (GRing.Ring.zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@polyseq (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@poly (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (S r) (fun i0 : nat => @nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) (muln i0 p)))) (@nat_of_ord (S r) i)) (@GRing.exp (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.exp (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (polyX (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) p) (@nat_of_ord (S r) i))))) *) apply/polyP=> i; rewrite coef_sum. (* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) i) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (Finite.sort (ordinal_finType (S r))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (index_enum (ordinal_finType (S r))) (fun i0 : Finite.sort (ordinal_finType (S r)) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (Finite.sort (ordinal_finType (S r))) i0 (@GRing.add (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) true (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@GRing.scale (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.Lalgebra.lmod_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (poly_lalgType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (GRing.zero (GRing.Ring.zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@polyseq (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@poly (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (S r) (fun i : nat => @nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) (muln i p)))) (@nat_of_ord (S r) i0)) (@GRing.exp (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.exp (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (polyX (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) p) (@nat_of_ord (S r) i0)))) i))) *) have [[{i} i ->] | p'i] := altP (@dvdnP p i); last first. (* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) (muln i p)) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (Finite.sort (ordinal_finType (S r))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (index_enum (ordinal_finType (S r))) (fun i0 : Finite.sort (ordinal_finType (S r)) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (Finite.sort (ordinal_finType (S r))) i0 (@GRing.add (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) true (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@GRing.scale (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.Lalgebra.lmod_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (poly_lalgType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (GRing.zero (GRing.Ring.zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@polyseq (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@poly (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (S r) (fun i : nat => @nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) (muln i p)))) (@nat_of_ord (S r) i0)) (@GRing.exp (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.exp (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (polyX (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) p) (@nat_of_ord (S r) i0)))) (muln i p)))) *) (* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) i) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (Finite.sort (ordinal_finType (S r))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (index_enum (ordinal_finType (S r))) (fun i0 : Finite.sort (ordinal_finType (S r)) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (Finite.sort (ordinal_finType (S r))) i0 (@GRing.add (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) true (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@GRing.scale (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.Lalgebra.lmod_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (poly_lalgType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (GRing.zero (GRing.Ring.zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@polyseq (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@poly (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (S r) (fun i : nat => @nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) (muln i p)))) (@nat_of_ord (S r) i0)) (@GRing.exp (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.exp (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (polyX (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) p) (@nat_of_ord (S r) i0)))) i))) *) rewrite big1 => [|j _]; last first. (* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) (muln i p)) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (Finite.sort (ordinal_finType (S r))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (index_enum (ordinal_finType (S r))) (fun i0 : Finite.sort (ordinal_finType (S r)) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (Finite.sort (ordinal_finType (S r))) i0 (@GRing.add (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) true (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@GRing.scale (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.Lalgebra.lmod_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (poly_lalgType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (GRing.zero (GRing.Ring.zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@polyseq (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@poly (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (S r) (fun i : nat => @nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) (muln i p)))) (@nat_of_ord (S r) i0)) (@GRing.exp (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.exp (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (polyX (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) p) (@nat_of_ord (S r) i0)))) (muln i p)))) *) (* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) i) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) *) (* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@GRing.scale (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.Lalgebra.lmod_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (poly_lalgType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (GRing.zero (GRing.Ring.zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@polyseq (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@poly (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (S r) (fun i : nat => @nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) (muln i p)))) (@nat_of_ord (S r) j)) (@GRing.exp (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.exp (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (polyX (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) p) (@nat_of_ord (S r) j)))) i) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) *) rewrite coefZ -exprM coefXn [_ == _](contraNF _ p'i) ?mulr0 // => /eqP->. (* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) (muln i p)) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (Finite.sort (ordinal_finType (S r))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (index_enum (ordinal_finType (S r))) (fun i0 : Finite.sort (ordinal_finType (S r)) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (Finite.sort (ordinal_finType (S r))) i0 (@GRing.add (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) true (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@GRing.scale (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.Lalgebra.lmod_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (poly_lalgType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (GRing.zero (GRing.Ring.zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@polyseq (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@poly (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (S r) (fun i : nat => @nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) (muln i p)))) (@nat_of_ord (S r) i0)) (@GRing.exp (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.exp (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (polyX (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) p) (@nat_of_ord (S r) i0)))) (muln i p)))) *) (* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) i) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) *) (* Goal: is_true (dvdn p (muln p (@nat_of_ord (S r) j))) *) by rewrite dvdn_mulr. (* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) (muln i p)) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (Finite.sort (ordinal_finType (S r))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (index_enum (ordinal_finType (S r))) (fun i0 : Finite.sort (ordinal_finType (S r)) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (Finite.sort (ordinal_finType (S r))) i0 (@GRing.add (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) true (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@GRing.scale (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.Lalgebra.lmod_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (poly_lalgType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (GRing.zero (GRing.Ring.zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@polyseq (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@poly (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (S r) (fun i : nat => @nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) (muln i p)))) (@nat_of_ord (S r) i0)) (@GRing.exp (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.exp (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (polyX (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) p) (@nat_of_ord (S r) i0)))) (muln i p)))) *) (* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) i) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) *) rewrite (dvdn_charf charLp) in p'i; apply: mulfI p'i _ _ _. (* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) (muln i p)) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (Finite.sort (ordinal_finType (S r))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (index_enum (ordinal_finType (S r))) (fun i0 : Finite.sort (ordinal_finType (S r)) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (Finite.sort (ordinal_finType (S r))) i0 (@GRing.add (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) true (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@GRing.scale (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.Lalgebra.lmod_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (poly_lalgType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (GRing.zero (GRing.Ring.zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@polyseq (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@poly (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (S r) (fun i : nat => @nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) (muln i p)))) (@nat_of_ord (S r) i0)) (@GRing.exp (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.exp (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (polyX (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) p) (@nat_of_ord (S r) i0)))) (muln i p)))) *) (* Goal: @eq (GRing.Ring.sort (GRing.IntegralDomain.ringType (@FieldExt.idomainType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.mul (GRing.IntegralDomain.ringType (@FieldExt.idomainType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.natmul (GRing.Ring.zmodType (GRing.IntegralDomain.ringType (@FieldExt.idomainType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (GRing.one (GRing.IntegralDomain.ringType (@FieldExt.idomainType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) i) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) i)) (@GRing.mul (GRing.IntegralDomain.ringType (@FieldExt.idomainType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.natmul (GRing.Ring.zmodType (GRing.IntegralDomain.ringType (@FieldExt.idomainType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (GRing.one (GRing.IntegralDomain.ringType (@FieldExt.idomainType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) i) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) *) by rewrite mulr0 mulr_natl; case: i => // i; rewrite -coef_deriv f'0 coef0. (* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) (muln i p)) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (Finite.sort (ordinal_finType (S r))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (index_enum (ordinal_finType (S r))) (fun i0 : Finite.sort (ordinal_finType (S r)) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (Finite.sort (ordinal_finType (S r))) i0 (@GRing.add (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) true (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@GRing.scale (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.Lalgebra.lmod_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (poly_lalgType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (GRing.zero (GRing.Ring.zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@polyseq (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@poly (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (S r) (fun i : nat => @nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) (muln i p)))) (@nat_of_ord (S r) i0)) (@GRing.exp (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.exp (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (polyX (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) p) (@nat_of_ord (S r) i0)))) (muln i p)))) *) have [ltri | leir] := leqP r.+1 i. (* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) (muln i p)) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (Finite.sort (ordinal_finType (S r))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (index_enum (ordinal_finType (S r))) (fun i0 : Finite.sort (ordinal_finType (S r)) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (Finite.sort (ordinal_finType (S r))) i0 (@GRing.add (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) true (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@GRing.scale (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.Lalgebra.lmod_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (poly_lalgType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (GRing.zero (GRing.Ring.zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@polyseq (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@poly (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (S r) (fun i : nat => @nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) (muln i p)))) (@nat_of_ord (S r) i0)) (@GRing.exp (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.exp (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (polyX (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) p) (@nat_of_ord (S r) i0)))) (muln i p)))) *) (* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) (muln i p)) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (Finite.sort (ordinal_finType (S r))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (index_enum (ordinal_finType (S r))) (fun i0 : Finite.sort (ordinal_finType (S r)) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (Finite.sort (ordinal_finType (S r))) i0 (@GRing.add (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) true (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@GRing.scale (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.Lalgebra.lmod_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (poly_lalgType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (GRing.zero (GRing.Ring.zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@polyseq (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@poly (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (S r) (fun i : nat => @nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) (muln i p)))) (@nat_of_ord (S r) i0)) (@GRing.exp (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.exp (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (polyX (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) p) (@nat_of_ord (S r) i0)))) (muln i p)))) *) rewrite nth_default ?sz_f ?Dn ?ltn_pmul2r ?big1 // => j _. (* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) (muln i p)) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (Finite.sort (ordinal_finType (S r))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (index_enum (ordinal_finType (S r))) (fun i0 : Finite.sort (ordinal_finType (S r)) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (Finite.sort (ordinal_finType (S r))) i0 (@GRing.add (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) true (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@GRing.scale (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.Lalgebra.lmod_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (poly_lalgType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (GRing.zero (GRing.Ring.zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@polyseq (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@poly (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (S r) (fun i : nat => @nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) (muln i p)))) (@nat_of_ord (S r) i0)) (@GRing.exp (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.exp (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (polyX (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) p) (@nat_of_ord (S r) i0)))) (muln i p)))) *) (* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@GRing.scale (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.Lalgebra.lmod_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (poly_lalgType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (GRing.zero (GRing.Ring.zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@polyseq (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@poly (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (S r) (fun i : nat => @nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) (muln i p)))) (@nat_of_ord (S r) j)) (@GRing.exp (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.exp (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (polyX (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) p) (@nat_of_ord (S r) j)))) (muln i p)) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) *) rewrite coefZ -exprM coefXn mulnC gtn_eqF ?mulr0 //. (* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) (muln i p)) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (Finite.sort (ordinal_finType (S r))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (index_enum (ordinal_finType (S r))) (fun i0 : Finite.sort (ordinal_finType (S r)) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (Finite.sort (ordinal_finType (S r))) i0 (@GRing.add (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) true (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@GRing.scale (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.Lalgebra.lmod_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (poly_lalgType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (GRing.zero (GRing.Ring.zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@polyseq (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@poly (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (S r) (fun i : nat => @nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) (muln i p)))) (@nat_of_ord (S r) i0)) (@GRing.exp (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.exp (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (polyX (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) p) (@nat_of_ord (S r) i0)))) (muln i p)))) *) (* Goal: is_true (leq (S (muln p (@nat_of_ord (S r) j))) (muln p i)) *) by rewrite ltn_pmul2l ?(leq_trans _ ltri). (* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) (muln i p)) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (Finite.sort (ordinal_finType (S r))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (index_enum (ordinal_finType (S r))) (fun i0 : Finite.sort (ordinal_finType (S r)) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (Finite.sort (ordinal_finType (S r))) i0 (@GRing.add (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) true (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@GRing.scale (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.Lalgebra.lmod_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (poly_lalgType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (GRing.zero (GRing.Ring.zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@polyseq (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@poly (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (S r) (fun i : nat => @nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) (muln i p)))) (@nat_of_ord (S r) i0)) (@GRing.exp (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.exp (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (polyX (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) p) (@nat_of_ord (S r) i0)))) (muln i p)))) *) rewrite (bigD1 (Sub i _)) //= big1 ?addr0 => [|j i'j]; last first. (* Goal: @eq (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@nth (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) (muln i p)) (@nth (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@GRing.scale (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.Lalgebra.lmod_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (poly_lalgType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@nth (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (GRing.zero (GRing.Ring.zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@polyseq (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@poly (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (S r) (fun i : nat => @nth (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) (muln i p)))) i) (@GRing.exp (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.exp (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (polyX (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) p) i))) (muln i p)) *) (* Goal: @eq (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@nth (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@GRing.scale (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.Lalgebra.lmod_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (poly_lalgType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@nth (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (GRing.zero (GRing.Ring.zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@polyseq (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@poly (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (S r) (fun i : nat => @nth (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) (muln i p)))) (@nat_of_ord (S r) j)) (@GRing.exp (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.exp (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (polyX (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) p) (@nat_of_ord (S r) j)))) (muln i p)) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) *) by rewrite coefZ -exprM coefXn mulnC eqn_pmul2l // mulr_natr mulrb ifN_eqC. (* Goal: @eq (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@nth (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) (muln i p)) (@nth (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@GRing.scale (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.Lalgebra.lmod_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (poly_lalgType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@nth (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (GRing.zero (GRing.Ring.zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@polyseq (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@poly (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (S r) (fun i : nat => @nth (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) f) (muln i p)))) i) (@GRing.exp (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.exp (poly_ringType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (polyX (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) p) i))) (muln i p)) *) by rewrite coef_poly leir coefZ -exprM coefXn mulnC eqxx mulr1. Qed. Lemma separable_root_der : separable_element K x (+) root (minPoly K x)^`() x. Proof. (* Goal: is_true (addb (separable_element (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x) (@root (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@deriv (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@minPoly F L (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x)) x)) *) have KpKx': _^`() \is a polyOver K := polyOver_deriv (minPolyOver K x). (* Goal: is_true (addb (separable_element (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x) (@root (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@deriv (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@minPoly F L (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x)) x)) *) rewrite separable_nz_der addNb (root_small_adjoin_poly KpKx') ?addbb //. (* Goal: is_true (leq (@size (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@polyseq (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@deriv (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@minPoly F L (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x)))) (@adjoin_degree F L (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x)) *) by rewrite (leq_trans (size_poly _ _)) ?size_minPoly. Qed. Lemma Derivation_separable D : Derivation <<K; x>> D -> separable_element K x -> D x = - (map_poly D (minPoly K x)).[x] / (minPoly K x)^`().[x]. Proof. (* Goal: forall (_ : is_true (Derivation (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) x))) D)) (_ : is_true (separable_element (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x)), @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) D x) (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@GRing.opp (GRing.Ring.zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L)))) (@horner (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@map_poly (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) D) (@minPoly F L (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x)) x)) (@GRing.inv (@FieldExt.unitRingType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@horner (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@deriv (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@minPoly F L (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x)) x))) *) move=> derD sepKx; have:= separable_root_der; rewrite {}sepKx -sub0r => nzKx'x. (* Goal: @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) D x) (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@GRing.add (GRing.Ring.zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L)))) (GRing.zero (GRing.Ring.zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))))) (@GRing.opp (GRing.Ring.zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L)))) (@horner (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@map_poly (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) D) (@minPoly F L (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x)) x))) (@GRing.inv (@FieldExt.unitRingType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@horner (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@deriv (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@minPoly F L (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x)) x))) *) apply: canRL (mulfK nzKx'x) (canRL (addrK _) _); rewrite mulrC addrC. (* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@GRing.add (GRing.Ring.zmodType (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@horner (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@map_poly (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) D) (@minPoly F L (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x)) x) (@GRing.mul (GRing.ComRing.ringType (GRing.Field.comRingType (@FieldExt.fieldType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@horner (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@deriv (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@minPoly F L (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x)) x) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) D x))) (GRing.zero (GRing.Ring.zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))))) *) rewrite -(Derivation_horner derD) ?minPolyxx ?linear0 //. (* Goal: is_true (@in_mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@minPoly F L (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x) (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@agenv_aspace F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) x))))))))) *) exact: polyOverSv sKxK _ (minPolyOver _ _). Qed. Section ExtendDerivation. Variable D : 'End(L). Let Dx E := - (map_poly D (minPoly E x)).[x] / ((minPoly E x)^`()).[x]. Fact extendDerivation_subproof E (adjEx := Fadjoin_poly E x) : let body y (p := adjEx y) := (map_poly D p).[x] + p^`().[x] * Dx E in Definition extendDerivation E : 'End(L) := linfun (Linear (extendDerivation_subproof E)). Hypothesis derD : Derivation K D. Lemma extendDerivation_id y : y \in K -> extendDerivation K y = D y. Proof. (* Goal: forall _ : is_true (@in_mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) y (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K)))), @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (extendDerivation K) y) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) D y) *) move=> yK; rewrite lfunE /= Fadjoin_polyC // derivC map_polyC hornerC. (* Goal: @eq (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@GRing.add (GRing.Ring.zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@GRing.Additive.apply (GRing.Ring.zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (GRing.Ring.zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (Phant (forall _ : GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))), GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@lfun_additive (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) D) y) (@GRing.mul (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@horner (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (GRing.zero (poly_zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) x) (Dx K))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) D y) *) by rewrite horner0 mul0r addr0. Qed. Lemma extendDerivation_horner p : p \is a polyOver K -> separable_element K x -> extendDerivation K p.[x] = (map_poly D p).[x] + p^`().[x] * Dx K. Proof. (* Goal: forall (_ : is_true (@in_mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) p (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K))))))) (_ : is_true (separable_element (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x)), @eq (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (extendDerivation K) (@horner (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) p x)) (@GRing.add (GRing.Ring.zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L)))) (@horner (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@map_poly (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) D) p) x) (@GRing.mul (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@horner (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@deriv (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) p) x) (Dx K))) *) move=> Kp sepKx; have:= separable_root_der; rewrite {}sepKx /= => nz_pKx'x. (* Goal: @eq (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (extendDerivation K) (@horner (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) p x)) (@GRing.add (GRing.Ring.zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@horner (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@map_poly (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) D) p) x) (@GRing.mul (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@horner (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@deriv (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) p) x) (Dx K))) *) rewrite {-1}(divp_eq p (minPoly K x)) lfunE /= Fadjoin_poly_mod // raddfD /=. (* Goal: @eq (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@GRing.add (GRing.Ring.zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@horner (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@map_poly (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) D) (Pdiv.Field.modp (@FieldExt.vect_idomainType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) p (@minPoly F L (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x))) x) (@GRing.mul (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@horner (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@deriv (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (Pdiv.Field.modp (@FieldExt.vect_idomainType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) p (@minPoly F L (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x))) x) (Dx K))) (@GRing.add (GRing.Ring.zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@horner (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.add (poly_zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@map_poly (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) D) (@GRing.mul (@GRing.Lalgebra.ringType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (poly_lalgType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))))) (Pdiv.Field.divp (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) p (@minPoly F L (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x)) (@minPoly F L (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x))) (@map_poly (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) D) (Pdiv.Field.modp (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) p (@minPoly F L (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x)))) x) (@GRing.mul (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@horner (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@deriv (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.add (GRing.Ring.zmodType (@GRing.Lalgebra.ringType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (poly_lalgType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))))) (@GRing.mul (@GRing.Lalgebra.ringType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (poly_lalgType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))))) (Pdiv.Field.divp (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) p (@minPoly F L (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x)) (@minPoly F L (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x)) (Pdiv.Field.modp (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) p (@minPoly F L (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x)))) x) (Dx K))) *) rewrite {1}(Derivation_mul_poly derD) ?divp_polyOver ?minPolyOver //. (* Goal: @eq (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@GRing.add (GRing.Ring.zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@horner (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@map_poly (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) D) (Pdiv.Field.modp (@FieldExt.vect_idomainType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) p (@minPoly F L (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x))) x) (@GRing.mul (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@horner (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@deriv (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (Pdiv.Field.modp (@FieldExt.vect_idomainType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) p (@minPoly F L (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x))) x) (Dx K))) (@GRing.add (GRing.Ring.zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@horner (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.add (poly_zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@GRing.add (GRing.Ring.zmodType (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))))) (@GRing.mul (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L)))) (@map_poly (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) D) (Pdiv.Field.divp (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) p (@minPoly F L (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x))) (@minPoly F L (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x)) (@GRing.mul (poly_ringType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L)))) (Pdiv.Field.divp (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) p (@minPoly F L (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x)) (@map_poly (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) D) (@minPoly F L (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x)))) (@map_poly (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) D) (Pdiv.Field.modp (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) p (@minPoly F L (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x)))) x) (@GRing.mul (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@horner (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@deriv (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.add (GRing.Ring.zmodType (@GRing.Lalgebra.ringType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (poly_lalgType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))))) (@GRing.mul (@GRing.Lalgebra.ringType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (poly_lalgType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))))) (Pdiv.Field.divp (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) p (@minPoly F L (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x)) (@minPoly F L (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x)) (Pdiv.Field.modp (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) p (@minPoly F L (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x)))) x) (Dx K))) *) rewrite derivD derivM !{1}hornerD !{1}hornerM minPolyxx !{1}mulr0 !{1}add0r. (* Goal: @eq (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@GRing.add (GRing.Ring.zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@horner (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@map_poly (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) D) (Pdiv.Field.modp (@FieldExt.vect_idomainType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) p (@minPoly F L (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x))) x) (@GRing.mul (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@horner (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@deriv (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (Pdiv.Field.modp (@FieldExt.vect_idomainType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) p (@minPoly F L (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x))) x) (Dx K))) (@GRing.add (GRing.Ring.zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@GRing.add (GRing.Ring.zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@GRing.mul (GRing.ComRing.ringType (@FieldExt.lalg_comRingType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@horner (GRing.ComRing.ringType (@FieldExt.lalg_comRingType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Pdiv.Field.divp (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) p (@minPoly F L (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x)) x) (@horner (GRing.ComRing.ringType (@FieldExt.lalg_comRingType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@map_poly (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) D) (@minPoly F L (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x)) x)) (@horner (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@map_poly (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) D) (Pdiv.Field.modp (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) p (@minPoly F L (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x))) x)) (@GRing.mul (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.add (GRing.Ring.zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.mul (GRing.ComRing.ringType (@FieldExt.vect_comRingType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@horner (GRing.ComRing.ringType (@FieldExt.vect_comRingType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Pdiv.Field.divp (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) p (@minPoly F L (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x)) x) (@horner (GRing.ComRing.ringType (@FieldExt.vect_comRingType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@deriv (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@minPoly F L (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x)) x)) (@horner (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@deriv (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Pdiv.Field.modp (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) p (@minPoly F L (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x))) x)) (Dx K))) *) rewrite mulrDl addrA [_ + (_ * _ * _)]addrC {2}/Dx -mulrA -/Dx. (* Goal: @eq (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@GRing.add (GRing.Ring.zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@horner (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@map_poly (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) D) (Pdiv.Field.modp (@FieldExt.vect_idomainType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) p (@minPoly F L (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x))) x) (@GRing.mul (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@horner (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@deriv (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (Pdiv.Field.modp (@FieldExt.vect_idomainType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) p (@minPoly F L (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x))) x) (Dx K))) (@GRing.add (GRing.Ring.zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@GRing.add (GRing.Ring.zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@horner (GRing.ComRing.ringType (@FieldExt.vect_comRingType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Pdiv.Field.divp (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) p (@minPoly F L (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x)) x) (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@horner (GRing.ComRing.ringType (@FieldExt.vect_comRingType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@deriv (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@minPoly F L (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x)) x) (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@GRing.opp (GRing.Ring.zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L)))) (@horner (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@map_poly (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) D) (@minPoly F L (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x)) x)) (@GRing.inv (@FieldExt.unitRingType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@horner (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@deriv (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@minPoly F L (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x)) x))))) (@GRing.add (GRing.Ring.zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@GRing.mul (GRing.ComRing.ringType (@FieldExt.lalg_comRingType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@horner (GRing.ComRing.ringType (@FieldExt.lalg_comRingType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Pdiv.Field.divp (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) p (@minPoly F L (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x)) x) (@horner (GRing.ComRing.ringType (@FieldExt.lalg_comRingType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@map_poly (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) D) (@minPoly F L (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x)) x)) (@horner (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@map_poly (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) D) (Pdiv.Field.modp (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) p (@minPoly F L (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x))) x))) (@GRing.mul (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@horner (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@deriv (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Pdiv.Field.modp (GRing.Field.idomainType (@FieldExt.vect_fieldType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) p (@minPoly F L (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x))) x) (Dx K))) *) by rewrite [_ / _]mulrC (mulVKf nz_pKx'x) mulrN addKr. Qed. Lemma extendDerivationP : separable_element K x -> Derivation <<K; x>> (extendDerivation K). End ExtendDerivation. Lemma Derivation_separableP : reflect (forall D, Derivation <<K; x>> D -> K <= lker D -> <<K; x>> <= lker D)%VS (separable_element K x). End SeparableElement. Arguments separable_elementP {K x}. Lemma separable_elementS K E x : (K <= E)%VS -> separable_element K x -> separable_element E x. Lemma adjoin_separableP {K x} : reflect (forall y, y \in <<K; x>>%VS -> separable_element K y) (separable_element K x). Proof. (* Goal: Bool.reflect (forall (y : @Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (_ : is_true (@in_mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) y (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) x))))))), is_true (separable_element (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) y)) (separable_element (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x) *) apply: (iffP idP) => [sepKx | -> //]; last exact: memv_adjoin. (* Goal: forall (y : @Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (_ : is_true (@in_mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) y (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) x))))))), is_true (separable_element (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) y) *) move=> _ /Fadjoin_polyP[q Kq ->]; apply/Derivation_separableP=> D derD DK_0. (* Goal: is_true (@subsetv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@horner (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) q x)))) (@lker F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) D)) *) apply/subvP=> _ /Fadjoin_polyP[p Kp ->]. (* Goal: is_true (@in_mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@horner (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) p (@horner (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) q x)) (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@lker F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) D)))) *) rewrite memv_ker -(extendDerivation_id x D (mempx_Fadjoin _ Kp)). (* Goal: is_true (@eq_op (@GRing.Lmodule.eqType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (extendDerivation x D (@agenv_aspace F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@horner (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) q x))))) (@horner (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) p (@horner (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) q x))) (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) *) have sepFyx: (separable_element <<K; q.[x]>> x). (* Goal: is_true (@eq_op (@GRing.Lmodule.eqType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (extendDerivation x D (@agenv_aspace F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@horner (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) q x))))) (@horner (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) p (@horner (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) q x))) (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) *) (* Goal: is_true (separable_element (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@horner (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) q x)))) x) *) by apply: (separable_elementS (subv_adjoin _ _)). (* Goal: is_true (@eq_op (@GRing.Lmodule.eqType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (extendDerivation x D (@agenv_aspace F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@horner (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) q x))))) (@horner (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) p (@horner (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) q x))) (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) *) have KyxEqKx: (<< <<K; q.[x]>>; x>> = <<K; x>>)%VS. (* Goal: is_true (@eq_op (@GRing.Lmodule.eqType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (extendDerivation x D (@agenv_aspace F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@horner (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) q x))))) (@horner (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) p (@horner (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) q x))) (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) *) (* Goal: @eq (@Vector.space F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@horner (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) q x)))) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) x))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) x))) *) apply/eqP; rewrite eqEsubv andbC adjoinSl ?subv_adjoin //=. (* Goal: is_true (@eq_op (@GRing.Lmodule.eqType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (extendDerivation x D (@agenv_aspace F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@horner (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) q x))))) (@horner (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) p (@horner (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) q x))) (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) *) (* Goal: is_true (@subsetv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@horner (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) q x)))) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) x))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) x)))) *) apply/FadjoinP/andP; rewrite memv_adjoin andbT. (* Goal: is_true (@eq_op (@GRing.Lmodule.eqType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (extendDerivation x D (@agenv_aspace F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@horner (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) q x))))) (@horner (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) p (@horner (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) q x))) (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) *) (* Goal: is_true (@subsetv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@agenv_aspace F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@horner (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) q x))))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@agenv_aspace F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) x))))) *) by apply/FadjoinP/andP; rewrite subv_adjoin mempx_Fadjoin. (* Goal: is_true (@eq_op (@GRing.Lmodule.eqType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (extendDerivation x D (@agenv_aspace F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@horner (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) q x))))) (@horner (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) p (@horner (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) q x))) (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) *) have:= extendDerivationP derD sepFyx; rewrite KyxEqKx => derDx. (* Goal: is_true (@eq_op (@GRing.Lmodule.eqType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (extendDerivation x D (@agenv_aspace F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@horner (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) q x))))) (@horner (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) p (@horner (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) q x))) (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) *) rewrite -horner_comp (Derivation_horner derDx) ?memv_adjoin //; last first. (* Goal: is_true (@eq_op (@GRing.Lmodule.eqType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.add (GRing.Ring.zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L)))) (@horner (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@map_poly (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (extendDerivation x D (@agenv_aspace F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@horner (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) q x)))))) (@comp_poly (GRing.ComRing.ringType (@FieldExt.vect_comRingType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) q p)) x) (@GRing.mul (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@horner (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@deriv (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@comp_poly (GRing.ComRing.ringType (@FieldExt.vect_comRingType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) q p)) x) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (extendDerivation x D (@agenv_aspace F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@horner (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) q x))))) x))) (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) *) (* Goal: is_true (@in_mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@comp_poly (GRing.ComRing.ringType (@FieldExt.vect_comRingType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) q p) (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@agenv_aspace F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) x))))))))) *) by apply: (polyOverSv (subv_adjoin _ _)); apply: polyOver_comp. (* Goal: is_true (@eq_op (@GRing.Lmodule.eqType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.add (GRing.Ring.zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L)))) (@horner (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@map_poly (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (extendDerivation x D (@agenv_aspace F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@horner (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) q x)))))) (@comp_poly (GRing.ComRing.ringType (@FieldExt.vect_comRingType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) q p)) x) (@GRing.mul (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@horner (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@deriv (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@comp_poly (GRing.ComRing.ringType (@FieldExt.vect_comRingType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) q p)) x) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (extendDerivation x D (@agenv_aspace F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@horner (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) q x))))) x))) (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) *) set Dx_p := map_poly _; have Dx_p_0 t: t \is a polyOver K -> (Dx_p t).[x] = 0. (* Goal: is_true (@eq_op (@GRing.Lmodule.eqType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.add (GRing.Ring.zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L)))) (@horner (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (Dx_p (@comp_poly (GRing.ComRing.ringType (@FieldExt.vect_comRingType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) q p)) x) (@GRing.mul (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@horner (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@deriv (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@comp_poly (GRing.ComRing.ringType (@FieldExt.vect_comRingType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) q p)) x) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (extendDerivation x D (@agenv_aspace F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@horner (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) q x))))) x))) (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) *) (* Goal: forall _ : is_true (@in_mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) t (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K)))))), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))))) (@horner (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (Dx_p t) x) (GRing.zero (GRing.Ring.zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))))) *) move/polyOverP=> Kt; congr (_.[x] = 0): (horner0 x); apply/esym/polyP => i. (* Goal: is_true (@eq_op (@GRing.Lmodule.eqType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.add (GRing.Ring.zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L)))) (@horner (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (Dx_p (@comp_poly (GRing.ComRing.ringType (@FieldExt.vect_comRingType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) q p)) x) (@GRing.mul (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@horner (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@deriv (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@comp_poly (GRing.ComRing.ringType (@FieldExt.vect_comRingType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) q p)) x) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (extendDerivation x D (@agenv_aspace F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@horner (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) q x))))) x))) (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) *) (* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (GRing.zero (GRing.Ring.zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@polyseq (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Dx_p t)) i) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (GRing.zero (GRing.Ring.zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@polyseq (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (GRing.zero (poly_zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) i) *) have /eqP Dti_0: D t`_i == 0 by rewrite -memv_ker (subvP DK_0) ?Kt. (* Goal: is_true (@eq_op (@GRing.Lmodule.eqType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.add (GRing.Ring.zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L)))) (@horner (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (Dx_p (@comp_poly (GRing.ComRing.ringType (@FieldExt.vect_comRingType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) q p)) x) (@GRing.mul (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@horner (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@deriv (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@comp_poly (GRing.ComRing.ringType (@FieldExt.vect_comRingType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) q p)) x) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (extendDerivation x D (@agenv_aspace F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@horner (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) q x))))) x))) (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) *) (* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (GRing.zero (GRing.Ring.zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@polyseq (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Dx_p t)) i) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (GRing.zero (GRing.Ring.zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@polyseq (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (GRing.zero (poly_zmodType (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) i) *) by rewrite coef0 coef_map /= {1}extendDerivation_id ?subvP_adjoin. (* Goal: is_true (@eq_op (@GRing.Lmodule.eqType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.add (GRing.Ring.zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L)))) (@horner (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (Dx_p (@comp_poly (GRing.ComRing.ringType (@FieldExt.vect_comRingType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) q p)) x) (@GRing.mul (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@horner (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@deriv (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@comp_poly (GRing.ComRing.ringType (@FieldExt.vect_comRingType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) q p)) x) (@fun_of_lfun (GRing.Field.ringType F) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (extendDerivation x D (@agenv_aspace F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@horner (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) q x))))) x))) (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) *) rewrite (Derivation_separable derDx sepKx) -/Dx_p Dx_p_0 ?polyOver_comp //. (* Goal: is_true (@eq_op (@GRing.Lmodule.eqType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.add (GRing.Ring.zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L)))) (GRing.zero (GRing.Ring.zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))))) (@GRing.mul (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@horner (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@deriv (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@comp_poly (GRing.ComRing.ringType (@FieldExt.vect_comRingType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) q p)) x) (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (@GRing.opp (GRing.Ring.zmodType (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L)))) (@horner (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) L))) (Dx_p (@minPoly F L (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x)) x)) (@GRing.inv (@FieldExt.unitRingType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@horner (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@deriv (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@minPoly F L (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x)) x))))) (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) *) by rewrite add0r mulrCA Dx_p_0 ?minPolyOver ?oppr0 ?mul0r. Qed. Lemma separable_exponent K x : exists n, [char L].-nat n && separable_element K (x ^+ n). Lemma charf0_separable K : [char L] =i pred0 -> forall x, separable_element K x. Proof. (* Goal: forall (_ : @eq_mem nat (@mem nat nat_pred_pred (@GRing.char (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@mem nat (simplPredType nat) (@pred0 nat))) (x : @FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L), is_true (separable_element (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x) *) move=> charL0 x; have [n /andP[charLn]] := separable_exponent K x. (* Goal: forall _ : is_true (separable_element (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) x n)), is_true (separable_element (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x) *) by rewrite (pnat_1 charLn (sub_in_pnat _ charLn)) // => p _; rewrite charL0. Qed. Lemma charf_p_separable K x e p : p \in [char L] -> separable_element K x = (x \in <<K; x ^+ (p ^ e.+1)>>%VS). Lemma charf_n_separable K x n : [char L].-nat n -> 1 < n -> separable_element K x = (x \in <<K; x ^+ n>>%VS). Proof. (* Goal: forall (_ : is_true (pnat (@GRing.char (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) n)) (_ : is_true (leq (S (S O)) n)), @eq bool (separable_element (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x) (@in_mem (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) x (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) x n))))))) *) rewrite -pi_pdiv; set p := pdiv n => charLn pi_n_p. (* Goal: @eq bool (separable_element (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x) (@in_mem (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) x (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) x n))))))) *) have charLp: p \in [char L] := pnatPpi charLn pi_n_p. (* Goal: @eq bool (separable_element (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x) (@in_mem (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) x (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) x n))))))) *) have <-: (n`_p)%N = n by rewrite -(eq_partn n (charf_eq charLp)) part_pnat_id. (* Goal: @eq bool (separable_element (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x) (@in_mem (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) x (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) x (partn n (nat_pred_of_nat p))))))))) *) by rewrite p_part lognE -mem_primes pi_n_p -charf_p_separable. Qed. Definition purely_inseparable_element U x := x ^+ ex_minn (separable_exponent <<U>> x) \in U. Lemma purely_inseparable_elementP {K x} : reflect (exists2 n, [char L].-nat n & x ^+ n \in K) Proof. (* Goal: Bool.reflect (@ex2 nat (fun n : nat => is_true (pnat (@GRing.char (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) n)) (fun n : nat => is_true (@in_mem (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.exp (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) x n) (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K)))))) (purely_inseparable_element (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x) *) rewrite /purely_inseparable_element. (* Goal: Bool.reflect (@ex2 nat (fun n : nat => is_true (pnat (@GRing.char (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) n)) (fun n : nat => is_true (@in_mem (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.exp (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) x n) (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K)))))) (@in_mem (GRing.Ring.sort (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) x (@ex_minn (fun n : nat => andb (pnat (@GRing.char (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) n) (separable_element (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@agenv_aspace F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K))) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) x n))) (separable_exponent (@agenv_aspace F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K)) x))) (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@pred_of_vspace F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K)))) *) case: ex_minnP => n /andP[charLn /=]; rewrite subfield_closed => sepKxn min_xn. (* Goal: Bool.reflect (@ex2 nat (fun n : nat => is_true (pnat (@GRing.char (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) n)) (fun n : nat => is_true (@in_mem (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@GRing.exp (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) x n) (@mem (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (predPredType (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K)))))) (@in_mem (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) x n) (@mem (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (predPredType (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@pred_of_vspace F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K)))) *) apply: (iffP idP) => [Kxn | [m charLm Kxm]]; first by exists n. (* Goal: is_true (@in_mem (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) x n) (@mem (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (predPredType (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@pred_of_vspace F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K)))) *) have{min_xn}: n <= m by rewrite min_xn ?charLm ?base_separable. (* Goal: forall _ : is_true (leq n m), is_true (@in_mem (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) x n) (@mem (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (predPredType (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@pred_of_vspace F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K)))) *) rewrite leq_eqVlt => /predU1P[-> // | ltnm]; pose p := pdiv m. (* Goal: is_true (@in_mem (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) x n) (@mem (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (predPredType (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@pred_of_vspace F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K)))) *) have m_gt1: 1 < m by have [/leq_ltn_trans->] := andP charLn. (* Goal: is_true (@in_mem (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) x n) (@mem (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (predPredType (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@pred_of_vspace F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K)))) *) have charLp: p \in [char L] by rewrite (pnatPpi charLm) ?pi_pdiv. (* Goal: is_true (@in_mem (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) x n) (@mem (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (predPredType (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@pred_of_vspace F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K)))) *) have [/p_natP[em Dm] /p_natP[en Dn]]: p.-nat m /\ p.-nat n. (* Goal: is_true (@in_mem (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) x n) (@mem (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (predPredType (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@pred_of_vspace F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K)))) *) (* Goal: and (is_true (pnat (nat_pred_of_nat p) m)) (is_true (pnat (nat_pred_of_nat p) n)) *) by rewrite -!(eq_pnat _ (charf_eq charLp)). (* Goal: is_true (@in_mem (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) x n) (@mem (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (predPredType (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@pred_of_vspace F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K)))) *) rewrite Dn Dm ltn_exp2l ?prime_gt1 ?pdiv_prime // in ltnm. (* Goal: is_true (@in_mem (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) x n) (@mem (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (predPredType (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@pred_of_vspace F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K)))) *) rewrite -(Fadjoin_idP Kxm) Dm -(subnKC ltnm) addSnnS expnD exprM -Dn. (* Goal: is_true (@in_mem (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) x n) (@mem (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (predPredType (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@pred_of_vspace F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.exp (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.exp (@Falgebra.vect_ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) x n) (expn p (S (subn em (S en))))))))))) *) by rewrite -charf_p_separable. Qed. Lemma separable_inseparable_element K x : separable_element K x && purely_inseparable_element K x = (x \in K). Proof. (* Goal: @eq bool (andb (separable_element (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x) (purely_inseparable_element (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x)) (@in_mem (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) x (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K)))) *) rewrite /purely_inseparable_element; case: ex_minnP => [[|m]] //=. (* Goal: forall (_ : is_true (andb (pnat (@GRing.char (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (S m)) (separable_element (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K)) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) x (S m))))) (_ : forall (n : nat) (_ : is_true (andb (pnat (@GRing.char (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) n) (separable_element (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K)) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) x n)))), is_true (leq (S m) n)), @eq bool (andb (separable_element (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x) (@in_mem (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) x (S m)) (@mem (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (predPredType (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@pred_of_vspace F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K))))) (@in_mem (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) x (@mem (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (predPredType (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K)))) *) rewrite subfield_closed; case: m => /= [-> //| m _ /(_ 1%N)/implyP/= insepKx]. (* Goal: @eq bool (andb (separable_element (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x) (@in_mem (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) x (S (S m))) (@mem (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (predPredType (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@pred_of_vspace F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K))))) (@in_mem (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) x (@mem (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (predPredType (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K)))) *) by rewrite (negPf insepKx) (contraNF (@base_separable K x) insepKx). Qed. Lemma base_inseparable K x : x \in K -> purely_inseparable_element K x. Proof. (* Goal: forall _ : is_true (@in_mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) x (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K)))), is_true (purely_inseparable_element (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x) *) by rewrite -separable_inseparable_element => /andP[]. Qed. Lemma sub_inseparable K E x : (K <= E)%VS -> purely_inseparable_element K x -> purely_inseparable_element E x. Proof. (* Goal: forall (_ : is_true (@subsetv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E))) (_ : is_true (purely_inseparable_element (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x)), is_true (purely_inseparable_element (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E) x) *) move/subvP=> sKE /purely_inseparable_elementP[n charLn /sKE Exn]. (* Goal: is_true (purely_inseparable_element (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E) x) *) by apply/purely_inseparable_elementP; exists n. Qed. Section PrimitiveElementTheorem. Variables (K : {subfield L}) (x y : L). Section FiniteCase. Variable N : nat. Let K_is_large := exists s, [/\ uniq s, {subset s <= K} & N < size s]. Let cyclic_or_large (z : L) : z != 0 -> K_is_large \/ exists a, z ^+ a.+1 = 1. Proof. (* Goal: forall _ : is_true (negb (@eq_op (@FieldExt.eqType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) z (GRing.zero (@FieldExt.zmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))), or K_is_large (@ex nat (fun a : nat => @eq (GRing.Ring.sort (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) z (S a)) (GRing.one (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) *) move=> nz_z; pose d := adjoin_degree K z. (* Goal: or K_is_large (@ex nat (fun a : nat => @eq (GRing.Ring.sort (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) z (S a)) (GRing.one (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) *) pose h0 (i : 'I_(N ^ d).+1) (j : 'I_d) := (Fadjoin_poly K z (z ^+ i))`_j. (* Goal: or K_is_large (@ex nat (fun a : nat => @eq (GRing.Ring.sort (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) z (S a)) (GRing.one (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) *) pose s := undup [seq h0 i j | i <- enum 'I_(N ^ d).+1, j <- enum 'I_d]. (* Goal: or K_is_large (@ex nat (fun a : nat => @eq (GRing.Ring.sort (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) z (S a)) (GRing.one (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) *) have s_h0 i j: h0 i j \in s. (* Goal: or K_is_large (@ex nat (fun a : nat => @eq (GRing.Ring.sort (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) z (S a)) (GRing.one (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) *) (* Goal: is_true (@in_mem (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (h0 i j) (@mem (Equality.sort (GRing.Zmodule.eqType (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (seq_predType (GRing.Zmodule.eqType (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) s)) *) by rewrite mem_undup; apply/allpairsP; exists (i, j); rewrite !mem_enum. (* Goal: or K_is_large (@ex nat (fun a : nat => @eq (GRing.Ring.sort (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) z (S a)) (GRing.one (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) *) pose h i := [ffun j => Ordinal (etrans (index_mem _ _) (s_h0 i j))]. (* Goal: or K_is_large (@ex nat (fun a : nat => @eq (GRing.Ring.sort (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) z (S a)) (GRing.one (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) *) pose h' (f : {ffun 'I_d -> 'I_(size s)}) := \sum_(j < d) s`_(f j) * z ^+ j. (* Goal: or K_is_large (@ex nat (fun a : nat => @eq (GRing.Ring.sort (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) z (S a)) (GRing.one (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) *) have hK i: h' (h i) = z ^+ i. (* Goal: or K_is_large (@ex nat (fun a : nat => @eq (GRing.Ring.sort (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) z (S a)) (GRing.one (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) *) (* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (h' (h i)) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) z (@nat_of_ord (S (expn N d)) i)) *) have Kz_zi: z ^+ i \in <<K; z>>%VS by rewrite rpredX ?memv_adjoin. (* Goal: or K_is_large (@ex nat (fun a : nat => @eq (GRing.Ring.sort (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) z (S a)) (GRing.one (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) *) (* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (h' (h i)) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) z (@nat_of_ord (S (expn N d)) i)) *) rewrite -(Fadjoin_poly_eq Kz_zi) (horner_coef_wide z (size_poly _ _)) -/d. (* Goal: or K_is_large (@ex nat (fun a : nat => @eq (GRing.Ring.sort (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) z (S a)) (GRing.one (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) *) (* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (h' (h i)) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (Finite.sort (ordinal_finType d)) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (index_enum (ordinal_finType d)) (fun i0 : ordinal d => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (ordinal d) i0 (@GRing.add (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) true (@GRing.mul (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (GRing.zero (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@polyseq (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@poly (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) d (fun i1 : nat => @GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vect_lalgType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@fun_of_lfun (GRing.Field.ringType F) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@sumv_pi_for F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Finite.eqType (ordinal_finType d)) (index_enum (ordinal_finType d)) (fun _ : ordinal d => true) (fun i : ordinal d => @prodv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) z (@nat_of_ord d i)))) (@Fadjoin_sum F L (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) z) (@Logic.eq_refl (@Vector.space F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@Fadjoin_sum F L (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) z)) (@inord (Nat.pred (divn (@dimv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) z)))) (@dimv F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K)))) i1)) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) z (@nat_of_ord (S (expn N d)) i))) (@GRing.inv (@FieldExt.unitRingType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) z i1))))) (@nat_of_ord d i0)) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) z (@nat_of_ord d i0))))) *) by apply: eq_bigr => j _; rewrite ffunE /= nth_index. (* Goal: or K_is_large (@ex nat (fun a : nat => @eq (GRing.Ring.sort (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) z (S a)) (GRing.one (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) *) have [inj_h | ] := altP (@injectiveP _ _ h). (* Goal: forall _ : is_true (negb (@injectiveb (ordinal_finType (S (expn N d))) (finfun_of_eqType (ordinal_finType d) (ordinal_eqType (@size (Equality.sort (GRing.Zmodule.eqType (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) s))) h)), or K_is_large (@ex nat (fun a : nat => @eq (GRing.Ring.sort (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) z (S a)) (GRing.one (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) *) (* Goal: or K_is_large (@ex nat (fun a : nat => @eq (GRing.Ring.sort (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) z (S a)) (GRing.one (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) *) left; exists s; split=> [|zi_j|]; rewrite ?undup_uniq ?mem_undup //=. (* Goal: forall _ : is_true (negb (@injectiveb (ordinal_finType (S (expn N d))) (finfun_of_eqType (ordinal_finType d) (ordinal_eqType (@size (Equality.sort (GRing.Zmodule.eqType (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) s))) h)), or K_is_large (@ex nat (fun a : nat => @eq (GRing.Ring.sort (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) z (S a)) (GRing.one (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) *) (* Goal: is_true (leq (S N) (@size (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) s)) *) (* Goal: forall _ : is_true (@in_mem (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) zi_j (@mem (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (seq_predType (@Vector.eqType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@allpairs (ordinal (S (expn N d))) (ordinal d) (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (fun (i : ordinal (S (expn N d))) (j : ordinal d) => h0 i j) (@enum_mem (ordinal_finType (S (expn N d))) (@mem (ordinal (S (expn N d))) (predPredType (ordinal (S (expn N d)))) (@sort_of_simpl_pred (ordinal (S (expn N d))) (pred_of_argType (ordinal (S (expn N d))))))) (@enum_mem (ordinal_finType d) (@mem (ordinal d) (predPredType (ordinal d)) (@sort_of_simpl_pred (ordinal d) (pred_of_argType (ordinal d)))))))), is_true (@in_mem (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) zi_j (@mem (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (predPredType (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K)))) *) by case/allpairsP=> ij [_ _ ->]; apply/polyOverP/Fadjoin_polyOver. (* Goal: forall _ : is_true (negb (@injectiveb (ordinal_finType (S (expn N d))) (finfun_of_eqType (ordinal_finType d) (ordinal_eqType (@size (Equality.sort (GRing.Zmodule.eqType (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) s))) h)), or K_is_large (@ex nat (fun a : nat => @eq (GRing.Ring.sort (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) z (S a)) (GRing.one (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) *) (* Goal: is_true (leq (S N) (@size (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) s)) *) rewrite -[size s]card_ord -(@ltn_exp2r _ _ d) // -{2}[d]card_ord -card_ffun. (* Goal: forall _ : is_true (negb (@injectiveb (ordinal_finType (S (expn N d))) (finfun_of_eqType (ordinal_finType d) (ordinal_eqType (@size (Equality.sort (GRing.Zmodule.eqType (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) s))) h)), or K_is_large (@ex nat (fun a : nat => @eq (GRing.Ring.sort (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) z (S a)) (GRing.one (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) *) (* Goal: is_true (leq (S (expn N d)) (@card (finfun_of_finType (ordinal_finType d) (ordinal_finType (@size (Equality.sort (GRing.Zmodule.eqType (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) s))) (@mem (@finfun_of (ordinal_finType d) (Finite.sort (ordinal_finType (@size (Equality.sort (GRing.Zmodule.eqType (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) s))) (Phant (forall _ : Finite.sort (ordinal_finType d), Finite.sort (ordinal_finType (@size (Equality.sort (GRing.Zmodule.eqType (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) s))))) (predPredType (@finfun_of (ordinal_finType d) (Finite.sort (ordinal_finType (@size (Equality.sort (GRing.Zmodule.eqType (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) s))) (Phant (forall _ : Finite.sort (ordinal_finType d), Finite.sort (ordinal_finType (@size (Equality.sort (GRing.Zmodule.eqType (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) s)))))) (@sort_of_simpl_pred (@finfun_of (ordinal_finType d) (Finite.sort (ordinal_finType (@size (Equality.sort (GRing.Zmodule.eqType (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) s))) (Phant (forall _ : Finite.sort (ordinal_finType d), Finite.sort (ordinal_finType (@size (Equality.sort (GRing.Zmodule.eqType (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) s))))) (pred_of_argType (@finfun_of (ordinal_finType d) (Finite.sort (ordinal_finType (@size (Equality.sort (GRing.Zmodule.eqType (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) s))) (Phant (forall _ : Finite.sort (ordinal_finType d), Finite.sort (ordinal_finType (@size (Equality.sort (GRing.Zmodule.eqType (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) s)))))))))) *) by rewrite -[_.+1]card_ord -(card_image inj_h) max_card. (* Goal: forall _ : is_true (negb (@injectiveb (ordinal_finType (S (expn N d))) (finfun_of_eqType (ordinal_finType d) (ordinal_eqType (@size (Equality.sort (GRing.Zmodule.eqType (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) s))) h)), or K_is_large (@ex nat (fun a : nat => @eq (GRing.Ring.sort (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) z (S a)) (GRing.one (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) *) case/injectivePn=> i1 [i2 i1'2 /(congr1 h')]; rewrite !hK => eq_zi12; right. (* Goal: @ex nat (fun a : nat => @eq (GRing.Ring.sort (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) z (S a)) (GRing.one (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) *) without loss{i1'2} lti12: i1 i2 eq_zi12 / i1 < i2. (* Goal: @ex nat (fun a : nat => @eq (GRing.Ring.sort (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) z (S a)) (GRing.one (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) *) (* Goal: forall _ : forall (i1 i2 : Equality.sort (Finite.eqType (ordinal_finType (S (expn N d))))) (_ : @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) z (@nat_of_ord (S (expn N d)) i1)) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) z (@nat_of_ord (S (expn N d)) i2))) (_ : is_true (leq (S (@nat_of_ord (S (expn N d)) i1)) (@nat_of_ord (S (expn N d)) i2))), @ex nat (fun a : nat => @eq (GRing.Ring.sort (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) z (S a)) (GRing.one (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))), @ex nat (fun a : nat => @eq (GRing.Ring.sort (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) z (S a)) (GRing.one (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) *) by move=> IH; move: i1'2; rewrite neq_ltn => /orP[]; apply: IH. (* Goal: @ex nat (fun a : nat => @eq (GRing.Ring.sort (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) z (S a)) (GRing.one (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) *) by exists (i2 - i1.+1)%N; rewrite subnSK ?expfB // eq_zi12 divff ?expf_neq0. Qed. Lemma finite_PET : K_is_large \/ exists z, (<< <<K; y>>; x>> = <<K; z>>)%VS. Proof. (* Goal: or K_is_large (@ex (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (fun z : @Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) => @eq (@Vector.space F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) y))) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) x))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) z))))) *) have [-> | /cyclic_or_large[|[a Dxa]]] := eqVneq x 0; first 2 [by left]. (* Goal: or K_is_large (@ex (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (fun z : @Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) => @eq (@Vector.space F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) y))) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) x))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) z))))) *) (* Goal: or K_is_large (@ex (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (fun z : @Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) => @eq (@Vector.space F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) y))) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (GRing.zero (@FieldExt.zmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) z))))) *) by rewrite addv0 subfield_closed; right; exists y. (* Goal: or K_is_large (@ex (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (fun z : @Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) => @eq (@Vector.space F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) y))) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) x))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) z))))) *) have [-> | /cyclic_or_large[|[b Dyb]]] := eqVneq y 0; first 2 [by left]. (* Goal: or K_is_large (@ex (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (fun z : @Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) => @eq (@Vector.space F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) y))) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) x))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) z))))) *) (* Goal: or K_is_large (@ex (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (fun z : @Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) => @eq (@Vector.space F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (GRing.zero (@FieldExt.zmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) x))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) z))))) *) by rewrite addv0 subfield_closed; right; exists x. (* Goal: or K_is_large (@ex (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (fun z : @Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) => @eq (@Vector.space F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) y))) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) x))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) z))))) *) pose h0 (ij : 'I_a.+1 * 'I_b.+1) := x ^+ ij.1 * y ^+ ij.2. (* Goal: or K_is_large (@ex (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (fun z : @Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) => @eq (@Vector.space F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) y))) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) x))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) z))))) *) pose H := <<[set ij | h0 ij == 1%R]>>%G; pose h (u : coset_of H) := h0 (repr u). (* Goal: or K_is_large (@ex (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (fun z : @Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) => @eq (@Vector.space F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) y))) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) x))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) z))))) *) have h0M: {morph h0: ij1 ij2 / (ij1 * ij2)%g >-> ij1 * ij2}. (* Goal: or K_is_large (@ex (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (fun z : @Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) => @eq (@Vector.space F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) y))) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) x))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) z))))) *) (* Goal: @morphism_2 (prod (ordinal (S a)) (ordinal (S b))) (GRing.Ring.sort (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) h0 (fun ij1 ij2 : prod (ordinal (S a)) (ordinal (S b)) => @mulg (extprod_baseFinGroupType (Zp_finGroupType a) (Zp_finGroupType b)) ij1 ij2) (fun ij1 ij2 : GRing.Ring.sort (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) => @GRing.mul (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) ij1 ij2) *) by rewrite /h0 => [] [i1 j1] [i2 j2] /=; rewrite mulrACA -!exprD !expr_mod. (* Goal: or K_is_large (@ex (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (fun z : @Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) => @eq (@Vector.space F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) y))) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) x))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) z))))) *) have memH ij: (ij \in H) = (h0 ij == 1). (* Goal: or K_is_large (@ex (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (fun z : @Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) => @eq (@Vector.space F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) y))) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) x))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) z))))) *) (* Goal: @eq bool (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (prod_group (Zp_finGroupType a) (Zp_finGroupType b))))) ij (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (prod_group (Zp_finGroupType a) (Zp_finGroupType b))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (prod_group (Zp_finGroupType a) (Zp_finGroupType b)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (prod_group (Zp_finGroupType a) (Zp_finGroupType b)))) (@gval (prod_group (Zp_finGroupType a) (Zp_finGroupType b)) H)))) (@eq_op (GRing.Ring.eqType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (h0 ij) (GRing.one (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) *) rewrite /= gen_set_id ?inE //; apply/group_setP; rewrite inE [h0 _]mulr1. (* Goal: or K_is_large (@ex (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (fun z : @Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) => @eq (@Vector.space F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) y))) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) x))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) z))))) *) (* Goal: and (is_true (@eq_op (GRing.Ring.eqType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.exp (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) x (@nat_of_ord (S a) (@fst (ordinal (S a)) (ordinal (S b)) (oneg (FinGroup.base (prod_group (Zp_finGroupType a) (Zp_finGroupType b))))))) (GRing.one (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@prop_in11 (Finite.sort (FinGroup.arg_finType (FinGroup.base (prod_group (Zp_finGroupType a) (Zp_finGroupType b))))) (Finite.sort (FinGroup.arg_finType (FinGroup.base (prod_group (Zp_finGroupType a) (Zp_finGroupType b))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (prod_group (Zp_finGroupType a) (Zp_finGroupType b))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (prod_group (Zp_finGroupType a) (Zp_finGroupType b)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (prod_group (Zp_finGroupType a) (Zp_finGroupType b)))) (@SetDef.finset (prod_finType (ordinal_finType (S a)) (ordinal_finType (S b))) (fun ij : prod (ordinal (S a)) (ordinal (S b)) => @eq_op (GRing.Ring.eqType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (h0 ij) (GRing.one (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (prod_group (Zp_finGroupType a) (Zp_finGroupType b))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (prod_group (Zp_finGroupType a) (Zp_finGroupType b)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (prod_group (Zp_finGroupType a) (Zp_finGroupType b)))) (@SetDef.finset (prod_finType (ordinal_finType (S a)) (ordinal_finType (S b))) (fun ij : prod (ordinal (S a)) (ordinal (S b)) => @eq_op (GRing.Ring.eqType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (h0 ij) (GRing.one (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))))) (fun x y : FinGroup.arg_sort (FinGroup.base (prod_group (Zp_finGroupType a) (Zp_finGroupType b))) => is_true (@in_mem (FinGroup.sort (FinGroup.base (prod_group (Zp_finGroupType a) (Zp_finGroupType b)))) (@mulg (FinGroup.base (prod_group (Zp_finGroupType a) (Zp_finGroupType b))) x y) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (prod_group (Zp_finGroupType a) (Zp_finGroupType b))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (prod_group (Zp_finGroupType a) (Zp_finGroupType b)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (prod_group (Zp_finGroupType a) (Zp_finGroupType b)))) (@SetDef.finset (prod_finType (ordinal_finType (S a)) (ordinal_finType (S b))) (fun ij : prod (ordinal (S a)) (ordinal (S b)) => @eq_op (GRing.Ring.eqType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (h0 ij) (GRing.one (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))))))) (inPhantom (forall x y : FinGroup.arg_sort (FinGroup.base (prod_group (Zp_finGroupType a) (Zp_finGroupType b))), is_true (@in_mem (FinGroup.sort (FinGroup.base (prod_group (Zp_finGroupType a) (Zp_finGroupType b)))) (@mulg (FinGroup.base (prod_group (Zp_finGroupType a) (Zp_finGroupType b))) x y) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (prod_group (Zp_finGroupType a) (Zp_finGroupType b))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (prod_group (Zp_finGroupType a) (Zp_finGroupType b)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (prod_group (Zp_finGroupType a) (Zp_finGroupType b)))) (@SetDef.finset (prod_finType (ordinal_finType (S a)) (ordinal_finType (S b))) (fun ij : prod (ordinal (S a)) (ordinal (S b)) => @eq_op (GRing.Ring.eqType (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (h0 ij) (GRing.one (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))))))))) *) by split=> // ? ?; rewrite !inE h0M => /eqP-> /eqP->; rewrite mulr1. (* Goal: or K_is_large (@ex (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (fun z : @Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) => @eq (@Vector.space F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) y))) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) x))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) z))))) *) have nH ij: ij \in 'N(H)%g. (* Goal: or K_is_large (@ex (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (fun z : @Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) => @eq (@Vector.space F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) y))) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) x))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) z))))) *) (* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (prod_group (Zp_finGroupType a) (Zp_finGroupType b))))) ij (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (prod_group (Zp_finGroupType a) (Zp_finGroupType b))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (prod_group (Zp_finGroupType a) (Zp_finGroupType b)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (prod_group (Zp_finGroupType a) (Zp_finGroupType b)))) (@normaliser (prod_group (Zp_finGroupType a) (Zp_finGroupType b)) (@gval (prod_group (Zp_finGroupType a) (Zp_finGroupType b)) H))))) *) by apply/(subsetP (cent_sub _))/centP=> ij1 _; congr (_, _); rewrite Zp_mulgC. (* Goal: or K_is_large (@ex (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (fun z : @Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) => @eq (@Vector.space F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) y))) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) x))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) z))))) *) have hE ij: h (coset H ij) = h0 ij. (* Goal: or K_is_large (@ex (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (fun z : @Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) => @eq (@Vector.space F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) y))) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) x))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) z))))) *) (* Goal: @eq (GRing.Ring.sort (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (h (@coset (prod_group (Zp_finGroupType a) (Zp_finGroupType b)) (@gval (prod_group (Zp_finGroupType a) (Zp_finGroupType b)) H) ij)) (h0 ij) *) rewrite /h val_coset //; case: repr_rcosetP => ij1. (* Goal: or K_is_large (@ex (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (fun z : @Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) => @eq (@Vector.space F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) y))) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) x))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) z))))) *) (* Goal: forall _ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (prod_group (Zp_finGroupType a) (Zp_finGroupType b))))) ij1 (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (prod_group (Zp_finGroupType a) (Zp_finGroupType b))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (prod_group (Zp_finGroupType a) (Zp_finGroupType b)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (prod_group (Zp_finGroupType a) (Zp_finGroupType b)))) (@gval (prod_group (Zp_finGroupType a) (Zp_finGroupType b)) H)))), @eq (GRing.Ring.sort (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (h0 (@mulg (FinGroup.base (prod_group (Zp_finGroupType a) (Zp_finGroupType b))) ij1 ij)) (h0 ij) *) by rewrite memH h0M => /eqP->; rewrite mul1r. (* Goal: or K_is_large (@ex (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (fun z : @Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) => @eq (@Vector.space F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) y))) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) x))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) z))))) *) have h1: h 1%g = 1 by rewrite /h repr_coset1 [h0 _]mulr1. (* Goal: or K_is_large (@ex (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (fun z : @Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) => @eq (@Vector.space F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) y))) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) x))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) z))))) *) have hM: {morph h: u v / (u * v)%g >-> u * v}. (* Goal: or K_is_large (@ex (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (fun z : @Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) => @eq (@Vector.space F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) y))) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) x))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) z))))) *) (* Goal: @morphism_2 (@coset_of (prod_group (Zp_finGroupType a) (Zp_finGroupType b)) (@gval (prod_group (Zp_finGroupType a) (Zp_finGroupType b)) H)) (GRing.Ring.sort (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) h (fun u v : @coset_of (prod_group (Zp_finGroupType a) (Zp_finGroupType b)) (@gval (prod_group (Zp_finGroupType a) (Zp_finGroupType b)) H) => @mulg (@coset_baseGroupType (prod_group (Zp_finGroupType a) (Zp_finGroupType b)) (@gval (prod_group (Zp_finGroupType a) (Zp_finGroupType b)) H)) u v) (fun u v : GRing.Ring.sort (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) => @GRing.mul (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) u v) *) by do 2![move=> u; have{u} [? _ ->] := cosetP u]; rewrite -morphM // !hE h0M. (* Goal: or K_is_large (@ex (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (fun z : @Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) => @eq (@Vector.space F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) y))) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) x))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) z))))) *) have /cyclicP[w defW]: cyclic [set: coset_of H]. (* Goal: or K_is_large (@ex (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (fun z : @Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) => @eq (@Vector.space F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) y))) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) x))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) z))))) *) (* Goal: is_true (@cyclic (@coset_groupType (prod_group (Zp_finGroupType a) (Zp_finGroupType b)) (@gval (prod_group (Zp_finGroupType a) (Zp_finGroupType b)) H)) (@setTfor (@coset_finType (prod_group (Zp_finGroupType a) (Zp_finGroupType b)) (@gval (prod_group (Zp_finGroupType a) (Zp_finGroupType b)) H)) (Phant (@coset_of (prod_group (Zp_finGroupType a) (Zp_finGroupType b)) (@gval (prod_group (Zp_finGroupType a) (Zp_finGroupType b)) H))))) *) apply: field_mul_group_cyclic (in2W hM) _ => u _; have [ij _ ->] := cosetP u. (* Goal: or K_is_large (@ex (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (fun z : @Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) => @eq (@Vector.space F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) y))) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) x))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) z))))) *) (* Goal: iff (@eq (GRing.Field.sort (@FieldExt.fieldType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (h (@coset (prod_group (Zp_finGroupType a) (Zp_finGroupType b)) (@gval (prod_group (Zp_finGroupType a) (Zp_finGroupType b)) H) ij)) (GRing.one (GRing.Field.ringType (@FieldExt.fieldType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@eq (FinGroup.arg_sort (FinGroup.base (@coset_groupType (prod_group (Zp_finGroupType a) (Zp_finGroupType b)) (@gval (prod_group (Zp_finGroupType a) (Zp_finGroupType b)) H)))) (@coset (prod_group (Zp_finGroupType a) (Zp_finGroupType b)) (@gval (prod_group (Zp_finGroupType a) (Zp_finGroupType b)) H) ij) (oneg (FinGroup.base (@coset_groupType (prod_group (Zp_finGroupType a) (Zp_finGroupType b)) (@gval (prod_group (Zp_finGroupType a) (Zp_finGroupType b)) H))))) *) by split=> [/eqP | -> //]; rewrite hE -memH => /coset_id. (* Goal: or K_is_large (@ex (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (fun z : @Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) => @eq (@Vector.space F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) y))) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) x))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) z))))) *) have Kw_h ij t: h0 ij = t -> t \in <<K; h w>>%VS. (* Goal: or K_is_large (@ex (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (fun z : @Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) => @eq (@Vector.space F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) y))) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) x))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) z))))) *) (* Goal: forall _ : @eq (GRing.Ring.sort (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (h0 ij) t, is_true (@in_mem (GRing.Ring.sort (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) t (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (h w))))))) *) have /cycleP[k Dk]: coset H ij \in <[w]>%g by rewrite -defW inE. (* Goal: or K_is_large (@ex (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (fun z : @Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) => @eq (@Vector.space F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) y))) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) x))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) z))))) *) (* Goal: forall _ : @eq (GRing.Ring.sort (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (h0 ij) t, is_true (@in_mem (GRing.Ring.sort (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) t (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (h w))))))) *) rewrite -hE {}Dk => <-; elim: k => [|k IHk]; first by rewrite h1 rpred1. (* Goal: or K_is_large (@ex (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (fun z : @Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) => @eq (@Vector.space F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) y))) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) x))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) z))))) *) (* Goal: is_true (@in_mem (GRing.Ring.sort (@FieldExt.ringType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (h (@expgn (FinGroup.base (@coset_groupType (prod_group (Zp_finGroupType a) (Zp_finGroupType b)) (@gval (prod_group (Zp_finGroupType a) (Zp_finGroupType b)) H))) w (S k))) (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (h w))))))) *) by rewrite expgS hM rpredM // memv_adjoin. (* Goal: or K_is_large (@ex (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (fun z : @Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) => @eq (@Vector.space F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) y))) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) x))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) z))))) *) right; exists (h w); apply/eqP; rewrite eqEsubv !(sameP FadjoinP andP). (* Goal: is_true (andb (andb (andb (@subsetv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@agenv_aspace F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (h w)))))) (@in_mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) y (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@agenv_aspace F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (h w))))))))) (@in_mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) x (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@agenv_aspace F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (h w))))))))) (andb (@subsetv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@agenv_aspace F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) y))) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) x))))) (@in_mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (h w) (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@agenv_aspace F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) y))) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) x))))))))) *) rewrite subv_adjoin (subv_trans (subv_adjoin K y)) ?subv_adjoin //=. (* Goal: is_true (andb (andb (@in_mem (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) y (@mem (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (predPredType (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (h w))))))) (@in_mem (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) x (@mem (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (predPredType (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (h w)))))))) (@in_mem (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (h w) (@mem (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (predPredType (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) y))) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) x))))))) *) rewrite (Kw_h (0, inZp 1)) 1?(Kw_h (inZp 1, 0)) /h0 ?mulr1 ?mul1r ?expr_mod //=. (* Goal: is_true (@in_mem (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (h w) (@mem (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (predPredType (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) y))) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) x)))))) *) by rewrite rpredM ?rpredX ?memv_adjoin // subvP_adjoin ?memv_adjoin. Qed. End FiniteCase. Hypothesis sepKy : separable_element K y. Lemma Primitive_Element_Theorem : exists z, (<< <<K; y>>; x>> = <<K; z>>)%VS. Lemma adjoin_separable : separable_element <<K; y>> x -> separable_element K x. Proof. (* Goal: forall _ : is_true (separable_element (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) y))) x), is_true (separable_element (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x) *) have /Derivation_separableP derKy := sepKy => /Derivation_separableP derKy_x. (* Goal: is_true (separable_element (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x) *) have [z defKz] := Primitive_Element_Theorem. (* Goal: is_true (separable_element (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x) *) suffices /adjoin_separableP: separable_element K z. (* Goal: is_true (separable_element (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) z) *) (* Goal: forall _ : forall (y : @Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (_ : is_true (@in_mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) y (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) z))))))), is_true (separable_element (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) y), is_true (separable_element (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x) *) by apply; rewrite -defKz memv_adjoin. (* Goal: is_true (separable_element (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) z) *) apply/Derivation_separableP=> D; rewrite -defKz => derKxyD DK_0. (* Goal: is_true (@subsetv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) y))) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) x))) (@lker F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) D)) *) suffices derKyD: Derivation <<K; y>>%VS D by rewrite derKy_x // derKy. (* Goal: is_true (Derivation (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) y))) D) *) by apply: DerivationS derKxyD; apply: subv_adjoin. Qed. Proof. have /Derivation_separableP derKy := sepKy => /Derivation_separableP derKy_x. have [z defKz] := Primitive_Element_Theorem. End PrimitiveElementTheorem. Lemma strong_Primitive_Element_Theorem K x y : separable_element <<K; x>> y -> exists2 z : L, (<< <<K; y>>; x>> = <<K; z>>)%VS & separable_element K x -> separable_element K y. Proof. move=> sepKx_y; have [n /andP[charLn sepKyn]] := separable_exponent K y. have adjK_C z t: (<<<<K; z>>; t>> = <<<<K; t>>; z>>)%VS. by rewrite !agenv_add_id -!addvA (addvC <[_]>%VS). have [z defKz] := Primitive_Element_Theorem x sepKyn. Definition separable U W : bool := all (separable_element U) (vbasis W). Definition purely_inseparable U W : bool := all (purely_inseparable_element U) (vbasis W). Lemma separable_add K x y : separable_element K x -> separable_element K y -> separable_element K (x + y). Proof. (* Goal: forall (_ : is_true (separable_element (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x)) (_ : is_true (separable_element (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) y)), is_true (separable_element (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@GRing.add (@FieldExt.zmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) x y)) *) move/(separable_elementS (subv_adjoin K y))=> sepKy_x sepKy. (* Goal: is_true (separable_element (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@GRing.add (@FieldExt.zmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) x y)) *) have [z defKz] := Primitive_Element_Theorem x sepKy. (* Goal: is_true (separable_element (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@GRing.add (@FieldExt.zmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) x y)) *) have /(adjoin_separableP _): x + y \in <<K; z>>%VS. (* Goal: forall _ : forall _ : is_true (separable_element (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) z), is_true (separable_element (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@GRing.add (@FieldExt.zmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) x y)), is_true (separable_element (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@GRing.add (@FieldExt.zmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) x y)) *) (* Goal: is_true (@in_mem (GRing.Zmodule.sort (@FieldExt.zmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@GRing.add (@FieldExt.zmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) x y) (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) z)))))) *) by rewrite -defKz rpredD ?memv_adjoin // subvP_adjoin ?memv_adjoin. (* Goal: forall _ : forall _ : is_true (separable_element (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) z), is_true (separable_element (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@GRing.add (@FieldExt.zmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) x y)), is_true (separable_element (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@GRing.add (@FieldExt.zmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) x y)) *) apply; apply: adjoin_separable sepKy (adjoin_separable sepKy_x _). (* Goal: is_true (separable_element (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@agenv_aspace F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) y)))) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) x))) z) *) by rewrite defKz base_separable ?memv_adjoin. Qed. Proof. move/(separable_elementS (subv_adjoin K y))=> sepKy_x sepKy. have [z defKz] := Primitive_Element_Theorem x sepKy. Lemma separable_sum I r (P : pred I) (v_ : I -> L) K : (forall i, P i -> separable_element K (v_ i)) -> separable_element K (\sum_(i <- r | P i) v_ i). Proof. (* Goal: forall _ : forall (i : I) (_ : is_true (P i)), is_true (separable_element (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (v_ i)), is_true (separable_element (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@BigOp.bigop (GRing.Zmodule.sort (@FieldExt.zmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) I (GRing.zero (@FieldExt.zmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) r (fun i : I => @BigBody (GRing.Zmodule.sort (@FieldExt.zmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) I i (@GRing.add (@FieldExt.zmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (P i) (v_ i)))) *) move=> sepKi. (* Goal: is_true (separable_element (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@BigOp.bigop (GRing.Zmodule.sort (@FieldExt.zmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) I (GRing.zero (@FieldExt.zmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) r (fun i : I => @BigBody (GRing.Zmodule.sort (@FieldExt.zmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) I i (@GRing.add (@FieldExt.zmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (P i) (v_ i)))) *) by elim/big_ind: _; [apply/base_separable/mem0v | apply: separable_add |]. Qed. Lemma inseparable_add K x y : purely_inseparable_element K x -> purely_inseparable_element K y -> purely_inseparable_element K (x + y). Lemma inseparable_sum I r (P : pred I) (v_ : I -> L) K : (forall i, P i -> purely_inseparable_element K (v_ i)) -> purely_inseparable_element K (\sum_(i <- r | P i) v_ i). Proof. (* Goal: forall _ : forall (i : I) (_ : is_true (P i)), is_true (purely_inseparable_element (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (v_ i)), is_true (purely_inseparable_element (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@BigOp.bigop (GRing.Zmodule.sort (@FieldExt.zmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) I (GRing.zero (@FieldExt.zmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) r (fun i : I => @BigBody (GRing.Zmodule.sort (@FieldExt.zmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) I i (@GRing.add (@FieldExt.zmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (P i) (v_ i)))) *) move=> insepKi. (* Goal: is_true (purely_inseparable_element (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@BigOp.bigop (GRing.Zmodule.sort (@FieldExt.zmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) I (GRing.zero (@FieldExt.zmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) r (fun i : I => @BigBody (GRing.Zmodule.sort (@FieldExt.zmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) I i (@GRing.add (@FieldExt.zmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (P i) (v_ i)))) *) by elim/big_ind: _; [apply/base_inseparable/mem0v | apply: inseparable_add |]. Qed. Lemma separableP {K E} : reflect (forall y, y \in E -> separable_element K y) (separable K E). Proof. (* Goal: Bool.reflect (forall (y : @Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (_ : is_true (@in_mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) y (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E))))), is_true (separable_element (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) y)) (separable (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E)) *) apply/(iffP idP)=> [/allP|] sepK_E; last by apply/allP=> x /vbasis_mem/sepK_E. (* Goal: forall (y : @Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (_ : is_true (@in_mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) y (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E))))), is_true (separable_element (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) y) *) move=> y /coord_vbasis->; apply/separable_sum=> i _. (* Goal: is_true (separable_element (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@GRing.scale (GRing.Field.ringType F) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@coord F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@dimv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E)) (@vbasis F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E)) i y) (@nth (GRing.Zmodule.sort (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@tval (@dimv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E)) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@vbasis F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E))) (@nat_of_ord (@dimv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E)) i)))) *) have: separable_element K (vbasis E)`_i by apply/sepK_E/memt_nth. (* Goal: forall _ : is_true (separable_element (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@nth (GRing.Zmodule.sort (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@tval (@dimv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E)) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@vbasis F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E))) (@nat_of_ord (@dimv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E)) i))), is_true (separable_element (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@GRing.scale (GRing.Field.ringType F) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@coord F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@dimv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E)) (@vbasis F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E)) i y) (@nth (GRing.Zmodule.sort (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@tval (@dimv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E)) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@vbasis F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E))) (@nat_of_ord (@dimv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E)) i)))) *) by move/adjoin_separableP; apply; rewrite rpredZ ?memv_adjoin. Qed. Lemma purely_inseparableP {K E} : reflect (forall y, y \in E -> purely_inseparable_element K y) (purely_inseparable K E). Proof. (* Goal: Bool.reflect (forall (y : @Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (_ : is_true (@in_mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) y (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E))))), is_true (purely_inseparable_element (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) y)) (purely_inseparable (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E)) *) apply/(iffP idP)=> [/allP|] sep'K_E; last by apply/allP=> x /vbasis_mem/sep'K_E. (* Goal: forall (y : @Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (_ : is_true (@in_mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) y (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E))))), is_true (purely_inseparable_element (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) y) *) move=> y /coord_vbasis->; apply/inseparable_sum=> i _. (* Goal: is_true (purely_inseparable_element (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@GRing.scale (GRing.Field.ringType F) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@coord F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@dimv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E)) (@vbasis F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E)) i y) (@nth (GRing.Zmodule.sort (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@tval (@dimv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E)) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@vbasis F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E))) (@nat_of_ord (@dimv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E)) i)))) *) have: purely_inseparable_element K (vbasis E)`_i by apply/sep'K_E/memt_nth. (* Goal: forall _ : is_true (purely_inseparable_element (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@nth (GRing.Zmodule.sort (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@tval (@dimv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E)) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@vbasis F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E))) (@nat_of_ord (@dimv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E)) i))), is_true (purely_inseparable_element (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@GRing.scale (GRing.Field.ringType F) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@coord F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@dimv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E)) (@vbasis F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E)) i y) (@nth (GRing.Zmodule.sort (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@tval (@dimv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E)) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@vbasis F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E))) (@nat_of_ord (@dimv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E)) i)))) *) case/purely_inseparable_elementP=> n charLn K_Ein. (* Goal: is_true (purely_inseparable_element (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@GRing.scale (GRing.Field.ringType F) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@coord F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@dimv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E)) (@vbasis F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E)) i y) (@nth (GRing.Zmodule.sort (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@tval (@dimv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E)) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Vector.lmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@vbasis F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E))) (@nat_of_ord (@dimv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E)) i)))) *) by apply/purely_inseparable_elementP; exists n; rewrite // exprZn rpredZ. Qed. Lemma adjoin_separable_eq K x : separable_element K x = separable K <<K; x>>%VS. Proof. (* Goal: @eq bool (separable_element (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x) (separable (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) x)))) *) exact: sameP adjoin_separableP separableP. Qed. Lemma separable_inseparable_decomposition E K : {x | x \in E /\ separable_element K x & purely_inseparable <<K; x>> E}. Proof. without loss sKE: K / (K <= E)%VS. case/(_ _ (capvSr K E)) => x [Ex sepKEx] /purely_inseparableP sep'KExE. exists x; first by split; last exact/(separable_elementS _ sepKEx)/capvSl. apply/purely_inseparableP=> y /sep'KExE; apply: sub_inseparable. exact/adjoinSl/capvSl. pose E_ i := (vbasis E)`_i; pose fP i := separable_exponent K (E_ i). pose f i := E_ i ^+ ex_minn (fP i); pose s := mkseq f (\dim E). pose K' := <<K & s>>%VS. have sepKs: all (separable_element K) s. by rewrite all_map /f; apply/allP=> i _ /=; case: ex_minnP => m /andP[]. have [x sepKx defKx]: {x | x \in E /\ separable_element K x & K' = <<K; x>>%VS}. have: all (mem E) s. rewrite all_map; apply/allP=> i; rewrite mem_iota => ltis /=. by rewrite rpredX // vbasis_mem // memt_nth. rewrite {}/K'; elim/last_ind: s sepKs => [|s t IHs]. by exists 0; [rewrite base_separable mem0v | rewrite adjoin_nil addv0]. rewrite adjoin_rcons !all_rcons => /andP[sepKt sepKs] /andP[/= Et Es]. have{IHs sepKs Es} [y [Ey sepKy] ->{s}] := IHs sepKs Es. have /sig_eqW[x defKx] := Primitive_Element_Theorem t sepKy. Definition separable_generator K E : L := s2val (locked (separable_inseparable_decomposition E K)). Lemma separable_generator_mem E K : separable_generator K E \in E. Proof. (* Goal: is_true (@in_mem (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (separable_generator K E) (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Falgebra.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E)))) *) by rewrite /separable_generator; case: (locked _) => ? []. Qed. Lemma separable_generatorP E K : separable_element K (separable_generator K E). Proof. (* Goal: is_true (separable_element (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (separable_generator K E)) *) by rewrite /separable_generator; case: (locked _) => ? []. Qed. Lemma separable_generator_maximal E K : purely_inseparable <<K; separable_generator K E>> E. Proof. (* Goal: is_true (purely_inseparable (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (separable_generator K E)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E)) *) by rewrite /separable_generator; case: (locked _). Qed. Lemma sub_adjoin_separable_generator E K : separable K E -> (E <= <<K; separable_generator K E>>)%VS. Proof. (* Goal: forall _ : is_true (separable (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E)), is_true (@subsetv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (separable_generator K E))))) *) move/separableP=> sepK_E; apply/subvP=> v Ev. (* Goal: is_true (@in_mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) v (@mem (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))) (predPredType (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@pred_of_vspace F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)))) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (separable_generator K E))))))) *) rewrite -separable_inseparable_element. (* Goal: is_true (andb (separable_element (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@agenv_aspace F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (separable_generator K E))))) v) (purely_inseparable_element (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@agenv_aspace F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (separable_generator K E))))) v)) *) have /purely_inseparableP-> // := separable_generator_maximal E K. (* Goal: is_true (andb (separable_element (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@agenv_aspace F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (separable_generator K E))))) v) true) *) by rewrite (separable_elementS _ (sepK_E _ Ev)) // subv_adjoin. Qed. Lemma eq_adjoin_separable_generator E K : separable K E -> (K <= E)%VS -> E = <<K; separable_generator K E>>%VS :> {vspace _}. Proof. (* Goal: forall (_ : is_true (separable (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E))) (_ : is_true (@subsetv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E))), @eq (@Vector.space F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (Phant (@Vector.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L))))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (separable_generator K E)))) *) move=> sepK_E sKE; apply/eqP; rewrite eqEsubv sub_adjoin_separable_generator //. (* Goal: is_true (andb true (@subsetv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (separable_generator K E)))) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E))) *) by apply/FadjoinP/andP; rewrite sKE separable_generator_mem. Qed. Lemma separable_refl K : separable K K. Proof. (* Goal: is_true (separable (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K)) *) by apply/separableP; apply: base_separable. Qed. Lemma separable_trans M K E : separable K M -> separable M E -> separable K E. Proof. (* Goal: forall (_ : is_true (separable (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) M))) (_ : is_true (separable (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) M) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E))), is_true (separable (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E)) *) move/sub_adjoin_separable_generator. (* Goal: forall (_ : is_true (@subsetv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) M) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (separable_generator K M)))))) (_ : is_true (separable (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) M) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E))), is_true (separable (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E)) *) set x := separable_generator K M => sMKx /separableP sepM_E. (* Goal: is_true (separable (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E)) *) apply/separableP => w /sepM_E/(separable_elementS sMKx). (* Goal: forall _ : is_true (separable_element (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@agenv_aspace F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@vline F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) x)))) w), is_true (separable_element (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) w) *) case/strong_Primitive_Element_Theorem => _ _ -> //. (* Goal: is_true (separable_element (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x) *) exact: separable_generatorP. Qed. Proof. move/sub_adjoin_separable_generator. set x := separable_generator K M => sMKx /separableP sepM_E. apply/separableP => w /sepM_E/(separable_elementS sMKx). case/strong_Primitive_Element_Theorem => _ _ -> //. Lemma separableS K1 K2 E2 E1 : (K1 <= K2)%VS -> (E2 <= E1)%VS -> separable K1 E1 -> separable K2 E2. Proof. (* Goal: forall (_ : is_true (@subsetv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K1) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K2))) (_ : is_true (@subsetv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E2) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E1))) (_ : is_true (separable (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K1) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E1))), is_true (separable (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K2) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E2)) *) move=> sK12 /subvP sE21 /separableP sepK1_E1. (* Goal: is_true (separable (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K2) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E2)) *) by apply/separableP=> y /sE21/sepK1_E1/(separable_elementS sK12). Qed. Lemma separableSl K M E : (K <= M)%VS -> separable K E -> separable M E. Proof. (* Goal: forall (_ : is_true (@subsetv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) M))) (_ : is_true (separable (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E))), is_true (separable (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) M) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E)) *) by move/separableS; apply. Qed. Lemma separableSr K M E : (M <= E)%VS -> separable K E -> separable K M. Proof. (* Goal: forall (_ : is_true (@subsetv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) M) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E))) (_ : is_true (separable (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E))), is_true (separable (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) M)) *) exact: separableS. Qed. Lemma separable_Fadjoin_seq K rs : all (separable_element K) rs -> separable K <<K & rs>>. Proof. (* Goal: forall _ : is_true (@all (@FieldExt.sort (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (separable_element (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K)) rs), is_true (separable (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@agenv F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) (@addv F (@Falgebra.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L)) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@span F (@FieldExt.vectType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) rs)))) *) elim/last_ind: rs => [|s x IHs] in K *. by rewrite adjoin_nil subfield_closed separable_refl. rewrite all_rcons adjoin_rcons => /andP[sepKx /IHs/separable_trans-> //]. by rewrite -adjoin_separable_eq (separable_elementS _ sepKx) ?subv_adjoin_seq. Qed. Qed. Lemma purely_inseparable_refl K : purely_inseparable K K. Proof. (* Goal: is_true (purely_inseparable (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K)) *) by apply/purely_inseparableP; apply: base_inseparable. Qed. Lemma purely_inseparable_trans M K E : purely_inseparable K M -> purely_inseparable M E -> purely_inseparable K E. Proof. (* Goal: forall (_ : is_true (purely_inseparable (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) M))) (_ : is_true (purely_inseparable (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) M) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E))), is_true (purely_inseparable (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E)) *) have insepP := purely_inseparableP => /insepP insepK_M /insepP insepM_E. (* Goal: is_true (purely_inseparable (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E)) *) have insepPe := purely_inseparable_elementP. (* Goal: is_true (purely_inseparable (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) E)) *) apply/insepP=> x /insepM_E/insepPe[n charLn /insepK_M/insepPe[m charLm Kxnm]]. (* Goal: is_true (purely_inseparable_element (@asval F (@FieldExt.FalgType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) L) K) x) *) by apply/insepPe; exists (n * m)%N; rewrite ?exprM // pnat_mul charLn charLm. Qed. End Separable. Arguments separable_elementP {F L K x}. Arguments separablePn {F L K x}. Arguments Derivation_separableP {F L K x}. Arguments adjoin_separableP {F L K x}. Arguments purely_inseparable_elementP {F L K x}. Arguments separableP {F L K E}. Arguments purely_inseparableP {F L K E}.
Require Export e_sequent_calculus. Require Import Plus Le Lt. Set Implicit Arguments. Module Type cut_mod (B: base_mod) (S: sound_mod B) (C: complete_mod B S) (G: sequent_mod B S C). Import B S C G. Reserved Notation "Γ ⊃c A" (at level 80). Inductive Gcf : list PropF->list PropF->Prop := | Gcax : forall v Γ Δ , In #v Γ -> In #v Δ -> Γ ⊃c Δ | GcBot : forall Γ Δ , In ⊥ Γ -> Γ ⊃c Δ | cAndL : forall A B Γ1 Γ2 Δ, Γ1++A::B::Γ2 ⊃c Δ -> Γ1++A∧B::Γ2 ⊃c Δ | cAndR : forall A B Γ Δ1 Δ2, Γ ⊃c Δ1++A::Δ2 -> Γ ⊃c Δ1++B::Δ2 -> Γ ⊃c Δ1++A∧B::Δ2 | cOrL : forall A B Γ1 Γ2 Δ, Γ1++A::Γ2 ⊃c Δ -> Γ1++B::Γ2 ⊃c Δ -> Γ1++A∨B::Γ2 ⊃c Δ | cOrR : forall A B Γ Δ1 Δ2, Γ ⊃c Δ1++A::B::Δ2 -> Γ ⊃c Δ1++A∨B::Δ2 | cImpL : forall A B Γ1 Γ2 Δ, Γ1++B::Γ2 ⊃c Δ -> Γ1++Γ2 ⊃c A::Δ -> Γ1++A→B::Γ2 ⊃c Δ | cImpR : forall A B Γ Δ1 Δ2, A::Γ ⊃c Δ1++B::Δ2 -> Γ ⊃c Δ1++A→B::Δ2 where "Γ ⊃c Δ" := (Gcf Γ Δ) : My_scope. Notation "Γ =⊃ Δ" := (forall v,Satisfies v Γ->Validates v Δ) (at level 80). Inductive Atomic : Set := | AVar : PropVars -> Atomic | ABot : Atomic . Fixpoint AtomicF (P:Atomic) : PropF := match P with | AVar P => #P | ABot => ⊥ end. Fixpoint size A : nat := match A with | # P => 0 | ⊥ => 0 | B ∨ C => S (size B + size C) | B ∧ C => S (size B + size C) | B → C => S (size B + size C) end. Definition sizel := map_fold_right size plus 0. Definition sizes Γ Δ:= sizel Γ + sizel Δ. Theorem G_to_Gcf : forall Γ Δ, Γ ⊃c Δ -> Γ ⊃ Δ. Proof. (* Goal: None *) induction 1;[econstructor|constructor|constr..];eassumption. Qed. Theorem G_sound : forall Γ Δ, Γ ⊃ Δ -> Γ =⊃ Δ. Proof. (* Goal: None *) intros. (* Goal: None *) apply G_to_Nc in H. (* Goal: None *) apply Soundness_general in H. (* Goal: None *) remember (H v H0). (* Goal: None *) clear -i H0. (* Goal: None *) induction Δ. (* Goal: None *) (* Goal: None *) contradiction. (* Goal: None *) simpl in i. (* Goal: None *) case_eq (TrueQ v a);intro K;rewrite K in *;simpl in *. (* Goal: None *) (* Goal: None *) exists a;split;[in_solve|rewrite K;trivial]. (* Goal: None *) destruct (IHΔ i) as (?&?&?). (* Goal: None *) exists x;split;[in_solve|assumption]. Qed. Lemma Atomic_eqdec : forall x y : Atomic, {x = y} + {x <> y}. Proof. (* Goal: forall x y : Atomic, sumbool (@eq Atomic x y) (not (@eq Atomic 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 sizes_comm : forall Γ Δ, sizes Γ Δ = sizes Δ Γ. Proof. (* Goal: None *) intros;unfold sizes;apply plus_comm;reflexivity. Qed. Lemma sizes_comm_r : forall Γ1 Γ2 A Δ, sizes (Γ1 ++ Γ2) (A :: Δ) = sizes (Γ1 ++ A::Γ2) Δ. Proof. (* Goal: None *) intros;induction Γ1;unfold sizes;unfold sizel;simpl. (* Goal: None *) (* Goal: None *) rewrite plus_assoc;f_equal;apply plus_comm. (* Goal: None *) rewrite <- !plus_assoc;f_equal;apply IHΓ1. Qed. Lemma sizes_comm_l : forall Γ1 Γ2 A Δ, sizes (A :: Δ) (Γ1 ++ Γ2) = sizes Δ (Γ1 ++ A::Γ2). Proof. (* Goal: None *) intros;rewrite sizes_comm;rewrite sizes_comm_r;apply sizes_comm. Qed. Lemma le_plus_trans_r : forall n m p, n <= m -> n <= p + m. Proof. (* Goal: forall (n m p : nat) (_ : le n m), le n (Nat.add p m) *) intros;rewrite plus_comm;apply le_plus_trans;assumption. Qed. Lemma sizes_decr : (forall A B Γ1 Γ2 Δ, sizes (Γ1++A::B::Γ2) Δ < sizes (Γ1++A∧B::Γ2) Δ)/\ (forall A B Γ Δ1 Δ2, sizes Γ (Δ1++A::Δ2) < sizes Γ (Δ1++A∧B::Δ2))/\ (forall A B Γ Δ1 Δ2, sizes Γ (Δ1++B::Δ2) < sizes Γ (Δ1++A∧B::Δ2))/\ (forall A B Γ1 Γ2 Δ, sizes (Γ1++A::Γ2) Δ < sizes (Γ1++A∨B::Γ2) Δ)/\ (forall A B Γ1 Γ2 Δ, sizes (Γ1++B::Γ2) Δ < sizes (Γ1++A∨B::Γ2) Δ)/\ (forall A B Γ Δ1 Δ2, sizes Γ (Δ1++A::B::Δ2) < sizes Γ (Δ1++A∨B::Δ2))/\ (forall A B Γ1 Γ2 Δ, sizes (Γ1++B::Γ2) Δ < sizes (Γ1++A→B::Γ2) Δ)/\ (forall A B Γ1 Γ2 Δ, sizes (Γ1++Γ2) (A::Δ) < sizes (Γ1++A→B::Γ2) Δ)/\ (forall A B Γ Δ1 Δ2, sizes (A::Γ)(Δ1++B::Δ2)< sizes Γ (Δ1++A→B::Δ2)). Proof. (* Goal: None *) repeat split;intros;try (rewrite sizes_comm_l||rewrite sizes_comm_r); apply plus_lt_compat_l||apply plus_lt_compat_r;induction Γ1||induction Δ1; unfold sizel;simpl;try (apply plus_lt_compat_l;apply IHΓ1||apply IHΔ1); apply le_lt_n_Sm;rewrite <- plus_assoc;try constructor; try apply plus_le_compat_l;apply le_plus_trans_r;constructor. Qed. Lemma size_O_atomic : forall Γ, sizel Γ=0 -> exists l, Γ = map AtomicF l. Proof. (* Goal: None *) intros;induction Γ. (* Goal: None *) (* Goal: None *) exists [];reflexivity. (* Goal: None *) destruct a;try (apply plus_is_O in H as (?&_);simpl in H;discriminate); unfold sizel in H;simpl in H; destruct (IHΓ H);[exists (AVar p::x)|exists (ABot::x)];simpl;f_equal;assumption. Qed. Ltac temp4 := try contradiction;do 2 econstructor;repeat ((left;in_solve;fail)||right);in_solve. Lemma bool_false : forall b, b=false -> ~Is_true b. Proof. (* Goal: forall (b : bool) (_ : @eq bool b false), not (Is_true b) *) intros;subst;auto. Qed. Lemma size_S : forall n Γ Δ, sizes Γ Δ = S n -> exists A B, In (A→B) Γ \/ In (A→B) Δ \/ In (A∨B) Γ \/ In (A∨B) Δ \/ In (A∧B) Γ \/ In (A∧B) Δ. Proof. (* Goal: None *) intros. (* Goal: None *) induction Γ;[unfold sizes in H;simpl in H;induction Δ;[discriminate|]|]; (destruct a;[| |temp4..]);unfold sizel in H;simpl in H; destruct (IHΔ H) as (?&?&[|[|[|[|[]]]]])||destruct (IHΓ H) as (?&?&[|[|[|[|[]]]]]);temp4. Qed. Ltac temp5 A B Hy := let C:= fresh "C" with K1 := fresh "K" with K2 := fresh "KK" in intros v L;case_eq (TrueQ v A);case_eq (TrueQ v B);intros K1 K2; try (exists A;split;[in_solve|rewrite K2;simpl;exact I];fail); try (exists B;split;[in_solve|rewrite K1;simpl;exact I];fail); try (exfalso;apply (bool_false K1);apply L;in_solve;fail); try (exfalso;apply (bool_false K2);apply L;in_solve;fail); (destruct (Hy v) as (C&?&?); [intros ? ?;in_solve;try (apply L;in_solve;fail); simpl;try rewrite K1;try rewrite K2;simpl;exact I| in_solve;try (exists C;split;[in_solve|assumption];fail); simpl in *;rewrite K1 in *;rewrite K2 in *;simpl in *;contradiction ]). Theorem Gcf_complete_induction : forall n Γ Δ, sizes Γ Δ <= n -> Γ =⊃ Δ -> Γ ⊃c Δ. Proof. (* Goal: None *) induction n;intros. (* Goal: Gcf Γ Δ *) (* Goal: Gcf Γ Δ *) inversion H. (* Goal: Gcf Γ Δ *) (* Goal: Gcf Γ Δ *) apply plus_is_O in H2 as (?&?). (* Goal: Gcf Γ Δ *) (* Goal: Gcf Γ Δ *) apply size_O_atomic in H1 as (?&?);apply size_O_atomic in H2 as (?&?);subst. (* Goal: Gcf Γ Δ *) (* Goal: None *) remember (fun P => if (in_dec Atomic_eqdec (AVar P) x) then true else false) as v. (* Goal: Gcf Γ Δ *) (* Goal: None *) destruct (in_dec Atomic_eqdec ABot x). (* Goal: Gcf Γ Δ *) (* Goal: None *) (* Goal: None *) constructor 2;change ⊥ with (AtomicF ABot);eapply in_map;assumption. (* Goal: Gcf Γ Δ *) (* Goal: None *) destruct (H0 v) as (?&?&?). (* Goal: Gcf Γ Δ *) (* Goal: None *) (* Goal: None *) intros ? ?. (* Goal: Gcf Γ Δ *) (* Goal: None *) (* Goal: None *) apply in_map_iff in H1 as (?&?&?);subst A;simpl;destruct x1. (* Goal: Gcf Γ Δ *) (* Goal: None *) (* Goal: None *) (* Goal: None *) rewrite Heqv;simpl. (* Goal: Gcf Γ Δ *) (* Goal: None *) (* Goal: None *) (* Goal: Is_true (if @in_dec Atomic Atomic_eqdec (AVar p) x then true else false) *) destruct (in_dec Atomic_eqdec (AVar p) x);[exact I|contradiction]. (* Goal: Gcf Γ Δ *) (* Goal: None *) (* Goal: None *) contradiction. (* Goal: Gcf Γ Δ *) (* Goal: None *) apply in_map_iff in H1 as (?&?&?);subst x1. (* Goal: Gcf Γ Δ *) (* Goal: None *) destruct x2. (* Goal: Gcf Γ Δ *) (* Goal: None *) (* Goal: None *) constructor 1 with p. (* Goal: Gcf Γ Δ *) (* Goal: None *) (* Goal: None *) (* Goal: None *) change #p with (AtomicF (AVar p));apply in_map. (* Goal: Gcf Γ Δ *) (* Goal: None *) (* Goal: None *) (* Goal: @In Atomic (AVar p) x *) simpl in H2;rewrite Heqv in H2. (* Goal: Gcf Γ Δ *) (* Goal: None *) (* Goal: None *) (* Goal: @In Atomic (AVar p) x *) destruct (in_dec Atomic_eqdec (AVar p));[assumption|contradiction]. (* Goal: Gcf Γ Δ *) (* Goal: None *) (* Goal: None *) change #p with (AtomicF (AVar p)). (* Goal: Gcf Γ Δ *) (* Goal: None *) (* Goal: None *) apply in_map. (* Goal: Gcf Γ Δ *) (* Goal: None *) (* Goal: @In Atomic (AVar p) x0 *) assumption. (* Goal: Gcf Γ Δ *) (* Goal: None *) contradiction. (* Goal: Gcf Γ Δ *) inversion H;[clear H|apply IHn;assumption];destruct (size_S _ _ H2) as (A&B&[|[|[|[|[]]]]]); apply in_split in H as (?&?&?);subst;constr;apply IHn; try (apply le_S_n;rewrite <- H2;apply sizes_decr);temp5 A B H0. Qed. Theorem Gcf_complete : forall Γ Δ, Γ =⊃ Δ -> Γ ⊃c Δ. Proof. (* Goal: None *) intros;eapply Gcf_complete_induction;[constructor|assumption]. Qed. Theorem Cut_elimination : forall Γ Δ, Γ ⊃ Δ -> Γ ⊃c Δ. Proof. (* Goal: None *) intros. (* Goal: Gcf Γ Δ *) apply Gcf_complete. (* Goal: None *) apply G_sound. (* Goal: None *) assumption. Qed. Print Assumptions Cut_elimination. End cut_mod.
Require Import mathcomp.ssreflect.ssreflect. From mathcomp Require Import ssrfun ssrbool eqtype ssrnat seq choice fintype. Set Implicit Arguments. Unset Strict Implicit. Unset Printing Implicit Defensive. Section Def. Variables (n : nat) (T : Type). Structure tuple_of : Type := Tuple {tval :> seq T; _ : size tval == n}. Canonical tuple_subType := Eval hnf in [subType for tval]. Implicit Type t : tuple_of. Definition tsize of tuple_of := n. Lemma size_tuple t : size t = n. Proof. (* Goal: @eq nat (@size T (tval t)) n *) exact: (eqP (valP t)). Qed. Lemma tnth_default t : 'I_n -> T. Proof. (* Goal: forall _ : ordinal n, T *) by rewrite -(size_tuple t); case: (tval t) => [|//] []. Qed. Definition tnth t i := nth (tnth_default t i) t i. Lemma tnth_nth x t i : tnth t i = nth x t i. Proof. (* Goal: @eq T (tnth t i) (@nth T x (tval t) (@nat_of_ord n i)) *) by apply: set_nth_default; rewrite size_tuple. Qed. Lemma map_tnth_enum t : map (tnth t) (enum 'I_n) = t. Proof. (* Goal: @eq (list T) (@map (ordinal n) T (tnth t) (@enum_mem (ordinal_finType n) (@mem (ordinal n) (predPredType (ordinal n)) (@sort_of_simpl_pred (ordinal n) (pred_of_argType (ordinal n)))))) (tval t) *) case def_t: {-}(val t) => [|x0 t']. (* Goal: @eq (list T) (@map (ordinal n) T (tnth t) (@enum_mem (ordinal_finType n) (@mem (ordinal n) (predPredType (ordinal n)) (@sort_of_simpl_pred (ordinal n) (pred_of_argType (ordinal n)))))) (@val (list T) (fun x : list T => @eq_op nat_eqType (@size T x) n) tuple_subType t) *) (* Goal: @eq (list T) (@map (ordinal n) T (tnth t) (@enum_mem (ordinal_finType n) (@mem (ordinal n) (predPredType (ordinal n)) (@sort_of_simpl_pred (ordinal n) (pred_of_argType (ordinal n)))))) (@val (list T) (fun x : list T => @eq_op nat_eqType (@size T x) n) tuple_subType t) *) by rewrite [enum _]size0nil // -cardE card_ord -(size_tuple t) def_t. (* Goal: @eq (list T) (@map (ordinal n) T (tnth t) (@enum_mem (ordinal_finType n) (@mem (ordinal n) (predPredType (ordinal n)) (@sort_of_simpl_pred (ordinal n) (pred_of_argType (ordinal n)))))) (@val (list T) (fun x : list T => @eq_op nat_eqType (@size T x) n) tuple_subType t) *) apply: (@eq_from_nth _ x0) => [|i]; rewrite size_map. (* Goal: forall _ : is_true (leq (S i) (@size (ordinal n) (@enum_mem (ordinal_finType n) (@mem (ordinal n) (predPredType (ordinal n)) (@sort_of_simpl_pred (ordinal n) (pred_of_argType (ordinal n))))))), @eq T (@nth T x0 (@map (ordinal n) T (tnth t) (@enum_mem (ordinal_finType n) (@mem (ordinal n) (predPredType (ordinal n)) (@sort_of_simpl_pred (ordinal n) (pred_of_argType (ordinal n)))))) i) (@nth T x0 (@val (list T) (fun x : list T => @eq_op nat_eqType (@size T x) n) tuple_subType t) i) *) (* Goal: @eq nat (@size (ordinal n) (@enum_mem (ordinal_finType n) (@mem (ordinal n) (predPredType (ordinal n)) (@sort_of_simpl_pred (ordinal n) (pred_of_argType (ordinal n)))))) (@size T (@val (list T) (fun x : list T => @eq_op nat_eqType (@size T x) n) tuple_subType t)) *) by rewrite -cardE size_tuple card_ord. (* Goal: forall _ : is_true (leq (S i) (@size (ordinal n) (@enum_mem (ordinal_finType n) (@mem (ordinal n) (predPredType (ordinal n)) (@sort_of_simpl_pred (ordinal n) (pred_of_argType (ordinal n))))))), @eq T (@nth T x0 (@map (ordinal n) T (tnth t) (@enum_mem (ordinal_finType n) (@mem (ordinal n) (predPredType (ordinal n)) (@sort_of_simpl_pred (ordinal n) (pred_of_argType (ordinal n)))))) i) (@nth T x0 (@val (list T) (fun x : list T => @eq_op nat_eqType (@size T x) n) tuple_subType t) i) *) move=> lt_i_e; have lt_i_n: i < n by rewrite -cardE card_ord in lt_i_e. (* Goal: @eq T (@nth T x0 (@map (ordinal n) T (tnth t) (@enum_mem (ordinal_finType n) (@mem (ordinal n) (predPredType (ordinal n)) (@sort_of_simpl_pred (ordinal n) (pred_of_argType (ordinal n)))))) i) (@nth T x0 (@val (list T) (fun x : list T => @eq_op nat_eqType (@size T x) n) tuple_subType t) i) *) by rewrite (nth_map (Ordinal lt_i_n)) // (tnth_nth x0) nth_enum_ord. Qed. Lemma eq_from_tnth t1 t2 : tnth t1 =1 tnth t2 -> t1 = t2. Proof. (* Goal: forall _ : @eqfun T (ordinal n) (tnth t1) (tnth t2), @eq tuple_of t1 t2 *) by move/eq_map=> eq_t; apply: val_inj; rewrite /= -!map_tnth_enum eq_t. Qed. Definition tuple t mkT : tuple_of := mkT (let: Tuple _ tP := t return size t == n in tP). Lemma tupleE t : tuple (fun sP => @Tuple t sP) = t. Proof. (* Goal: @eq tuple_of (@tuple t (fun sP : is_true (@eq_op nat_eqType (@size T (tval t)) n) => @Tuple (tval t) sP)) t *) by case: t. Qed. End Def. Notation "n .-tuple" := (tuple_of n) (at level 2, format "n .-tuple") : type_scope. Notation "{ 'tuple' n 'of' T }" := (n.-tuple T : predArgType) (at level 0, only parsing) : form_scope. Notation "[ 'tuple' 'of' s ]" := (tuple (fun sP => @Tuple _ _ s sP)) (at level 0, format "[ 'tuple' 'of' s ]") : form_scope. Notation "[ 'tnth' t i ]" := (tnth t (@Ordinal (tsize t) i (erefl true))) (at level 0, t, i at level 8, format "[ 'tnth' t i ]") : form_scope. Canonical nil_tuple T := Tuple (isT : @size T [::] == 0). Canonical cons_tuple n T x (t : n.-tuple T) := Tuple (valP t : size (x :: t) == n.+1). Notation "[ 'tuple' x1 ; .. ; xn ]" := [tuple of x1 :: .. [:: xn] ..] (at level 0, format "[ 'tuple' '[' x1 ; '/' .. ; '/' xn ']' ]") : form_scope. Notation "[ 'tuple' ]" := [tuple of [::]] (at level 0, format "[ 'tuple' ]") : form_scope. Section CastTuple. Variable T : Type. Definition in_tuple (s : seq T) := Tuple (eqxx (size s)). Definition tcast m n (eq_mn : m = n) t := let: erefl in _ = n := eq_mn return n.-tuple T in t. Lemma tcastE m n (eq_mn : m = n) t i : tnth (tcast eq_mn t) i = tnth t (cast_ord (esym eq_mn) i). Proof. (* Goal: @eq T (@tnth n T (@tcast m n eq_mn t) i) (@tnth m T t (@cast_ord n m (@esym nat m n eq_mn) i)) *) by case: n / eq_mn in i *; rewrite cast_ord_id. Qed. Lemma tcast_id n (eq_nn : n = n) t : tcast eq_nn t = t. Proof. (* Goal: @eq (tuple_of n T) (@tcast n n eq_nn t) t *) by rewrite (eq_axiomK eq_nn). Qed. Lemma tcastK m n (eq_mn : m = n) : cancel (tcast eq_mn) (tcast (esym eq_mn)). Proof. (* Goal: @cancel (tuple_of n T) (tuple_of m T) (@tcast m n eq_mn) (@tcast n m (@esym nat m n eq_mn)) *) by case: n / eq_mn. Qed. Lemma tcastKV m n (eq_mn : m = n) : cancel (tcast (esym eq_mn)) (tcast eq_mn). Proof. (* Goal: @cancel (tuple_of m T) (tuple_of n T) (@tcast n m (@esym nat m n eq_mn)) (@tcast m n eq_mn) *) by case: n / eq_mn. Qed. Lemma tcast_trans m n p (eq_mn : m = n) (eq_np : n = p) t: tcast (etrans eq_mn eq_np) t = tcast eq_np (tcast eq_mn t). Proof. (* Goal: @eq (tuple_of p T) (@tcast m p (@etrans nat m n p eq_mn eq_np) t) (@tcast n p eq_np (@tcast m n eq_mn t)) *) by case: n / eq_mn eq_np; case: p /. Qed. Lemma tvalK n (t : n.-tuple T) : in_tuple t = tcast (esym (size_tuple t)) t. Proof. (* Goal: @eq (tuple_of (@size T (@tval n T t)) T) (in_tuple (@tval n T t)) (@tcast n (@size T (@tval n T t)) (@esym nat (@size T (@tval n T t)) n (@size_tuple n T t)) t) *) by apply: val_inj => /=; case: _ / (esym _). Qed. End CastTuple. Section SeqTuple. Variables (n m : nat) (T U rT : Type). Implicit Type t : n.-tuple T. Lemma rcons_tupleP t x : size (rcons t x) == n.+1. Proof. (* Goal: is_true (@eq_op nat_eqType (@size T (@rcons T (@tval n T t) x)) (S n)) *) by rewrite size_rcons size_tuple. Qed. Canonical rcons_tuple t x := Tuple (rcons_tupleP t x). Lemma nseq_tupleP x : @size T (nseq n x) == n. Proof. (* Goal: is_true (@eq_op nat_eqType (@size T (@nseq T n x)) n) *) by rewrite size_nseq. Qed. Canonical nseq_tuple x := Tuple (nseq_tupleP x). Lemma iota_tupleP : size (iota m n) == n. Proof. (* Goal: is_true (@eq_op nat_eqType (@size nat (iota m n)) n) *) by rewrite size_iota. Qed. Canonical iota_tuple := Tuple iota_tupleP. Lemma behead_tupleP t : size (behead t) == n.-1. Proof. (* Goal: is_true (@eq_op nat_eqType (@size T (@behead T (@tval n T t))) (Nat.pred n)) *) by rewrite size_behead size_tuple. Qed. Canonical behead_tuple t := Tuple (behead_tupleP t). Lemma belast_tupleP x t : size (belast x t) == n. Proof. (* Goal: is_true (@eq_op nat_eqType (@size T (@belast T x (@tval n T t))) n) *) by rewrite size_belast size_tuple. Qed. Canonical belast_tuple x t := Tuple (belast_tupleP x t). Lemma cat_tupleP t (u : m.-tuple T) : size (t ++ u) == n + m. Proof. (* Goal: is_true (@eq_op nat_eqType (@size T (@cat T (@tval n T t) (@tval m T u))) (addn n m)) *) by rewrite size_cat !size_tuple. Qed. Canonical cat_tuple t u := Tuple (cat_tupleP t u). Lemma take_tupleP t : size (take m t) == minn m n. Proof. (* Goal: is_true (@eq_op nat_eqType (@size T (@take T m (@tval n T t))) (minn m n)) *) by rewrite size_take size_tuple eqxx. Qed. Canonical take_tuple t := Tuple (take_tupleP t). Lemma drop_tupleP t : size (drop m t) == n - m. Proof. (* Goal: is_true (@eq_op nat_eqType (@size T (@drop T m (@tval n T t))) (subn n m)) *) by rewrite size_drop size_tuple. Qed. Canonical drop_tuple t := Tuple (drop_tupleP t). Lemma rev_tupleP t : size (rev t) == n. Proof. (* Goal: is_true (@eq_op nat_eqType (@size T (@rev T (@tval n T t))) n) *) by rewrite size_rev size_tuple. Qed. Canonical rev_tuple t := Tuple (rev_tupleP t). Lemma rot_tupleP t : size (rot m t) == n. Proof. (* Goal: is_true (@eq_op nat_eqType (@size T (@rot T m (@tval n T t))) n) *) by rewrite size_rot size_tuple. Qed. Canonical rot_tuple t := Tuple (rot_tupleP t). Lemma rotr_tupleP t : size (rotr m t) == n. Proof. (* Goal: is_true (@eq_op nat_eqType (@size T (@rotr T m (@tval n T t))) n) *) by rewrite size_rotr size_tuple. Qed. Canonical rotr_tuple t := Tuple (rotr_tupleP t). Lemma map_tupleP f t : @size rT (map f t) == n. Proof. (* Goal: is_true (@eq_op nat_eqType (@size rT (@map T rT f (@tval n T t))) n) *) by rewrite size_map size_tuple. Qed. Canonical map_tuple f t := Tuple (map_tupleP f t). Lemma scanl_tupleP f x t : @size rT (scanl f x t) == n. Proof. (* Goal: is_true (@eq_op nat_eqType (@size rT (@scanl rT T f x (@tval n T t))) n) *) by rewrite size_scanl size_tuple. Qed. Canonical scanl_tuple f x t := Tuple (scanl_tupleP f x t). Lemma pairmap_tupleP f x t : @size rT (pairmap f x t) == n. Proof. (* Goal: is_true (@eq_op nat_eqType (@size rT (@pairmap T rT f x (@tval n T t))) n) *) by rewrite size_pairmap size_tuple. Qed. Canonical pairmap_tuple f x t := Tuple (pairmap_tupleP f x t). Lemma zip_tupleP t (u : n.-tuple U) : size (zip t u) == n. Proof. (* Goal: is_true (@eq_op nat_eqType (@size (prod T U) (@zip T U (@tval n T t) (@tval n U u))) n) *) by rewrite size1_zip !size_tuple. Qed. Canonical zip_tuple t u := Tuple (zip_tupleP t u). Lemma allpairs_tupleP f t (u : m.-tuple U) : @size rT (allpairs f t u) == n * m. Proof. (* Goal: is_true (@eq_op nat_eqType (@size rT (@allpairs T U rT f (@tval n T t) (@tval m U u))) (muln n m)) *) by rewrite size_allpairs !size_tuple. Qed. Canonical allpairs_tuple f t u := Tuple (allpairs_tupleP f t u). Definition thead (u : n.+1.-tuple T) := tnth u ord0. Lemma tnth0 x t : tnth [tuple of x :: t] ord0 = x. Proof. (* Goal: @eq T (@tnth (S n) T (@tuple (S n) T (@cons_tuple n T x t) (fun sP : is_true (@eq_op nat_eqType (@size T (@tval (S n) T (@cons_tuple n T x t))) (S n)) => @Tuple (S n) T (@cons T x (@tval n T t)) sP)) (@ord0 n)) x *) by []. Qed. Lemma theadE x t : thead [tuple of x :: t] = x. Proof. (* Goal: @eq T (thead (@tuple (S n) T (@cons_tuple n T x t) (fun sP : is_true (@eq_op nat_eqType (@size T (@tval (S n) T (@cons_tuple n T x t))) (S n)) => @Tuple (S n) T (@cons T x (@tval n T t)) sP))) x *) by []. Qed. Lemma tuple0 : all_equal_to ([tuple] : 0.-tuple T). Proof. (* Goal: @all_equal_to (tuple_of O T) (@tuple O T (nil_tuple T) (fun sP : is_true (@eq_op nat_eqType (@size T (@tval O T (nil_tuple T))) O) => @Tuple O T (@nil T) sP) : tuple_of O T) *) by move=> t; apply: val_inj; case: t => [[]]. Qed. Variant tuple1_spec : n.+1.-tuple T -> Type := Tuple1spec x t : tuple1_spec [tuple of x :: t]. Lemma tupleP u : tuple1_spec u. Proof. (* Goal: tuple1_spec u *) case: u => [[|x s] //= sz_s]; pose t := @Tuple n _ s sz_s. (* Goal: tuple1_spec (@Tuple (S n) T (@cons T x s) sz_s) *) by rewrite (_ : Tuple _ = [tuple of x :: t]) //; apply: val_inj. Qed. Lemma tnth_map f t i : tnth [tuple of map f t] i = f (tnth t i) :> rT. Proof. (* Goal: @eq rT (@tnth n rT (@tuple n rT (map_tuple f t) (fun sP : is_true (@eq_op nat_eqType (@size rT (@tval n rT (map_tuple f t))) n) => @Tuple n rT (@map T rT f (@tval n T t)) sP)) i) (f (@tnth n T t i)) *) by apply: nth_map; rewrite size_tuple. Qed. End SeqTuple. Lemma tnth_behead n T (t : n.+1.-tuple T) i : Proof. (* Goal: @eq T (@tnth (Nat.pred (S n)) T (@tuple (Nat.pred (S n)) T (@behead_tuple (S n) T t) (fun sP : is_true (@eq_op nat_eqType (@size T (@tval (Nat.pred (S n)) T (@behead_tuple (S n) T t))) (Nat.pred (S n))) => @Tuple (Nat.pred (S n)) T (@behead T (@tval (S n) T t)) sP)) i) (@tnth (S n) T t (@inord n (S (@nat_of_ord (Nat.pred (S n)) i)))) *) by case/tupleP: t => x t; rewrite !(tnth_nth x) inordK ?ltnS. Qed. Lemma tuple_eta n T (t : n.+1.-tuple T) : t = [tuple of thead t :: behead t]. Proof. (* Goal: @eq (tuple_of (S n) T) t (@tuple (S (Nat.pred (S n))) T (@cons_tuple (Nat.pred (S n)) T (@thead n T t) (@behead_tuple (S n) T t)) (fun sP : is_true (@eq_op nat_eqType (@size T (@tval (S (Nat.pred (S n))) T (@cons_tuple (Nat.pred (S n)) T (@thead n T t) (@behead_tuple (S n) T t)))) (S (Nat.pred (S n)))) => @Tuple (S (Nat.pred (S n))) T (@cons T (@thead n T t) (@behead T (@tval (S n) T t))) sP)) *) by case/tupleP: t => x t; apply: val_inj. Qed. Section TupleQuantifiers. Variables (n : nat) (T : Type). Implicit Types (a : pred T) (t : n.-tuple T). Lemma forallb_tnth a t : [forall i, a (tnth t i)] = all a t. Proof. (* Goal: @eq bool (@FiniteQuant.quant0b (ordinal_finType n) (fun i : Finite.sort (ordinal_finType n) => @FiniteQuant.all (ordinal_finType n) (FiniteQuant.Quantified (a (@tnth n T t i))) i)) (@all T a (@tval n T t)) *) apply: negb_inj; rewrite -has_predC -has_map negb_forall. (* Goal: @eq bool (negb (@FiniteQuant.quant0b (ordinal_finType n) (fun x : Finite.sort (ordinal_finType n) => @FiniteQuant.ex (ordinal_finType n) (FiniteQuant.Quantified (negb (a (@tnth n T t x)))) x))) (@has bool negb (@map T bool a (@tval n T t))) *) apply/existsP/(has_nthP true) => [[i a_t_i] | [i lt_i_n a_t_i]]. (* Goal: @ex (Finite.sort (ordinal_finType n)) (fun x : Finite.sort (ordinal_finType n) => is_true (negb (a (@tnth n T t x)))) *) (* Goal: @ex2 nat (fun i : nat => is_true (leq (S i) (@size bool (@map T bool a (@tval n T t))))) (fun i : nat => is_true (negb (@nth bool true (@map T bool a (@tval n T t)) i))) *) by exists i; rewrite ?size_tuple // -tnth_nth tnth_map. (* Goal: @ex (Finite.sort (ordinal_finType n)) (fun x : Finite.sort (ordinal_finType n) => is_true (negb (a (@tnth n T t x)))) *) rewrite size_tuple in lt_i_n; exists (Ordinal lt_i_n). (* Goal: is_true (negb (a (@tnth n T t (@Ordinal n i lt_i_n)))) *) by rewrite -tnth_map (tnth_nth true). Qed. Lemma existsb_tnth a t : [exists i, a (tnth t i)] = has a t. Proof. (* Goal: @eq bool (negb (@FiniteQuant.quant0b (ordinal_finType n) (fun i : Finite.sort (ordinal_finType n) => @FiniteQuant.ex (ordinal_finType n) (FiniteQuant.Quantified (a (@tnth n T t i))) i))) (@has T a (@tval n T t)) *) by apply: negb_inj; rewrite negb_exists -all_predC -forallb_tnth. Qed. Lemma all_tnthP a t : reflect (forall i, a (tnth t i)) (all a t). Proof. (* Goal: Bool.reflect (forall i : ordinal n, is_true (a (@tnth n T t i))) (@all T a (@tval n T t)) *) by rewrite -forallb_tnth; apply: forallP. Qed. Lemma has_tnthP a t : reflect (exists i, a (tnth t i)) (has a t). Proof. (* Goal: Bool.reflect (@ex (ordinal n) (fun i : ordinal n => is_true (a (@tnth n T t i)))) (@has T a (@tval n T t)) *) by rewrite -existsb_tnth; apply: existsP. Qed. End TupleQuantifiers. Arguments all_tnthP {n T a t}. Arguments has_tnthP {n T a t}. Section EqTuple. Variables (n : nat) (T : eqType). Definition tuple_eqMixin := Eval hnf in [eqMixin of n.-tuple T by <:]. Canonical tuple_eqType := Eval hnf in EqType (n.-tuple T) tuple_eqMixin. Canonical tuple_predType := Eval hnf in mkPredType (fun t : n.-tuple T => mem_seq t). Lemma memtE (t : n.-tuple T) : mem t = mem (tval t). Proof. (* Goal: @eq (mem_pred (Equality.sort T)) (@mem (Equality.sort T) tuple_predType t) (@mem (Equality.sort T) (seq_predType T) (@tval n (Equality.sort T) t)) *) by []. Qed. Lemma mem_tnth i (t : n.-tuple T) : tnth t i \in t. Proof. (* Goal: is_true (@in_mem (Equality.sort T) (@tnth n (Equality.sort T) t i) (@mem (Equality.sort T) tuple_predType t)) *) by rewrite mem_nth ?size_tuple. Qed. Lemma memt_nth x0 (t : n.-tuple T) i : i < n -> nth x0 t i \in t. Proof. (* Goal: forall _ : is_true (leq (S i) n), is_true (@in_mem (Equality.sort T) (@nth (Equality.sort T) x0 (@tval n (Equality.sort T) t) i) (@mem (Equality.sort T) tuple_predType t)) *) by move=> i_lt_n; rewrite mem_nth ?size_tuple. Qed. Lemma tnthP (t : n.-tuple T) x : reflect (exists i, x = tnth t i) (x \in t). Proof. (* Goal: Bool.reflect (@ex (ordinal n) (fun i : ordinal n => @eq (Equality.sort T) x (@tnth n (Equality.sort T) t i))) (@in_mem (Equality.sort T) x (@mem (Equality.sort T) tuple_predType t)) *) apply: (iffP idP) => [/(nthP x)[i ltin <-] | [i ->]]; last exact: mem_tnth. (* Goal: @ex (ordinal n) (fun i0 : ordinal n => @eq (Equality.sort T) (@nth (Equality.sort T) x (@tval n (Equality.sort T) t) i) (@tnth n (Equality.sort T) t i0)) *) by rewrite size_tuple in ltin; exists (Ordinal ltin); rewrite (tnth_nth x). Qed. Lemma seq_tnthP (s : seq T) x : x \in s -> {i | x = tnth (in_tuple s) i}. Proof. (* Goal: forall _ : is_true (@in_mem (Equality.sort T) x (@mem (Equality.sort T) (seq_predType T) s)), @sig (ordinal (@size (Equality.sort T) s)) (fun i : ordinal (@size (Equality.sort T) s) => @eq (Equality.sort T) x (@tnth (@size (Equality.sort T) s) (Equality.sort T) (@in_tuple (Equality.sort T) s) i)) *) move=> s_x; pose i := index x s; have lt_i: i < size s by rewrite index_mem. (* Goal: @sig (ordinal (@size (Equality.sort T) s)) (fun i : ordinal (@size (Equality.sort T) s) => @eq (Equality.sort T) x (@tnth (@size (Equality.sort T) s) (Equality.sort T) (@in_tuple (Equality.sort T) s) i)) *) by exists (Ordinal lt_i); rewrite (tnth_nth x) nth_index. Qed. End EqTuple. Definition tuple_choiceMixin n (T : choiceType) := [choiceMixin of n.-tuple T by <:]. Canonical tuple_choiceType n (T : choiceType) := Eval hnf in ChoiceType (n.-tuple T) (tuple_choiceMixin n T). Definition tuple_countMixin n (T : countType) := [countMixin of n.-tuple T by <:]. Canonical tuple_countType n (T : countType) := Eval hnf in CountType (n.-tuple T) (tuple_countMixin n T). Canonical tuple_subCountType n (T : countType) := Eval hnf in [subCountType of n.-tuple T]. Module Type FinTupleSig. Section FinTupleSig. Variables (n : nat) (T : finType). Parameter enum : seq (n.-tuple T). Axiom enumP : Finite.axiom enum. Axiom size_enum : size enum = #|T| ^ n. End FinTupleSig. End FinTupleSig. Module FinTuple : FinTupleSig. Section FinTuple. Variables (n : nat) (T : finType). Definition enum : seq (n.-tuple T) := let extend e := flatten (codom (fun x => map (cons x) e)) in pmap insub (iter n extend [::[::]]). Lemma enumP : Finite.axiom enum. Proof. (* Goal: @Finite.axiom (tuple_eqType n (Finite.eqType T)) enum *) case=> /= t t_n; rewrite -(count_map _ (pred1 t)) (pmap_filter (insubK _)). (* Goal: @eq nat (@count (Equality.sort (seq_eqType (Finite.eqType T))) (@pred_of_simpl (Equality.sort (seq_eqType (Finite.eqType T))) (@pred1 (seq_eqType (Finite.eqType T)) t)) (@filter (list (Finite.sort T)) (fun x : list (Finite.sort T) => @isSome (@sub_sort (list (Finite.sort T)) (fun x0 : list (Finite.sort T) => @eq_op nat_eqType (@size (Finite.sort T) x0) n) (tuple_subType n (Finite.sort T))) (@insub (list (Finite.sort T)) (fun x0 : list (Finite.sort T) => @eq_op nat_eqType (@size (Finite.sort T) x0) n) (tuple_subType n (Finite.sort T)) x)) (@iter (list (list (Finite.sort T))) n (fun e : list (list (Finite.sort T)) => @flatten (list (Finite.sort T)) (@codom T (list (list (Finite.sort T))) (fun x : Finite.sort T => @map (list (Finite.sort T)) (list (Finite.sort T)) (@cons (Finite.sort T) x) e))) (@cons (list (Finite.sort T)) (@nil (Finite.sort T)) (@nil (list (Finite.sort T))))))) (S O) *) rewrite count_filter -(@eq_count _ (pred1 t)) => [|s /=]; last first. (* Goal: @eq nat (@count (Equality.sort (seq_eqType (Finite.eqType T))) (@pred_of_simpl (Equality.sort (seq_eqType (Finite.eqType T))) (@pred1 (seq_eqType (Finite.eqType T)) t)) (@iter (list (list (Finite.sort T))) n (fun e : list (list (Finite.sort T)) => @flatten (list (Finite.sort T)) (@codom T (list (list (Finite.sort T))) (fun x : Finite.sort T => @map (list (Finite.sort T)) (list (Finite.sort T)) (@cons (Finite.sort T) x) e))) (@cons (list (Finite.sort T)) (@nil (Finite.sort T)) (@nil (list (Finite.sort T)))))) (S O) *) (* Goal: @eq bool (@eq_op (seq_eqType (Finite.eqType T)) s t) (andb (@eq_op (seq_eqType (Finite.eqType T)) s t) (@isSome (tuple_of n (Finite.sort T)) (@insub (list (Finite.sort T)) (fun x : list (Finite.sort T) => @eq_op nat_eqType (@size (Finite.sort T) x) n) (tuple_subType n (Finite.sort T)) s))) *) by rewrite isSome_insub; case: eqP=> // ->. (* Goal: @eq nat (@count (Equality.sort (seq_eqType (Finite.eqType T))) (@pred_of_simpl (Equality.sort (seq_eqType (Finite.eqType T))) (@pred1 (seq_eqType (Finite.eqType T)) t)) (@iter (list (list (Finite.sort T))) n (fun e : list (list (Finite.sort T)) => @flatten (list (Finite.sort T)) (@codom T (list (list (Finite.sort T))) (fun x : Finite.sort T => @map (list (Finite.sort T)) (list (Finite.sort T)) (@cons (Finite.sort T) x) e))) (@cons (list (Finite.sort T)) (@nil (Finite.sort T)) (@nil (list (Finite.sort T)))))) (S O) *) elim: n t t_n => [|m IHm] [|x t] //= {IHm}/IHm; move: (iter m _ _) => em IHm. (* Goal: @eq nat (@count (list (Finite.sort T)) (@pred_of_simpl (list (Finite.sort T)) (@pred1 (seq_eqType (Finite.eqType T)) (@cons (Finite.sort T) x t))) (@flatten (list (Finite.sort T)) (@codom T (list (list (Finite.sort T))) (fun x : Finite.sort T => @map (list (Finite.sort T)) (list (Finite.sort T)) (@cons (Finite.sort T) x) em)))) (S O) *) transitivity (x \in T : nat); rewrite // -mem_enum codomE. (* Goal: @eq nat (@count (list (Finite.sort T)) (@pred_of_simpl (list (Finite.sort T)) (@pred1 (seq_eqType (Finite.eqType T)) (@cons (Finite.sort T) x t))) (@flatten (list (Finite.sort T)) (@map (Finite.sort T) (list (list (Finite.sort T))) (fun x : Finite.sort T => @map (list (Finite.sort T)) (list (Finite.sort T)) (@cons (Finite.sort T) x) em) (@enum_mem 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))))))))) (nat_of_bool (@in_mem (Equality.sort (Finite.eqType T)) x (@mem (Equality.sort (Finite.eqType T)) (seq_predType (Finite.eqType T)) (@enum_mem 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))))))))) *) elim: (fintype.enum T) (enum_uniq T) => //= y e IHe /andP[/negPf ney]. (* Goal: forall _ : is_true (@uniq (Finite.eqType T) e), @eq nat (@count (list (Finite.sort T)) (@pred_of_simpl (list (Finite.sort T)) (@pred1 (seq_eqType (Finite.eqType T)) (@cons (Finite.sort T) x t))) (@cat (list (Finite.sort T)) (@map (list (Finite.sort T)) (list (Finite.sort T)) (@cons (Finite.sort T) y) em) (@flatten (list (Finite.sort T)) (@map (Finite.sort T) (list (list (Finite.sort T))) (fun x : Finite.sort T => @map (list (Finite.sort T)) (list (Finite.sort T)) (@cons (Finite.sort T) x) em) e)))) (nat_of_bool (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (seq_predType (Finite.eqType T)) (@cons (Finite.sort T) y e)))) *) rewrite count_cat count_map inE /preim /= {1}/eq_op /= eq_sym => /IHe->. (* Goal: @eq nat (addn (@count (list (Finite.sort T)) (@pred_of_simpl (list (Finite.sort T)) (@SimplPred (list (Finite.sort T)) (fun x0 : list (Finite.sort T) => andb (@eq_op (Finite.eqType T) x y) (@eqseq (Finite.eqType T) x0 t)))) em) (nat_of_bool (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (seq_predType (Finite.eqType T)) e)))) (nat_of_bool (orb (@eq_op (Finite.eqType T) x y) (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (seq_predType (Finite.eqType T)) e)))) *) by case: eqP => [->|_]; rewrite ?(ney, count_pred0, IHm). Qed. Lemma size_enum : size enum = #|T| ^ n. Proof. (* Goal: @eq nat (@size (tuple_of n (Finite.sort T)) enum) (expn (@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)))))) n) *) rewrite /= cardE size_pmap_sub; elim: n => //= m IHm. (* Goal: @eq nat (@count (list (Finite.sort T)) (fun x : list (Finite.sort T) => @eq_op nat_eqType (@size (Finite.sort T) x) (S m)) (@flatten (list (Finite.sort T)) (@codom T (list (list (Finite.sort T))) (fun x : Finite.sort T => @map (list (Finite.sort T)) (list (Finite.sort T)) (@cons (Finite.sort T) x) (@iter (list (list (Finite.sort T))) m (fun e : list (list (Finite.sort T)) => @flatten (list (Finite.sort T)) (@codom T (list (list (Finite.sort T))) (fun x0 : Finite.sort T => @map (list (Finite.sort T)) (list (Finite.sort T)) (@cons (Finite.sort T) x0) e))) (@cons (list (Finite.sort T)) (@nil (Finite.sort T)) (@nil (list (Finite.sort T))))))))) (expn (@size (Finite.sort T) (@enum_mem T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@sort_of_simpl_pred (Finite.sort T) (pred_of_argType (Finite.sort T)))))) (S m)) *) rewrite expnS /codom /image_mem; elim: {2 3}(fintype.enum T) => //= x e IHe. (* Goal: @eq nat (@count (list (Finite.sort T)) (fun x : list (Finite.sort T) => @eq_op nat_eqType (@size (Finite.sort T) x) (S m)) (@cat (list (Finite.sort T)) (@map (list (Finite.sort T)) (list (Finite.sort T)) (@cons (Finite.sort T) x) (@iter (list (list (Finite.sort T))) m (fun e : list (list (Finite.sort T)) => @flatten (list (Finite.sort T)) (@map (Finite.sort T) (list (list (Finite.sort T))) (fun x : Finite.sort T => @map (list (Finite.sort T)) (list (Finite.sort T)) (@cons (Finite.sort T) x) e) (@enum_mem T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@sort_of_simpl_pred (Finite.sort T) (pred_of_argType (Finite.sort T))))))) (@cons (list (Finite.sort T)) (@nil (Finite.sort T)) (@nil (list (Finite.sort T)))))) (@flatten (list (Finite.sort T)) (@map (Finite.sort T) (list (list (Finite.sort T))) (fun x : Finite.sort T => @map (list (Finite.sort T)) (list (Finite.sort T)) (@cons (Finite.sort T) x) (@iter (list (list (Finite.sort T))) m (fun e : list (list (Finite.sort T)) => @flatten (list (Finite.sort T)) (@map (Finite.sort T) (list (list (Finite.sort T))) (fun x0 : Finite.sort T => @map (list (Finite.sort T)) (list (Finite.sort T)) (@cons (Finite.sort T) x0) e) (@enum_mem T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@sort_of_simpl_pred (Finite.sort T) (pred_of_argType (Finite.sort T))))))) (@cons (list (Finite.sort T)) (@nil (Finite.sort T)) (@nil (list (Finite.sort T)))))) e)))) (muln (S (@size (Finite.sort T) e)) (expn (@size (Finite.sort T) (@enum_mem T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@sort_of_simpl_pred (Finite.sort T) (pred_of_argType (Finite.sort T)))))) m)) *) by rewrite count_cat {}IHe count_map IHm. Qed. End FinTuple. End FinTuple. Section UseFinTuple. Variables (n : nat) (T : finType). Definition tuple_finMixin := Eval hnf in FinMixin (@FinTuple.enumP n T). Canonical tuple_finType := Eval hnf in FinType (n.-tuple T) tuple_finMixin. Canonical tuple_subFinType := Eval hnf in [subFinType of n.-tuple T]. Lemma card_tuple : #|{:n.-tuple T}| = #|T| ^ n. Proof. (* Goal: @eq nat (@card tuple_finType (@mem (tuple_of n (Finite.sort T)) (predPredType (tuple_of n (Finite.sort T) : predArgType)) (@sort_of_simpl_pred (tuple_of n (Finite.sort T) : predArgType) (pred_of_argType (tuple_of n (Finite.sort T) : predArgType))))) (expn (@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)))))) n) *) by rewrite [#|_|]cardT enumT unlock FinTuple.size_enum. Qed. Lemma enum_tupleP (A : pred T) : size (enum A) == #|A|. Proof. (* Goal: is_true (@eq_op nat_eqType (@size (Finite.sort T) (@enum_mem T (@mem (Finite.sort T) (predPredType (Finite.sort T)) A))) (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) A))) *) by rewrite -cardE. Qed. Canonical enum_tuple A := Tuple (enum_tupleP A). Definition ord_tuple : n.-tuple 'I_n := Tuple (introT eqP (size_enum_ord n)). Lemma tuple_map_ord U (t : n.-tuple U) : t = [tuple of map (tnth t) ord_tuple]. Proof. (* Goal: @eq (tuple_of n U) t (@tuple n U (@map_tuple n (ordinal n) U (@tnth n U t) ord_tuple) (fun sP : is_true (@eq_op nat_eqType (@size U (@tval n U (@map_tuple n (ordinal n) U (@tnth n U t) ord_tuple))) n) => @Tuple n U (@map (ordinal n) U (@tnth n U t) (@tval n (ordinal n) ord_tuple)) sP)) *) by apply: val_inj => /=; rewrite map_tnth_enum. Qed. Lemma tnth_ord_tuple i : tnth ord_tuple i = i. Proof. (* Goal: @eq (ordinal n) (@tnth n (ordinal n) ord_tuple i) i *) apply: val_inj; rewrite (tnth_nth i) -(nth_map _ 0) ?size_tuple //. (* Goal: @eq nat (@nth nat O (@map (ordinal n) nat (@val nat (fun x : nat => leq (S x) n) (ordinal_subType n)) (@tval n (ordinal n) ord_tuple)) (@nat_of_ord n i)) (@val nat (fun x : nat => leq (S x) n) (ordinal_subType n) i) *) by rewrite /= enumT unlock val_ord_enum nth_iota. Qed. Section ImageTuple. Variables (T' : Type) (f : T -> T') (A : pred T). Canonical image_tuple : #|A|.-tuple T' := [tuple of image f A]. Canonical codom_tuple : #|T|.-tuple T' := [tuple of codom f]. End ImageTuple. Section MkTuple. Variables (T' : Type) (f : 'I_n -> T'). Definition mktuple := map_tuple f ord_tuple. Lemma tnth_mktuple i : tnth mktuple i = f i. Proof. (* Goal: @eq T' (@tnth n T' mktuple i) (f i) *) by rewrite tnth_map tnth_ord_tuple. Qed. Lemma nth_mktuple x0 (i : 'I_n) : nth x0 mktuple i = f i. Proof. (* Goal: @eq T' (@nth T' x0 (@tval n T' mktuple) (@nat_of_ord n i)) (f i) *) by rewrite -tnth_nth tnth_mktuple. Qed. End MkTuple. End UseFinTuple. Notation "[ 'tuple' F | i < n ]" := (mktuple (fun i : 'I_n => F)) (at level 0, i at level 0, format "[ '[hv' 'tuple' F '/' | i < n ] ']'") : form_scope.
Require Import mathcomp.ssreflect.ssreflect. From mathcomp Require Import ssrfun ssrbool eqtype ssrnat seq choice fintype bigop. From mathcomp Require Import finfun tuple ssralg matrix mxalgebra zmodp. Set Implicit Arguments. Unset Strict Implicit. Unset Printing Implicit Defensive. Local Open Scope ring_scope. Reserved Notation "{ 'vspace' T }" (at level 0, format "{ 'vspace' T }"). Reserved Notation "''Hom' ( T , rT )" (at level 8, format "''Hom' ( T , rT )"). Reserved Notation "''End' ( T )" (at level 8, format "''End' ( T )"). Reserved Notation "\dim A" (at level 10, A at level 8, format "\dim A"). Delimit Scope vspace_scope with VS. Import GRing.Theory. Module Vector. Section ClassDef. Variable R : ringType. Definition axiom_def n (V : lmodType R) of phant V := {v2r : V -> 'rV[R]_n | linear v2r & bijective v2r}. Inductive mixin_of (V : lmodType R) := Mixin dim & axiom_def dim (Phant V). Structure class_of V := Class { base : GRing.Lmodule.class_of R V; mixin : mixin_of (GRing.Lmodule.Pack _ base) }. Local Coercion base : class_of >-> GRing.Lmodule.class_of. Structure type (phR : phant R) := Pack {sort; _ : class_of sort}. Local Coercion sort : type >-> Sortclass. Variables (phR : phant R) (T : Type) (cT : type phR). Definition class := let: Pack _ c := cT return class_of cT in c. Definition clone c of phant_id class c := @Pack phR T c. Let xT := let: Pack T _ := cT in T. Notation xclass := (class : class_of xT). Definition dim := let: Mixin n _ := mixin class in n. Definition pack b0 (m0 : mixin_of (@GRing.Lmodule.Pack R _ T b0)) := fun bT b & phant_id (@GRing.Lmodule.class _ phR bT) b => fun m & phant_id m0 m => Pack phR (@Class T b m). Definition eqType := @Equality.Pack cT xclass. Definition choiceType := @Choice.Pack cT xclass. Definition zmodType := @GRing.Zmodule.Pack cT xclass. Definition lmodType := @GRing.Lmodule.Pack R phR cT xclass. Definition v2r := s2val v2r_subproof. Let v2r_bij : bijective v2r := s2valP' v2r_subproof. Fact r2v_subproof : {r2v | cancel r2v v2r}. Proof. (* Goal: @sig (forall _ : matrix (GRing.Ring.sort R) (S O) (@dim R (Phant (GRing.Ring.sort R)) vT), @GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (@lmodType R (Phant (GRing.Ring.sort R)) vT)) (fun r2v : forall _ : matrix (GRing.Ring.sort R) (S O) (@dim R (Phant (GRing.Ring.sort R)) vT), @GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (@lmodType R (Phant (GRing.Ring.sort R)) vT) => @cancel (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (@lmodType R (Phant (GRing.Ring.sort R)) vT)) (matrix (GRing.Ring.sort R) (S O) (@dim R (Phant (GRing.Ring.sort R)) vT)) r2v v2r) *) have r2vP r: {v | v2r v = r}. (* Goal: @sig (forall _ : matrix (GRing.Ring.sort R) (S O) (@dim R (Phant (GRing.Ring.sort R)) vT), @GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (@lmodType R (Phant (GRing.Ring.sort R)) vT)) (fun r2v : forall _ : matrix (GRing.Ring.sort R) (S O) (@dim R (Phant (GRing.Ring.sort R)) vT), @GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (@lmodType R (Phant (GRing.Ring.sort R)) vT) => @cancel (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (@lmodType R (Phant (GRing.Ring.sort R)) vT)) (matrix (GRing.Ring.sort R) (S O) (@dim R (Phant (GRing.Ring.sort R)) vT)) r2v v2r) *) (* Goal: @sig (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (@lmodType R (Phant (GRing.Ring.sort R)) vT)) (fun v : @GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (@lmodType R (Phant (GRing.Ring.sort R)) vT) => @eq (matrix (GRing.Ring.sort R) (S O) (@dim R (Phant (GRing.Ring.sort R)) vT)) (v2r v) r) *) by apply: sig_eqW; have [v _ vK] := v2r_bij; exists (v r). (* Goal: @sig (forall _ : matrix (GRing.Ring.sort R) (S O) (@dim R (Phant (GRing.Ring.sort R)) vT), @GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (@lmodType R (Phant (GRing.Ring.sort R)) vT)) (fun r2v : forall _ : matrix (GRing.Ring.sort R) (S O) (@dim R (Phant (GRing.Ring.sort R)) vT), @GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (@lmodType R (Phant (GRing.Ring.sort R)) vT) => @cancel (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (@lmodType R (Phant (GRing.Ring.sort R)) vT)) (matrix (GRing.Ring.sort R) (S O) (@dim R (Phant (GRing.Ring.sort R)) vT)) r2v v2r) *) by exists (fun r => sval (r2vP r)) => r; case: (r2vP r). Qed. Definition r2v := sval r2v_subproof. Lemma r2vK : cancel r2v v2r. Proof. exact: (svalP r2v_subproof). Qed. Proof. (* Goal: @cancel (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (@lmodType R (Phant (GRing.Ring.sort R)) vT)) (matrix (GRing.Ring.sort R) (S O) (@dim R (Phant (GRing.Ring.sort R)) vT)) r2v v2r *) exact: (svalP r2v_subproof). Qed. Lemma v2rK : cancel v2r r2v. Proof. by have/bij_can_sym:= r2vK; apply. Qed. Canonical v2r_linear := Linear (s2valP v2r_subproof : linear v2r). Canonical r2v_linear := Linear (can2_linear v2rK r2vK). End Iso. Section Vspace. Variables (K : fieldType) (vT : vectType K). Local Coercion dim : vectType >-> nat. Definition b2mx n (X : n.-tuple vT) := \matrix_i v2r (tnth X i). Lemma b2mxK n (X : n.-tuple vT) i : r2v (row i (b2mx X)) = X`_i. Proof. (* Goal: @eq (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@r2v (GRing.Field.ringType K) vT (@row (GRing.Ring.sort (GRing.Field.ringType K)) n (@dim (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT) i (@b2mx n X))) (@nth (GRing.Zmodule.sort (@zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (GRing.zero (@zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@tval n (@sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) (@nat_of_ord n i)) *) by rewrite rowK v2rK -tnth_nth. Qed. Definition vs2mx {phV} (U : @space K vT phV) := let: Space mx _ := U in mx. Lemma gen_vs2mx (U : {vspace vT}) : <<vs2mx U>>%MS = vs2mx U. Proof. (* Goal: @eq (matrix (GRing.Field.sort K) (@dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@genmx K (@dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@vs2mx (Phant (@sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) U)) (@vs2mx (Phant (@sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) U) *) by apply/eqP; rewrite /vs2mx; case: U. Qed. Fact mx2vs_subproof m (A : 'M[K]_(m, vT)) : <<(<<A>>)>>%MS == <<A>>%MS. Proof. (* Goal: is_true (@eq_op (matrix_eqType (GRing.Field.eqType K) (@dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@genmx K (@dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@genmx K m (@dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) A)) (@genmx K m (@dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) A)) *) by rewrite genmx_id. Qed. Definition mx2vs {m} A : {vspace vT} := Space _ (@mx2vs_subproof m A). Canonical space_subType := [subType for @vs2mx (Phant vT)]. Lemma vs2mxK : cancel vs2mx mx2vs. Proof. (* Goal: @cancel (matrix (GRing.Field.sort K) (@dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@space K vT (Phant (@sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@vs2mx (Phant (@sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@mx2vs (@dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) *) by move=> v; apply: val_inj; rewrite /= gen_vs2mx. Qed. Lemma mx2vsK m (M : 'M_(m, vT)) : (vs2mx (mx2vs M) :=: M)%MS. Proof. (* Goal: @eqmx K (@dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) m (@dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@vs2mx (Phant (@sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@mx2vs m M)) M *) exact: genmxE. Qed. End Vspace. Section Hom. Variables (R : ringType) (aT rT : vectType R). Definition f2mx (f : 'Hom(aT, rT)) := let: Hom A := f in A. Canonical hom_subType := [newType for f2mx]. End Hom. Arguments mx2vs {K vT m%N} A%MS. Prenex Implicits v2r r2v v2rK r2vK b2mx vs2mx vs2mxK f2mx. End InternalTheory. End Vector. Export Vector.Exports. Import Vector.InternalTheory. Section VspaceDefs. Variables (K : fieldType) (vT : vectType K). Implicit Types (u : vT) (X : seq vT) (U V : {vspace vT}). Definition space_eqMixin := Eval hnf in [eqMixin of {vspace vT} by <:]. Canonical space_eqType := EqType {vspace vT} space_eqMixin. Definition space_choiceMixin := Eval hnf in [choiceMixin of {vspace vT} by <:]. Canonical space_choiceType := ChoiceType {vspace vT} space_choiceMixin. Definition dimv U := \rank (vs2mx U). Definition subsetv U V := (vs2mx U <= vs2mx V)%MS. Definition vline u := mx2vs (v2r u). Definition pred_of_vspace phV (U : Vector.space phV) : pred_class := fun v => (vs2mx (vline v) <= vs2mx U)%MS. Canonical vspace_predType := @mkPredType _ (unkeyed {vspace vT}) (@pred_of_vspace _). Definition fullv : {vspace vT} := mx2vs 1%:M. Definition addv U V := mx2vs (vs2mx U + vs2mx V). Definition capv U V := mx2vs (vs2mx U :&: vs2mx V). Definition complv U := mx2vs (vs2mx U)^C. Definition diffv U V := mx2vs (vs2mx U :\: vs2mx V). Definition vpick U := r2v (nz_row (vs2mx U)). Definition span_expanded_def X := mx2vs (b2mx (in_tuple X)). Definition span := locked_with span_key span_expanded_def. Canonical span_unlockable := [unlockable fun span]. Definition vbasis_def U := [tuple r2v (row i (row_base (vs2mx U))) | i < dimv U]. Definition vbasis := locked_with span_key vbasis_def. Canonical vbasis_unlockable := [unlockable fun vbasis]. Definition free X := dimv (span X) == size X. Definition basis_of U X := (span X == U) && free X. End VspaceDefs. Coercion pred_of_vspace : Vector.space >-> pred_class. Notation "\dim U" := (dimv U) : nat_scope. Notation "U <= V" := (subsetv U V) : vspace_scope. Notation "U <= V <= W" := (subsetv U V && subsetv V W) : vspace_scope. Notation "<[ v ] >" := (vline v) : vspace_scope. Notation "<< X >>" := (span X) : vspace_scope. Notation "0" := (vline 0) : vspace_scope. Arguments fullv {K vT}. Prenex Implicits subsetv addv capv complv diffv span free basis_of. Notation "U + V" := (addv U V) : vspace_scope. Notation "U :&: V" := (capv U V) : vspace_scope. Notation "U ^C" := (complv U) (at level 8, format "U ^C") : vspace_scope. Notation "U :\: V" := (diffv U V) : vspace_scope. Notation "{ : vT }" := (@fullv _ vT) (only parsing) : vspace_scope. Notation "\sum_ ( i <- r | P ) U" := (\big[addv/0%VS]_(i <- r | P%B) U%VS) : vspace_scope. Notation "\sum_ ( i <- r ) U" := (\big[addv/0%VS]_(i <- r) U%VS) : vspace_scope. Notation "\sum_ ( m <= i < n | P ) U" := (\big[addv/0%VS]_(m <= i < n | P%B) U%VS) : vspace_scope. Notation "\sum_ ( m <= i < n ) U" := (\big[addv/0%VS]_(m <= i < n) U%VS) : vspace_scope. Notation "\sum_ ( i | P ) U" := (\big[addv/0%VS]_(i | P%B) U%VS) : vspace_scope. Notation "\sum_ i U" := (\big[addv/0%VS]_i U%VS) : vspace_scope. Notation "\sum_ ( i : t | P ) U" := (\big[addv/0%VS]_(i : t | P%B) U%VS) (only parsing) : vspace_scope. Notation "\sum_ ( i : t ) U" := (\big[addv/0%VS]_(i : t) U%VS) (only parsing) : vspace_scope. Notation "\sum_ ( i < n | P ) U" := (\big[addv/0%VS]_(i < n | P%B) U%VS) : vspace_scope. Notation "\sum_ ( i < n ) U" := (\big[addv/0%VS]_(i < n) U%VS) : vspace_scope. Notation "\sum_ ( i 'in' A | P ) U" := (\big[addv/0%VS]_(i in A | P%B) U%VS) : vspace_scope. Notation "\sum_ ( i 'in' A ) U" := (\big[addv/0%VS]_(i in A) U%VS) : vspace_scope. Notation "\bigcap_ ( i <- r | P ) U" := (\big[capv/fullv]_(i <- r | P%B) U%VS) : vspace_scope. Notation "\bigcap_ ( i <- r ) U" := (\big[capv/fullv]_(i <- r) U%VS) : vspace_scope. Notation "\bigcap_ ( m <= i < n | P ) U" := (\big[capv/fullv]_(m <= i < n | P%B) U%VS) : vspace_scope. Notation "\bigcap_ ( m <= i < n ) U" := (\big[capv/fullv]_(m <= i < n) U%VS) : vspace_scope. Notation "\bigcap_ ( i | P ) U" := (\big[capv/fullv]_(i | P%B) U%VS) : vspace_scope. Notation "\bigcap_ i U" := (\big[capv/fullv]_i U%VS) : vspace_scope. Notation "\bigcap_ ( i : t | P ) U" := (\big[capv/fullv]_(i : t | P%B) U%VS) (only parsing) : vspace_scope. Notation "\bigcap_ ( i : t ) U" := (\big[capv/fullv]_(i : t) U%VS) (only parsing) : vspace_scope. Notation "\bigcap_ ( i < n | P ) U" := (\big[capv/fullv]_(i < n | P%B) U%VS) : vspace_scope. Notation "\bigcap_ ( i < n ) U" := (\big[capv/fullv]_(i < n) U%VS) : vspace_scope. Notation "\bigcap_ ( i 'in' A | P ) U" := (\big[capv/fullv]_(i in A | P%B) U%VS) : vspace_scope. Notation "\bigcap_ ( i 'in' A ) U" := (\big[capv/fullv]_(i in A) U%VS) : vspace_scope. Section VectorTheory. Variables (K : fieldType) (vT : vectType K). Implicit Types (a : K) (u v w : vT) (X Y : seq vT) (U V W : {vspace vT}). Local Notation subV := (@subsetv K vT) (only parsing). Local Notation addV := (@addv K vT) (only parsing). Local Notation capV := (@capv K vT) (only parsing). Let vs2mxP U V : reflect (U = V) (vs2mx U == vs2mx V)%MS. Proof. (* Goal: Bool.reflect (@eq (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) U V) (andb (@submx K (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@vs2mx K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) U) (@vs2mx K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) V)) (@submx K (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@vs2mx K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) V) (@vs2mx K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) U))) *) by rewrite (sameP genmxP eqP) !gen_vs2mx; apply: eqP. Qed. Let memvK v U : (v \in U) = (v2r v <= vs2mx U)%MS. Proof. (* Goal: @eq bool (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) U))) (@submx K (S O) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT) (@v2r (GRing.Field.ringType K) vT v) (@vs2mx K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) U)) *) by rewrite -genmxE. Qed. Let mem_r2v rv U : (r2v rv \in U) = (rv <= vs2mx U)%MS. Proof. (* Goal: @eq bool (@in_mem (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@r2v (GRing.Field.ringType K) vT rv) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) U))) (@submx K (S O) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT) rv (@vs2mx K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) U)) *) by rewrite memvK r2vK. Qed. Let vs2mx0 : @vs2mx K vT _ 0 = 0. Proof. (* Goal: @eq (matrix (GRing.Field.sort K) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@vs2mx K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@vline K vT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType K) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) *) by rewrite /= linear0 genmx0. Qed. Let vs2mxD U V : vs2mx (U + V) = (vs2mx U + vs2mx V)%MS. Proof. (* Goal: @eq (matrix (GRing.Field.sort K) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@vs2mx K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@addv K vT U V)) (@addsmx K (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@vs2mx K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) U) (@vs2mx K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) V)) *) by rewrite /= genmx_adds !gen_vs2mx. Qed. Let vs2mx_sum := big_morph _ vs2mxD vs2mx0. Let vs2mxI U V : vs2mx (U :&: V) = (vs2mx U :&: vs2mx V)%MS. Proof. (* Goal: @eq (matrix (GRing.Field.sort K) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@vs2mx K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@capv K vT U V)) (@capmx K (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@vs2mx K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) U) (@vs2mx K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) V)) *) by rewrite /= genmx_cap !gen_vs2mx. Qed. Let vs2mxF : vs2mx {:vT} = 1%:M. Proof. (* Goal: @eq (matrix (GRing.Field.sort K) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@vs2mx K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@fullv K vT)) (@scalar_mx (GRing.Field.ringType K) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (GRing.one (GRing.Field.ringType K))) *) by rewrite /= genmx1. Qed. Let row_b2mx n (X : n.-tuple vT) i : row i (b2mx X) = v2r X`_i. Proof. (* Goal: @eq (matrix (GRing.Ring.sort (GRing.Field.ringType K)) (S O) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@row (GRing.Ring.sort (GRing.Field.ringType K)) n (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT) i (@b2mx K vT n X)) (@v2r (GRing.Field.ringType K) vT (@nth (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@tval n (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) (@nat_of_ord n i))) *) by rewrite -tnth_nth rowK. Qed. Let span_b2mx n (X : n.-tuple vT) : span X = mx2vs (b2mx X). Proof. (* Goal: @eq (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@span K vT (@tval n (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X)) (@mx2vs K vT n (@b2mx K vT n X)) *) by rewrite unlock tvalK; case: _ / (esym _). Qed. Let mul_b2mx n (X : n.-tuple vT) (rk : 'rV_n) : Proof. (* Goal: @eq (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT))))) (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT))))) (Finite.sort (ordinal_finType n)) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT))))) (index_enum (ordinal_finType n)) (fun i : Finite.sort (ordinal_finType n) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT))))) (Finite.sort (ordinal_finType n)) i (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT))))) true (@GRing.scale (GRing.Field.ringType K) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT) (@fun_of_matrix (GRing.Ring.sort (GRing.Field.ringType K)) (S O) n rk (GRing.zero (Zp_zmodType O)) i) (@nth (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@tval n (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) (@nat_of_ord n i))))) (@r2v (GRing.Field.ringType K) vT (@mulmx (GRing.Field.ringType K) (S O) n (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT) rk (@b2mx K vT n X))) *) rewrite mulmx_sum_row linear_sum; apply: eq_bigr => i _. (* Goal: @eq (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT))))) (@GRing.scale (GRing.Field.ringType K) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT) (@fun_of_matrix (GRing.Ring.sort (GRing.Field.ringType K)) (S O) n rk (GRing.zero (Zp_zmodType O)) i) (@nth (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@tval n (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) (@nat_of_ord n i))) (@GRing.Linear.apply (GRing.Field.ringType K) (matrix_lmodType (GRing.Field.ringType K) (S O) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.zmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.scale (GRing.Field.ringType K) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (Phant (forall _ : @GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (matrix_lmodType (GRing.Field.ringType K) (S O) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)), GRing.Zmodule.sort (@GRing.Lmodule.zmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)))) (@r2v_linear (GRing.Field.ringType K) vT) (@GRing.scale (GRing.Field.ringType K) (matrix_lmodType (GRing.Field.ringType K) (S O) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@fun_of_matrix (GRing.Ring.sort (GRing.Field.ringType K)) (S O) n rk (GRing.zero (Zp_zmodType O)) i) (@row (GRing.Ring.sort (GRing.Field.ringType K)) n (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT) i (@b2mx K vT n X)))) *) by rewrite row_b2mx linearZ /= v2rK. Qed. Let lin_b2mx n (X : n.-tuple vT) k : Proof. (* Goal: @eq (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT))))) (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT))))) (Finite.sort (ordinal_finType n)) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT))))) (index_enum (ordinal_finType n)) (fun i : ordinal n => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT))))) (ordinal n) i (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT))))) true (@GRing.scale (GRing.Field.ringType K) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT) (k i) (@nth (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@tval n (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) (@nat_of_ord n i))))) (@r2v (GRing.Field.ringType K) vT (@mulmx (GRing.Field.ringType K) (S O) n (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT) (@matrix_of_fun (GRing.Ring.sort (GRing.Field.ringType K)) (S O) n matrix_key (fun (_ : Finite.sort (ordinal_finType (S O))) (i : Finite.sort (ordinal_finType n)) => k i)) (@b2mx K vT n X))) *) by rewrite -mul_b2mx; apply: eq_bigr => i _; rewrite mxE. Qed. Let free_b2mx n (X : n.-tuple vT) : free X = row_free (b2mx X). Proof. (* Goal: @eq bool (@free K vT (@tval n (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X)) (@row_free K n (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT) (@b2mx K vT n X)) *) by rewrite /free /dimv span_b2mx genmxE size_tuple. Qed. Fact vspace_key U : pred_key U. Proof. by []. Qed. Proof. (* Goal: @pred_key (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) U) *) by []. Qed. Lemma vlineP v1 v2 : reflect (exists k, v1 = k *: v2) (v1 \in <[v2]>)%VS. Proof. (* Goal: Bool.reflect (@ex (GRing.Ring.sort (GRing.Field.ringType K)) (fun k : GRing.Ring.sort (GRing.Field.ringType K) => @eq (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v1 (@GRing.scale (GRing.Field.ringType K) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT) k v2))) (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v1 (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@vline K vT v2)))) *) apply: (iffP idP) => [|[k ->]]; rewrite memvK genmxE ?linearZ ?scalemx_sub //. (* Goal: forall _ : is_true (@submx K (S O) (S O) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@v2r (GRing.Field.ringType K) vT v1) (@v2r (GRing.Field.ringType K) vT v2)), @ex (GRing.Ring.sort (GRing.Field.ringType K)) (fun k : GRing.Ring.sort (GRing.Field.ringType K) => @eq (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v1 (@GRing.scale (GRing.Field.ringType K) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT) k v2)) *) by case/sub_rVP=> k; rewrite -linearZ => /v2r_inj->; exists k. Qed. Fact memv_submod_closed U : submod_closed U. Proof. (* Goal: @GRing.submod_closed (GRing.Field.ringType K) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) U) *) split=> [|a u v]; rewrite !memvK ?linear0 ?sub0mx // => Uu Uv. (* Goal: is_true (@submx K (S O) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT) (@v2r (GRing.Field.ringType K) vT (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)))) (@GRing.scale (GRing.Field.ringType K) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT) a u) v)) (@vs2mx K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) U)) *) by rewrite linearP addmx_sub ?scalemx_sub. Qed. Lemma memvN U v : (- v \in U) = (v \in U). Proof. exact: rpredN. Qed. Proof. (* Goal: @eq bool (@in_mem (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@GRing.opp (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) U))) (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) U))) *) exact: rpredN. Qed. Lemma memvB U : {in U &, forall u v, u - v \in U}. Proof. exact : rpredB. Qed. Proof. (* Goal: @prop_in2 (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) U)) (fun u v : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT => is_true (@in_mem (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@GRing.add (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) u (@GRing.opp (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v)) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) U)))) (inPhantom (forall u v : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT, is_true (@in_mem (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@GRing.add (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) u (@GRing.opp (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v)) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) U))))) *) exact : rpredB. Qed. Lemma memv_suml I r (P : pred I) vs U : (forall i, P i -> vs i \in U) -> \sum_(i <- r | P i) vs i \in U. Proof. (* Goal: forall _ : forall (i : I) (_ : is_true (P i)), is_true (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (vs i) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) U))), is_true (@in_mem (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@BigOp.bigop (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) I (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) r (fun i : I => @BigBody (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) I i (@GRing.add (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (P i) (vs i))) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) U))) *) exact: rpred_sum. Qed. Lemma memv_line u : u \in <[u]>%VS. Proof. (* Goal: is_true (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) u (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@vline K vT u)))) *) by apply/vlineP; exists 1; rewrite scale1r. Qed. Lemma subvP U V : reflect {subset U <= V} (U <= V)%VS. Proof. (* Goal: Bool.reflect (@sub_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) U)) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) V))) (@subsetv K vT U V) *) apply: (iffP rV_subP) => sU12 u. (* Goal: forall _ : is_true (@submx K (S O) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) u (@vs2mx K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) U)), is_true (@submx K (S O) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) u (@vs2mx K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) V)) *) (* Goal: forall _ : is_true (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) u (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) U))), is_true (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) u (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) V))) *) by rewrite !memvE /subsetv !genmxE => /sU12. (* Goal: forall _ : is_true (@submx K (S O) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) u (@vs2mx K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) U)), is_true (@submx K (S O) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) u (@vs2mx K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) V)) *) by have:= sU12 (r2v u); rewrite !memvE /subsetv !genmxE r2vK. Qed. Hint Resolve subvv : core. Lemma subv_trans : transitive subV. Proof. (* Goal: @transitive (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@subsetv K vT) *) by move=> U V W /subvP sUV /subvP sVW; apply/subvP=> u /sUV/sVW. Qed. Lemma subv_anti : antisymmetric subV. Proof. (* Goal: @antisymmetric (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@subsetv K vT) *) by move=> U V; apply/vs2mxP. Qed. Lemma eqEsubv U V : (U == V) = (U <= V <= U)%VS. Proof. (* Goal: @eq bool (@eq_op (@space_eqType K vT) U V) (andb (@subsetv K vT U V) (@subsetv K vT V U)) *) by apply/eqP/idP=> [-> | /subv_anti//]; rewrite subvv. Qed. Lemma vspaceP U V : U =i V <-> U = V. Lemma subvPn {U V} : reflect (exists2 u, u \in U & u \notin V) (~~ (U <= V)%VS). Lemma sub0v U : (0 <= U)%VS. Proof. (* Goal: is_true (@subsetv K vT (@vline K vT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) U) *) exact: mem0v. Qed. Lemma subv0 U : (U <= 0)%VS = (U == 0%VS). Proof. (* Goal: @eq bool (@subsetv K vT U (@vline K vT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)))) (@eq_op (@space_eqType K vT) U (@vline K vT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)))) *) by rewrite eqEsubv sub0v andbT. Qed. Lemma memv0 v : v \in 0%VS = (v == 0). Proof. (* Goal: @eq bool (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@vline K vT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)))))) (@eq_op (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) *) by apply/idP/eqP=> [/vlineP[k ->] | ->]; rewrite (scaler0, mem0v). Qed. Lemma memvf v : v \in fullv. Proof. exact: subvf. Qed. Proof. (* Goal: is_true (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@fullv K vT)))) *) exact: subvf. Qed. Lemma vpick0 U : (vpick U == 0) = (U == 0%VS). Proof. (* Goal: @eq bool (@eq_op (@GRing.Lmodule.eqType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@vpick K vT U) (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)))) (@eq_op (@space_eqType K vT) U (@vline K vT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)))) *) by rewrite -memv0 mem_r2v -subv0 /subV vs2mx0 !submx0 nz_row_eq0. Qed. Lemma subv_add U V W : (U + V <= W)%VS = (U <= W)%VS && (V <= W)%VS. Proof. (* Goal: @eq bool (@subsetv K vT (@addv K vT U V) W) (andb (@subsetv K vT U W) (@subsetv K vT V W)) *) by rewrite /subV vs2mxD addsmx_sub. Qed. Lemma addvS U1 U2 V1 V2 : (U1 <= U2 -> V1 <= V2 -> U1 + V1 <= U2 + V2)%VS. Proof. (* Goal: forall (_ : is_true (@subsetv K vT U1 U2)) (_ : is_true (@subsetv K vT V1 V2)), is_true (@subsetv K vT (@addv K vT U1 V1) (@addv K vT U2 V2)) *) by rewrite /subV !vs2mxD; apply: addsmxS. Qed. Lemma addvSl U V : (U <= U + V)%VS. Proof. (* Goal: is_true (@subsetv K vT U (@addv K vT U V)) *) by rewrite /subV vs2mxD addsmxSl. Qed. Lemma addvSr U V : (V <= U + V)%VS. Proof. (* Goal: is_true (@subsetv K vT V (@addv K vT U V)) *) by rewrite /subV vs2mxD addsmxSr. Qed. Lemma addvC : commutative addV. Proof. (* Goal: @commutative (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@addv K vT) *) by move=> U V; apply/vs2mxP; rewrite !vs2mxD addsmxC submx_refl. Qed. Lemma addvA : associative addV. Proof. (* Goal: @associative (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@addv K vT) *) by move=> U V W; apply/vs2mxP; rewrite !vs2mxD addsmxA submx_refl. Qed. Lemma addv_idPl {U V}: reflect (U + V = U)%VS (V <= U)%VS. Proof. (* Goal: Bool.reflect (@eq (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@addv K vT U V) U) (@subsetv K vT V U) *) by rewrite /subV (sameP addsmx_idPl eqmxP) -vs2mxD; apply: vs2mxP. Qed. Lemma addv_idPr {U V} : reflect (U + V = V)%VS (U <= V)%VS. Proof. (* Goal: Bool.reflect (@eq (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@addv K vT U V) V) (@subsetv K vT U V) *) by rewrite addvC; apply: addv_idPl. Qed. Lemma addvv : idempotent addV. Proof. (* Goal: @idempotent (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@addv K vT) *) by move=> U; apply/addv_idPl. Qed. Lemma add0v : left_id 0%VS addV. Proof. (* Goal: @left_id (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@vline K vT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@addv K vT) *) by move=> U; apply/addv_idPr/sub0v. Qed. Lemma addv0 : right_id 0%VS addV. Proof. (* Goal: @right_id (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@vline K vT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@addv K vT) *) by move=> U; apply/addv_idPl/sub0v. Qed. Lemma sumfv : left_zero fullv addV. Proof. (* Goal: @left_zero (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@fullv K vT) (@addv K vT) *) by move=> U; apply/addv_idPl/subvf. Qed. Lemma addvf : right_zero fullv addV. Proof. (* Goal: @right_zero (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@fullv K vT) (@addv K vT) *) by move=> U; apply/addv_idPr/subvf. Qed. Canonical addv_monoid := Monoid.Law addvA add0v addv0. Canonical addv_comoid := Monoid.ComLaw addvC. Lemma memv_add u v U V : u \in U -> v \in V -> u + v \in (U + V)%VS. Proof. (* Goal: forall (_ : is_true (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) u (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) U)))) (_ : is_true (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) V)))), is_true (@in_mem (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@GRing.add (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) u v) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@addv K vT U V)))) *) by rewrite !memvK genmxE linearD; apply: addmx_sub_adds. Qed. Lemma memv_addP {w U V} : reflect (exists2 u, u \in U & exists2 v, v \in V & w = u + v) (w \in U + V)%VS. Section BigSum. Variable I : finType. Implicit Type P : pred I. Lemma sumv_sup i0 P U Vs : P i0 -> (U <= Vs i0)%VS -> (U <= \sum_(i | P i) Vs i)%VS. Proof. (* Goal: forall (_ : is_true (P i0)) (_ : is_true (@subsetv K vT U (Vs i0))), is_true (@subsetv K vT U (@BigOp.bigop (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (Finite.sort I) (@vline K vT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (index_enum I) (fun i : Finite.sort I => @BigBody (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (Finite.sort I) i (@addv K vT) (P i) (Vs i)))) *) by move=> Pi0 /subv_trans-> //; rewrite (bigD1 i0) ?addvSl. Qed. Arguments sumv_sup i0 [P U Vs]. Lemma subv_sumP {P Us V} : reflect (forall i, P i -> Us i <= V)%VS (\sum_(i | P i) Us i <= V)%VS. Proof. (* Goal: Bool.reflect (forall (i : Finite.sort I) (_ : is_true (P i)), is_true (@subsetv K vT (Us i) V)) (@subsetv K vT (@BigOp.bigop (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (Finite.sort I) (@vline K vT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (index_enum I) (fun i : Finite.sort I => @BigBody (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (Finite.sort I) i (@addv K vT) (P i) (Us i))) V) *) apply: (iffP idP) => [sUV i Pi | sUV]. (* Goal: is_true (@subsetv K vT (@BigOp.bigop (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (Finite.sort I) (@vline K vT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (index_enum I) (fun i : Finite.sort I => @BigBody (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (Finite.sort I) i (@addv K vT) (P i) (Us i))) V) *) (* Goal: is_true (@subsetv K vT (Us i) V) *) by apply: subv_trans sUV; apply: sumv_sup Pi _. (* Goal: is_true (@subsetv K vT (@BigOp.bigop (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (Finite.sort I) (@vline K vT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (index_enum I) (fun i : Finite.sort I => @BigBody (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (Finite.sort I) i (@addv K vT) (P i) (Us i))) V) *) by elim/big_rec: _ => [|i W Pi sWV]; rewrite ?sub0v // subv_add sUV. Qed. Lemma memv_sumr P vs (Us : I -> {vspace vT}) : (forall i, P i -> vs i \in Us i) -> \sum_(i | P i) vs i \in (\sum_(i | P i) Us i)%VS. Proof. (* Goal: forall _ : forall (i : Finite.sort I) (_ : is_true (P i)), is_true (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (vs i) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (Us i)))), is_true (@in_mem (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@BigOp.bigop (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (Finite.sort I) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (index_enum I) (fun i : Finite.sort I => @BigBody (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (Finite.sort I) i (@GRing.add (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (P i) (vs i))) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@BigOp.bigop (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (Finite.sort I) (@vline K vT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (index_enum I) (fun i : Finite.sort I => @BigBody (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (Finite.sort I) i (@addv K vT) (P i) (Us i)))))) *) by move=> Uv; apply/rpred_sum=> i Pi; apply/(sumv_sup i Pi)/Uv. Qed. Lemma memv_sumP {P} {Us : I -> {vspace vT}} {v} : reflect (exists2 vs, forall i, P i -> vs i \in Us i & v = \sum_(i | P i) vs i) (v \in \sum_(i | P i) Us i)%VS. End BigSum. Lemma subv_cap U V W : (U <= V :&: W)%VS = (U <= V)%VS && (U <= W)%VS. Proof. (* Goal: @eq bool (@subsetv K vT U (@capv K vT V W)) (andb (@subsetv K vT U V) (@subsetv K vT U W)) *) by rewrite /subV vs2mxI sub_capmx. Qed. Lemma capvS U1 U2 V1 V2 : (U1 <= U2 -> V1 <= V2 -> U1 :&: V1 <= U2 :&: V2)%VS. Proof. (* Goal: forall (_ : is_true (@subsetv K vT U1 U2)) (_ : is_true (@subsetv K vT V1 V2)), is_true (@subsetv K vT (@capv K vT U1 V1) (@capv K vT U2 V2)) *) by rewrite /subV !vs2mxI; apply: capmxS. Qed. Lemma capvSl U V : (U :&: V <= U)%VS. Proof. (* Goal: is_true (@subsetv K vT (@capv K vT U V) U) *) by rewrite /subV vs2mxI capmxSl. Qed. Lemma capvSr U V : (U :&: V <= V)%VS. Proof. (* Goal: is_true (@subsetv K vT (@capv K vT U V) V) *) by rewrite /subV vs2mxI capmxSr. Qed. Lemma capvC : commutative capV. Proof. (* Goal: @commutative (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@capv K vT) *) by move=> U V; apply/vs2mxP; rewrite !vs2mxI capmxC submx_refl. Qed. Lemma capvA : associative capV. Proof. (* Goal: @associative (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@capv K vT) *) by move=> U V W; apply/vs2mxP; rewrite !vs2mxI capmxA submx_refl. Qed. Lemma capv_idPl {U V} : reflect (U :&: V = U)%VS (U <= V)%VS. Proof. (* Goal: Bool.reflect (@eq (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@capv K vT U V) U) (@subsetv K vT U V) *) by rewrite /subV(sameP capmx_idPl eqmxP) -vs2mxI; apply: vs2mxP. Qed. Lemma capv_idPr {U V} : reflect (U :&: V = V)%VS (V <= U)%VS. Proof. (* Goal: Bool.reflect (@eq (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@capv K vT U V) V) (@subsetv K vT V U) *) by rewrite capvC; apply: capv_idPl. Qed. Lemma capvv : idempotent capV. Proof. (* Goal: @idempotent (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@capv K vT) *) by move=> U; apply/capv_idPl. Qed. Lemma cap0v : left_zero 0%VS capV. Proof. (* Goal: @left_zero (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@vline K vT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@capv K vT) *) by move=> U; apply/capv_idPl/sub0v. Qed. Lemma capv0 : right_zero 0%VS capV. Proof. (* Goal: @right_zero (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@vline K vT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@capv K vT) *) by move=> U; apply/capv_idPr/sub0v. Qed. Lemma capfv : left_id fullv capV. Proof. (* Goal: @left_id (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@fullv K vT) (@capv K vT) *) by move=> U; apply/capv_idPr/subvf. Qed. Lemma capvf : right_id fullv capV. Proof. (* Goal: @right_id (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@fullv K vT) (@capv K vT) *) by move=> U; apply/capv_idPl/subvf. Qed. Canonical capv_monoid := Monoid.Law capvA capfv capvf. Canonical capv_comoid := Monoid.ComLaw capvC. Lemma memv_cap w U V : (w \in U :&: V)%VS = (w \in U) && (w \in V). Proof. (* Goal: @eq bool (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) w (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@capv K vT U V)))) (andb (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) w (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) U))) (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) w (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) V)))) *) by rewrite !memvE subv_cap. Qed. Lemma memv_capP {w U V} : reflect (w \in U /\ w \in V) (w \in U :&: V)%VS. Proof. (* Goal: Bool.reflect (and (is_true (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) w (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) U)))) (is_true (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) w (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) V))))) (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) w (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@capv K vT U V)))) *) by rewrite memv_cap; apply: andP. Qed. Lemma vspace_modl U V W : (U <= W -> U + (V :&: W) = (U + V) :&: W)%VS. Proof. (* Goal: forall _ : is_true (@subsetv K vT U W), @eq (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@addv K vT U (@capv K vT V W)) (@capv K vT (@addv K vT U V) W) *) by move=> sUV; apply/vs2mxP; rewrite !(vs2mxD, vs2mxI); apply/eqmxP/matrix_modl. Qed. Lemma vspace_modr U V W : (W <= U -> (U :&: V) + W = U :&: (V + W))%VS. Proof. (* Goal: forall _ : is_true (@subsetv K vT W U), @eq (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@addv K vT (@capv K vT U V) W) (@capv K vT U (@addv K vT V W)) *) by rewrite -!(addvC W) !(capvC U); apply: vspace_modl. Qed. Section BigCap. Variable I : finType. Implicit Type P : pred I. Lemma bigcapv_inf i0 P Us V : P i0 -> (Us i0 <= V -> \bigcap_(i | P i) Us i <= V)%VS. Proof. (* Goal: forall (_ : is_true (P i0)) (_ : is_true (@subsetv K vT (Us i0) V)), is_true (@subsetv K vT (@BigOp.bigop (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (Finite.sort I) (@fullv K vT) (index_enum I) (fun i : Finite.sort I => @BigBody (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (Finite.sort I) i (@capv K vT) (P i) (Us i))) V) *) by move=> Pi0; apply: subv_trans; rewrite (bigD1 i0) ?capvSl. Qed. Lemma subv_bigcapP {P U Vs} : reflect (forall i, P i -> U <= Vs i)%VS (U <= \bigcap_(i | P i) Vs i)%VS. Proof. (* Goal: Bool.reflect (forall (i : Finite.sort I) (_ : is_true (P i)), is_true (@subsetv K vT U (Vs i))) (@subsetv K vT U (@BigOp.bigop (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (Finite.sort I) (@fullv K vT) (index_enum I) (fun i : Finite.sort I => @BigBody (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (Finite.sort I) i (@capv K vT) (P i) (Vs i)))) *) apply: (iffP idP) => [sUV i Pi | sUV]. (* Goal: is_true (@subsetv K vT U (@BigOp.bigop (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (Finite.sort I) (@fullv K vT) (index_enum I) (fun i : Finite.sort I => @BigBody (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (Finite.sort I) i (@capv K vT) (P i) (Vs i)))) *) (* Goal: is_true (@subsetv K vT U (Vs i)) *) by rewrite (subv_trans sUV) ?(bigcapv_inf Pi). (* Goal: is_true (@subsetv K vT U (@BigOp.bigop (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (Finite.sort I) (@fullv K vT) (index_enum I) (fun i : Finite.sort I => @BigBody (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (Finite.sort I) i (@capv K vT) (P i) (Vs i)))) *) by elim/big_rec: _ => [|i W Pi]; rewrite ?subvf // subv_cap sUV. Qed. End BigCap. Lemma addv_complf U : (U + U^C)%VS = fullv. Proof. (* Goal: @eq (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@addv K vT U (@complv K vT U)) (@fullv K vT) *) apply/vs2mxP; rewrite vs2mxD -gen_vs2mx -genmx_adds !genmxE submx1 sub1mx. (* Goal: is_true (andb true (@row_full K (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@addsmx K (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@vs2mx K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) U) (@complmx K (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@vs2mx K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) U))))) *) exact: addsmx_compl_full. Qed. Lemma capv_compl U : (U :&: U^C = 0)%VS. Proof. (* Goal: @eq (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@capv K vT U (@complv K vT U)) (@vline K vT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) *) apply/val_inj; rewrite [val]/= vs2mx0 vs2mxI -gen_vs2mx -genmx_cap. (* Goal: @eq (matrix (GRing.Field.sort K) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@genmx K (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@capmx K (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@vs2mx K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) U) (@complmx K (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@vs2mx K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) U)))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType K) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) *) by rewrite capmx_compl genmx0. Qed. Lemma diffvSl U V : (U :\: V <= U)%VS. Proof. (* Goal: is_true (@subsetv K vT (@diffv K vT U V) U) *) by rewrite /subV genmxE diffmxSl. Qed. Lemma capv_diff U V : ((U :\: V) :&: V = 0)%VS. Proof. (* Goal: @eq (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@capv K vT (@diffv K vT U V) V) (@vline K vT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) *) apply/val_inj; rewrite [val]/= vs2mx0 vs2mxI -(gen_vs2mx V) -genmx_cap. (* Goal: @eq (matrix (GRing.Field.sort K) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@genmx K (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@capmx K (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@diffmx K (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@vs2mx K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) U) (@vs2mx K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) V)) (@vs2mx K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) V))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType K) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) *) by rewrite capmx_diff genmx0. Qed. Lemma addv_diff_cap U V : (U :\: V + U :&: V)%VS = U. Proof. (* Goal: @eq (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@addv K vT (@diffv K vT U V) (@capv K vT U V)) U *) apply/vs2mxP; rewrite vs2mxD -genmx_adds !genmxE. (* Goal: is_true (andb (@submx K (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@addsmx K (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@diffmx K (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@vs2mx K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) U) (@vs2mx K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) V)) (@capmx K (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@vs2mx K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) U) (@vs2mx K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) V))) (@vs2mx K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) U)) (@submx K (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@vs2mx K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) U) (@addsmx K (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@diffmx K (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@vs2mx K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) U) (@vs2mx K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) V)) (@capmx K (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@vs2mx K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) U) (@vs2mx K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) V))))) *) exact/eqmxP/addsmx_diff_cap_eq. Qed. Lemma addv_diff U V : (U :\: V + V = U + V)%VS. Proof. (* Goal: @eq (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@addv K vT (@diffv K vT U V) V) (@addv K vT U V) *) by rewrite -{2}(addv_diff_cap U V) -addvA (addv_idPr (capvSr U V)). Qed. Lemma dimv0 : \dim (0%VS : {vspace vT}) = 0%N. Proof. (* Goal: @eq nat (@dimv K vT (@vline K vT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) : @Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)))) O *) by rewrite /dimv vs2mx0 mxrank0. Qed. Lemma dimv_eq0 U : (\dim U == 0%N) = (U == 0%VS). Proof. (* Goal: @eq bool (@eq_op nat_eqType (@dimv K vT U) O) (@eq_op (@space_eqType K vT) U (@vline K vT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)))) *) by rewrite /dimv /= mxrank_eq0 {2}/eq_op /= linear0 genmx0. Qed. Lemma dimvf : \dim {:vT} = Vector.dim vT. Proof. (* Goal: @eq nat (@dimv K vT (@fullv K vT)) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) *) by rewrite /dimv vs2mxF mxrank1. Qed. Lemma dim_vline v : \dim <[v]> = (v != 0). Proof. (* Goal: @eq nat (@dimv K vT (@vline K vT v)) (nat_of_bool (negb (@eq_op (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))))) *) by rewrite /dimv mxrank_gen rank_rV (can2_eq v2rK r2vK) linear0. Qed. Lemma dimvS U V : (U <= V)%VS -> \dim U <= \dim V. Proof. (* Goal: forall _ : is_true (@subsetv K vT U V), is_true (leq (@dimv K vT U) (@dimv K vT V)) *) exact: mxrankS. Qed. Lemma dimv_leqif_sup U V : (U <= V)%VS -> \dim U <= \dim V ?= iff (V <= U)%VS. Proof. (* Goal: forall _ : is_true (@subsetv K vT U V), leqif (@dimv K vT U) (@dimv K vT V) (@subsetv K vT V U) *) exact: mxrank_leqif_sup. Qed. Lemma dimv_leqif_eq U V : (U <= V)%VS -> \dim U <= \dim V ?= iff (U == V). Proof. (* Goal: forall _ : is_true (@subsetv K vT U V), leqif (@dimv K vT U) (@dimv K vT V) (@eq_op (@space_eqType K vT) U V) *) by rewrite eqEsubv; apply: mxrank_leqif_eq. Qed. Lemma eqEdim U V : (U == V) = (U <= V)%VS && (\dim V <= \dim U). Proof. (* Goal: @eq bool (@eq_op (@space_eqType K vT) U V) (andb (@subsetv K vT U V) (leq (@dimv K vT V) (@dimv K vT U))) *) by apply/idP/andP=> [/eqP | [/dimv_leqif_eq/geq_leqif]] ->. Qed. Lemma dimv_compl U : \dim U^C = (\dim {:vT} - \dim U)%N. Proof. (* Goal: @eq nat (@dimv K vT (@complv K vT U)) (subn (@dimv K vT (@fullv K vT)) (@dimv K vT U)) *) by rewrite dimvf /dimv mxrank_gen mxrank_compl. Qed. Lemma dimv_cap_compl U V : (\dim (U :&: V) + \dim (U :\: V))%N = \dim U. Proof. (* Goal: @eq nat (addn (@dimv K vT (@capv K vT U V)) (@dimv K vT (@diffv K vT U V))) (@dimv K vT U) *) by rewrite /dimv !mxrank_gen mxrank_cap_compl. Qed. Lemma dimv_sum_cap U V : (\dim (U + V) + \dim (U :&: V) = \dim U + \dim V)%N. Proof. (* Goal: @eq nat (addn (@dimv K vT (@addv K vT U V)) (@dimv K vT (@capv K vT U V))) (addn (@dimv K vT U) (@dimv K vT V)) *) by rewrite /dimv !mxrank_gen mxrank_sum_cap. Qed. Lemma dimv_disjoint_sum U V : (U :&: V = 0)%VS -> \dim (U + V) = (\dim U + \dim V)%N. Proof. (* Goal: forall _ : @eq (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@capv K vT U V) (@vline K vT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))), @eq nat (@dimv K vT (@addv K vT U V)) (addn (@dimv K vT U) (@dimv K vT V)) *) by move=> dxUV; rewrite -dimv_sum_cap dxUV dimv0 addn0. Qed. Lemma dimv_add_leqif U V : \dim (U + V) <= \dim U + \dim V ?= iff (U :&: V <= 0)%VS. Proof. (* Goal: leqif (@dimv K vT (@addv K vT U V)) (addn (@dimv K vT U) (@dimv K vT V)) (@subsetv K vT (@capv K vT U V) (@vline K vT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)))) *) by rewrite /dimv /subV !mxrank_gen vs2mx0 genmxE; apply: mxrank_adds_leqif. Qed. Lemma diffv_eq0 U V : (U :\: V == 0)%VS = (U <= V)%VS. Proof. (* Goal: @eq bool (@eq_op (@space_eqType K vT) (@diffv K vT U V) (@vline K vT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)))) (@subsetv K vT U V) *) rewrite -dimv_eq0 -(eqn_add2l (\dim (U :&: V))) addn0 dimv_cap_compl eq_sym. (* Goal: @eq bool (@eq_op nat_eqType (@dimv K vT (@capv K vT U V)) (@dimv K vT U)) (@subsetv K vT U V) *) by rewrite (dimv_leqif_eq (capvSl _ _)) (sameP capv_idPl eqP). Qed. Lemma dimv_leq_sum I r (P : pred I) (Us : I -> {vspace vT}) : \dim (\sum_(i <- r | P i) Us i) <= \sum_(i <- r | P i) \dim (Us i). Proof. (* Goal: is_true (leq (@dimv K vT (@BigOp.bigop (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) I (@vline K vT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) r (fun i : I => @BigBody (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) I i (@addv K vT) (P i) (Us i)))) (@BigOp.bigop nat I O r (fun i : I => @BigBody nat I i addn (P i) (@dimv K vT (Us i))))) *) elim/big_rec2: _ => [|i d vs _ le_vs_d]; first by rewrite dim_vline eqxx. (* Goal: is_true (leq (@dimv K vT (@addv K vT (Us i) vs)) (addn (@dimv K vT (Us i)) d)) *) by apply: (leq_trans (dimv_add_leqif _ _)); rewrite leq_add2l. Qed. Section SumExpr. Structure addv_expr := Sumv { addv_val :> wrapped {vspace vT}; addv_dim : wrapped nat; _ : mxsum_spec (vs2mx (unwrap addv_val)) (unwrap addv_dim) }. Definition vs2mx_sum_expr_subproof (S : addv_expr) : mxsum_spec (vs2mx (unwrap S)) (unwrap (addv_dim S)). Proof. (* Goal: @mxsum_spec K (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@vs2mx K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@unwrap (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (addv_val S))) (@unwrap nat (addv_dim S)) *) by case: S. Qed. Canonical vs2mx_sum_expr S := ProperMxsumExpr (vs2mx_sum_expr_subproof S). Canonical trivial_addv U := @Sumv (Wrap U) (Wrap (\dim U)) (TrivialMxsum _). Structure proper_addv_expr := ProperSumvExpr { proper_addv_val :> {vspace vT}; proper_addv_dim :> nat; _ : mxsum_spec (vs2mx proper_addv_val) proper_addv_dim }. Definition proper_addvP (S : proper_addv_expr) := let: ProperSumvExpr _ _ termS := S return mxsum_spec (vs2mx S) S in termS. Canonical proper_addv (S : proper_addv_expr) := @Sumv (wrap (S : {vspace vT})) (wrap (S : nat)) (proper_addvP S). Section Binary. Variables S1 S2 : addv_expr. Fact binary_addv_subproof : mxsum_spec (vs2mx (unwrap S1 + unwrap S2)) (unwrap (addv_dim S1) + unwrap (addv_dim S2)). Proof. (* Goal: @mxsum_spec K (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@vs2mx K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@addv K vT (@unwrap (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (addv_val S1)) (@unwrap (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (addv_val S2)))) (addn (@unwrap nat (addv_dim S1)) (@unwrap nat (addv_dim S2))) *) by rewrite vs2mxD; apply: proper_mxsumP. Qed. Canonical binary_addv_expr := ProperSumvExpr binary_addv_subproof. End Binary. Section Nary. Variables (I : Type) (r : seq I) (P : pred I) (S_ : I -> addv_expr). Fact nary_addv_subproof : mxsum_spec (vs2mx (\sum_(i <- r | P i) unwrap (S_ i))) (\sum_(i <- r | P i) unwrap (addv_dim (S_ i))). Proof. (* Goal: @mxsum_spec K (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@vs2mx K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@BigOp.bigop (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) I (@vline K vT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) r (fun i : I => @BigBody (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) I i (@addv K vT) (P i) (@unwrap (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (addv_val (S_ i)))))) (@BigOp.bigop nat I O r (fun i : I => @BigBody nat I i addn (P i) (@unwrap nat (addv_dim (S_ i))))) *) by rewrite vs2mx_sum; apply: proper_mxsumP. Qed. Canonical nary_addv_expr := ProperSumvExpr nary_addv_subproof. End Nary. Definition directv_def S of phantom {vspace vT} (unwrap (addv_val S)) := \dim (unwrap S) == unwrap (addv_dim S). End SumExpr. Local Notation directv A := (directv_def (Phantom {vspace _} A%VS)). Lemma directvE (S : addv_expr) : directv (unwrap S) = (\dim (unwrap S) == unwrap (addv_dim S)). Proof. (* Goal: @eq bool (@directv_def S (Phantom (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@unwrap (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (addv_val S)))) (@eq_op nat_eqType (@dimv K vT (@unwrap (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (addv_val S))) (@unwrap nat (addv_dim S))) *) by []. Qed. Lemma directvP {S : proper_addv_expr} : reflect (\dim S = S :> nat) (directv S). Proof. (* Goal: Bool.reflect (@eq nat (@dimv K vT (proper_addv_val S)) (proper_addv_dim S)) (@directv_def (proper_addv S) (Phantom (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (proper_addv_val S))) *) exact: eqnP. Qed. Lemma directv_trivial U : directv (unwrap (@trivial_addv U)). Proof. (* Goal: is_true (@directv_def (trivial_addv U) (Phantom (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@unwrap (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (addv_val (trivial_addv U))))) *) exact: eqxx. Qed. Lemma dimv_sum_leqif (S : addv_expr) : \dim (unwrap S) <= unwrap (addv_dim S) ?= iff directv (unwrap S). Proof. (* Goal: leqif (@dimv K vT (@unwrap (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (addv_val S))) (@unwrap nat (addv_dim S)) (@directv_def S (Phantom (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@unwrap (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (addv_val S)))) *) rewrite directvE; case: S => [[U] [d] /= defUd]; split=> //=. (* Goal: is_true (leq (@dimv K vT U) d) *) rewrite /dimv; elim: {1}_ {U}_ d / defUd => // m1 m2 A1 A2 r1 r2 _ leA1 _ leA2. (* Goal: is_true (leq (@mxrank K (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@addsmx K m1 m2 (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) A1 A2)) (addn r1 r2)) *) by apply: leq_trans (leq_add leA1 leA2); rewrite mxrank_adds_leqif. Qed. Lemma directvEgeq (S : addv_expr) : directv (unwrap S) = (\dim (unwrap S) >= unwrap (addv_dim S)). Proof. (* Goal: @eq bool (@directv_def S (Phantom (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@unwrap (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (addv_val S)))) (leq (@unwrap nat (addv_dim S)) (@dimv K vT (@unwrap (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (addv_val S)))) *) by rewrite leq_eqVlt ltnNge eq_sym !dimv_sum_leqif orbF. Qed. Section BinaryDirect. Lemma directv_addE (S1 S2 : addv_expr) : directv (unwrap S1 + unwrap S2) = [&& directv (unwrap S1), directv (unwrap S2) & unwrap S1 :&: unwrap S2 == 0]%VS. Proof. (* Goal: @eq bool (@directv_def (proper_addv (binary_addv_expr S1 S2)) (Phantom (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@addv K vT (@unwrap (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (addv_val S1)) (@unwrap (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (addv_val S2))))) (andb (@directv_def S1 (Phantom (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@unwrap (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (addv_val S1)))) (andb (@directv_def S2 (Phantom (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@unwrap (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (addv_val S2)))) (@eq_op (@space_eqType K vT) (@capv K vT (@unwrap (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (addv_val S1)) (@unwrap (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (addv_val S2))) (@vline K vT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)))))) *) by rewrite /directv_def /dimv vs2mxD -mxdirectE mxdirect_addsE -vs2mxI -vs2mx0. Qed. Lemma directv_addP {U V} : reflect (U :&: V = 0)%VS (directv (U + V)). Proof. (* Goal: Bool.reflect (@eq (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@capv K vT U V) (@vline K vT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)))) (@directv_def (proper_addv (binary_addv_expr (trivial_addv U) (trivial_addv V))) (Phantom (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@addv K vT U V))) *) by rewrite directv_addE !directv_trivial; apply: eqP. Qed. Lemma directv_add_unique {U V} : reflect (forall u1 u2 v1 v2, u1 \in U -> u2 \in U -> v1 \in V -> v2 \in V -> (u1 + v1 == u2 + v2) = ((u1, v1) == (u2, v2))) (directv (U + V)). Proof. (* Goal: Bool.reflect (forall (u1 u2 v1 v2 : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (_ : is_true (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) u1 (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) U)))) (_ : is_true (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) u2 (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) U)))) (_ : is_true (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v1 (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) V)))) (_ : is_true (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v2 (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) V)))), @eq bool (@eq_op (GRing.Zmodule.eqType (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@GRing.add (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) u1 v1) (@GRing.add (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) u2 v2)) (@eq_op (prod_eqType (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pair (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) u1 v1) (@pair (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) u2 v2))) (@directv_def (proper_addv (binary_addv_expr (trivial_addv U) (trivial_addv V))) (Phantom (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@addv K vT U V))) *) apply: (iffP directv_addP) => [dxUV u1 u2 v1 v2 Uu1 Uu2 Vv1 Vv2 | dxUV]. (* Goal: @eq (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@capv K vT U V) (@vline K vT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) *) (* Goal: @eq bool (@eq_op (GRing.Zmodule.eqType (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@GRing.add (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) u1 v1) (@GRing.add (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) u2 v2)) (@eq_op (prod_eqType (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pair (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) u1 v1) (@pair (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) u2 v2)) *) apply/idP/idP=> [| /eqP[-> ->] //]; rewrite -subr_eq0 opprD addrACA addr_eq0. (* Goal: @eq (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@capv K vT U V) (@vline K vT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) *) (* Goal: forall _ : is_true (@eq_op (GRing.Zmodule.eqType (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@GRing.add (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) u1 (@GRing.opp (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) u2)) (@GRing.opp (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@GRing.add (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v1 (@GRing.opp (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v2)))), is_true (@eq_op (prod_eqType (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pair (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) u1 v1) (@pair (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) u2 v2)) *) move/eqP=> eq_uv; rewrite xpair_eqE -subr_eq0 eq_uv oppr_eq0 subr_eq0 andbb. (* Goal: @eq (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@capv K vT U V) (@vline K vT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) *) (* Goal: is_true (@eq_op (GRing.Zmodule.eqType (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) v1 v2) *) by rewrite -subr_eq0 -memv0 -dxUV memv_cap -memvN -eq_uv !memvB. (* Goal: @eq (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@capv K vT U V) (@vline K vT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) *) apply/eqP; rewrite -subv0; apply/subvP=> v /memv_capP[U1v U2v]. (* Goal: is_true (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@vline K vT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)))))) *) by rewrite memv0 -[v == 0]andbb {1}eq_sym -xpair_eqE -dxUV ?mem0v // addrC. Qed. End BinaryDirect. Section NaryDirect. Context {I : finType} {P : pred I}. Lemma directv_sumP {Us : I -> {vspace vT}} : reflect (forall i, P i -> Us i :&: (\sum_(j | P j && (j != i)) Us j) = 0)%VS (directv (\sum_(i | P i) Us i)). Lemma directv_sumE {Ss : I -> addv_expr} (xunwrap := unwrap) : reflect [/\ forall i, P i -> directv (unwrap (Ss i)) & directv (\sum_(i | P i) xunwrap (Ss i))] (directv (\sum_(i | P i) unwrap (Ss i))). Proof. (* Goal: Bool.reflect (and (forall (i : Finite.sort I) (_ : is_true (P i)), is_true (@directv_def (Ss i) (Phantom (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@unwrap (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (addv_val (Ss i)))))) (is_true (@directv_def (proper_addv (@nary_addv_expr (Finite.sort I) (index_enum I) P (fun i : Finite.sort I => trivial_addv (xunwrap (addv_val (Ss i)))))) (Phantom (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@BigOp.bigop (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (Finite.sort I) (@vline K vT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (index_enum I) (fun i : Finite.sort I => @BigBody (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (Finite.sort I) i (@addv K vT) (P i) (xunwrap (addv_val (Ss i))))))))) (@directv_def (proper_addv (@nary_addv_expr (Finite.sort I) (index_enum I) P Ss)) (Phantom (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@BigOp.bigop (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (Finite.sort I) (@vline K vT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (index_enum I) (fun i : Finite.sort I => @BigBody (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (Finite.sort I) i (@addv K vT) (P i) (@unwrap (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (addv_val (Ss i))))))) *) by rewrite !directvE /= /dimv 2!{1}vs2mx_sum -!mxdirectE; apply: mxdirect_sumsE. Qed. Lemma directv_sum_independent {Us : I -> {vspace vT}} : reflect (forall us, (forall i, P i -> us i \in Us i) -> \sum_(i | P i) us i = 0 -> (forall i, P i -> us i = 0)) (directv (\sum_(i | P i) Us i)). Proof. (* Goal: Bool.reflect (forall (us : forall _ : Finite.sort I, @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (_ : forall (i : Finite.sort I) (_ : is_true (P i)), is_true (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (us i) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (Us i))))) (_ : @eq (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@BigOp.bigop (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (Finite.sort I) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (index_enum I) (fun i : Finite.sort I => @BigBody (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (Finite.sort I) i (@GRing.add (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (P i) (us i))) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (i : Finite.sort I) (_ : is_true (P i)), @eq (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (us i) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@directv_def (proper_addv (@nary_addv_expr (Finite.sort I) (index_enum I) P (fun i : Finite.sort I => trivial_addv (Us i)))) (Phantom (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@BigOp.bigop (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (Finite.sort I) (@vline K vT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (index_enum I) (fun i : Finite.sort I => @BigBody (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (Finite.sort I) i (@addv K vT) (P i) (Us i))))) *) apply: (iffP directv_sumP) => [dxU us Uu u_0 i Pi | dxU i Pi]. (* Goal: @eq (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@capv K vT (Us i) (@BigOp.bigop (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (Finite.sort I) (@vline K vT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (index_enum I) (fun j : Finite.sort I => @BigBody (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (Finite.sort I) j (@addv K vT) (andb (P j) (negb (@eq_op (Finite.eqType I) j i))) (Us j)))) (@vline K vT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) *) (* Goal: @eq (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (us i) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) *) apply/eqP; rewrite -memv0 -(dxU i Pi) memv_cap Uu //= -memvN -sub0r -{1}u_0. (* Goal: @eq (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@capv K vT (Us i) (@BigOp.bigop (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (Finite.sort I) (@vline K vT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (index_enum I) (fun j : Finite.sort I => @BigBody (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (Finite.sort I) j (@addv K vT) (andb (P j) (negb (@eq_op (Finite.eqType I) j i))) (Us j)))) (@vline K vT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) *) (* Goal: is_true (@in_mem (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@GRing.add (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@BigOp.bigop (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (Finite.sort I) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (index_enum I) (fun i : Finite.sort I => @BigBody (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (Finite.sort I) i (@GRing.add (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (P i) (us i))) (@GRing.opp (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (us i))) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@BigOp.bigop (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (Finite.sort I) (@vline K vT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (index_enum I) (fun j : Finite.sort I => @BigBody (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (Finite.sort I) j (@addv K vT) (andb (P j) (negb (@eq_op (Finite.eqType I) j i))) (Us j)))))) *) by rewrite (bigD1 i) //= addrC addKr memv_sumr // => j /andP[/Uu]. (* Goal: @eq (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@capv K vT (Us i) (@BigOp.bigop (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (Finite.sort I) (@vline K vT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (index_enum I) (fun j : Finite.sort I => @BigBody (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (Finite.sort I) j (@addv K vT) (andb (P j) (negb (@eq_op (Finite.eqType I) j i))) (Us j)))) (@vline K vT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) *) apply/eqP; rewrite -subv0; apply/subvP=> v. (* Goal: forall _ : is_true (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@capv K vT (Us i) (@BigOp.bigop (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (Finite.sort I) (@vline K vT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (index_enum I) (fun j : Finite.sort I => @BigBody (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (Finite.sort I) j (@addv K vT) (andb (P j) (negb (@eq_op (Finite.eqType I) j i))) (Us j))))))), is_true (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@vline K vT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)))))) *) rewrite memv_cap memv0 => /andP[Uiv /memv_sumP[us Uu Dv]]. (* Goal: is_true (@eq_op (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) *) have: \sum_(j | P j) [eta us with i |-> - v] j = 0. (* Goal: forall _ : @eq (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@BigOp.bigop (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (Finite.sort I) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (index_enum I) (fun j : Finite.sort I => @BigBody (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (Finite.sort I) j (@GRing.add (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (P j) (@fun_of_simpl (Equality.sort (Finite.eqType I)) (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@SimplFunDelta (Equality.sort (Finite.eqType I)) (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (fun _ : Equality.sort (Finite.eqType I) => @app_fdelta (Finite.eqType I) (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@FunDelta (Finite.eqType I) (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) i (@GRing.opp (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v)) us)) j))) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)), is_true (@eq_op (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) *) (* Goal: @eq (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@BigOp.bigop (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (Finite.sort I) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (index_enum I) (fun j : Finite.sort I => @BigBody (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (Finite.sort I) j (@GRing.add (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (P j) (@fun_of_simpl (Equality.sort (Finite.eqType I)) (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@SimplFunDelta (Equality.sort (Finite.eqType I)) (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (fun _ : Equality.sort (Finite.eqType I) => @app_fdelta (Finite.eqType I) (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@FunDelta (Finite.eqType I) (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) i (@GRing.opp (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v)) us)) j))) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) *) rewrite (bigD1 i) //= eqxx {1}Dv addrC -sumrB big1 // => j /andP[_ i'j]. (* Goal: forall _ : @eq (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@BigOp.bigop (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (Finite.sort I) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (index_enum I) (fun j : Finite.sort I => @BigBody (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (Finite.sort I) j (@GRing.add (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (P j) (@fun_of_simpl (Equality.sort (Finite.eqType I)) (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@SimplFunDelta (Equality.sort (Finite.eqType I)) (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (fun _ : Equality.sort (Finite.eqType I) => @app_fdelta (Finite.eqType I) (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@FunDelta (Finite.eqType I) (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) i (@GRing.opp (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v)) us)) j))) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)), is_true (@eq_op (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) *) (* Goal: @eq (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@GRing.add (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (if @eq_op (Finite.eqType I) j i then @GRing.opp (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v else us j) (@GRing.opp (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (us j))) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) *) by rewrite (negPf i'j) subrr. (* Goal: forall _ : @eq (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@BigOp.bigop (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (Finite.sort I) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (index_enum I) (fun j : Finite.sort I => @BigBody (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (Finite.sort I) j (@GRing.add (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (P j) (@fun_of_simpl (Equality.sort (Finite.eqType I)) (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@SimplFunDelta (Equality.sort (Finite.eqType I)) (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (fun _ : Equality.sort (Finite.eqType I) => @app_fdelta (Finite.eqType I) (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@FunDelta (Finite.eqType I) (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) i (@GRing.opp (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v)) us)) j))) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)), is_true (@eq_op (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) *) move/dxU/(_ i Pi); rewrite /= eqxx -oppr_eq0 => -> // j Pj. (* Goal: is_true (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (if @eq_op (Finite.eqType I) j i then @GRing.opp (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v else us j) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (Us j)))) *) by have [-> | i'j] := altP eqP; rewrite ?memvN // Uu ?Pj. Qed. Lemma directv_sum_unique {Us : I -> {vspace vT}} : reflect (forall us vs, (forall i, P i -> us i \in Us i) -> (forall i, P i -> vs i \in Us i) -> (\sum_(i | P i) us i == \sum_(i | P i) vs i) = [forall (i | P i), us i == vs i]) (directv (\sum_(i | P i) Us i)). End NaryDirect. Lemma memv_span X v : v \in X -> v \in <<X>>%VS. Proof. (* Goal: forall _ : is_true (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v (@mem (Equality.sort (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (seq_predType (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) X)), is_true (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@span K vT X)))) *) by case/seq_tnthP=> i {v}->; rewrite unlock memvK genmxE (eq_row_sub i) // rowK. Qed. Lemma memv_span1 v : v \in <<[:: v]>>%VS. Proof. (* Goal: is_true (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@span K vT (@cons (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v (@nil (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))))))) *) by rewrite memv_span ?mem_head. Qed. Lemma dim_span X : \dim <<X>> <= size X. Proof. (* Goal: is_true (leq (@dimv K vT (@span K vT X)) (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X)) *) by rewrite unlock /dimv genmxE rank_leq_row. Qed. Lemma span_subvP {X U} : reflect {subset X <= U} (<<X>> <= U)%VS. Proof. (* Goal: Bool.reflect (@sub_mem (Equality.sort (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@mem (Equality.sort (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (seq_predType (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) X) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) U))) (@subsetv K vT (@span K vT X) U) *) rewrite /subV [@span _ _]unlock genmxE. (* Goal: Bool.reflect (@sub_mem (Equality.sort (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@mem (Equality.sort (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (seq_predType (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) X) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) U))) (@submx K (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@b2mx K vT (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) (@in_tuple (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X)) (@vs2mx K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) U)) *) apply: (iffP row_subP) => /= [sXU | sXU i]. (* Goal: is_true (@submx K (S O) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@row (GRing.Field.sort K) (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) i (@b2mx K vT (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) (@in_tuple (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X))) (@vs2mx K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) U)) *) (* Goal: @sub_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (seq_predType (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) X) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) U)) *) by move=> _ /seq_tnthP[i ->]; have:= sXU i; rewrite rowK memvK. (* Goal: is_true (@submx K (S O) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@row (GRing.Field.sort K) (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) i (@b2mx K vT (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) (@in_tuple (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X))) (@vs2mx K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) U)) *) by rewrite rowK -memvK sXU ?mem_tnth. Qed. Lemma sub_span X Y : {subset X <= Y} -> (<<X>> <= <<Y>>)%VS. Proof. (* Goal: forall _ : @sub_mem (Equality.sort (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@mem (Equality.sort (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (seq_predType (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) X) (@mem (Equality.sort (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (seq_predType (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) Y), is_true (@subsetv K vT (@span K vT X) (@span K vT Y)) *) by move=> sXY; apply/span_subvP=> v /sXY/memv_span. Qed. Lemma eq_span X Y : X =i Y -> (<<X>> = <<Y>>)%VS. Proof. (* Goal: forall _ : @eq_mem (Equality.sort (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@mem (Equality.sort (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (seq_predType (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) X) (@mem (Equality.sort (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (seq_predType (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) Y), @eq (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@span K vT X) (@span K vT Y) *) by move=> eqXY; apply: subv_anti; rewrite !sub_span // => u; rewrite eqXY. Qed. Lemma span_def X : span X = (\sum_(u <- X) <[u]>)%VS. Proof. (* Goal: @eq (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@span K vT X) (@BigOp.bigop (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@vline K vT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) X (fun u : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT => @BigBody (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) u (@addv K vT) true (@vline K vT u))) *) apply/subv_anti/andP; split. (* Goal: is_true (@subsetv K vT (@BigOp.bigop (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@vline K vT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) X (fun u : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT => @BigBody (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) u (@addv K vT) true (@vline K vT u))) (@span K vT X)) *) (* Goal: is_true (@subsetv K vT (@span K vT X) (@BigOp.bigop (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@vline K vT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) X (fun u : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT => @BigBody (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) u (@addv K vT) true (@vline K vT u)))) *) by apply/span_subvP=> v Xv; rewrite (big_rem v) // memvE addvSl. (* Goal: is_true (@subsetv K vT (@BigOp.bigop (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@vline K vT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) X (fun u : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT => @BigBody (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) u (@addv K vT) true (@vline K vT u))) (@span K vT X)) *) by rewrite big_tnth; apply/subv_sumP=> i _; rewrite -memvE memv_span ?mem_tnth. Qed. Lemma span_nil : (<<Nil vT>> = 0)%VS. Proof. (* Goal: @eq (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@span K vT (@nil (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@vline K vT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) *) by rewrite span_def big_nil. Qed. Lemma span_seq1 v : (<<[:: v]>> = <[v]>)%VS. Proof. (* Goal: @eq (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@span K vT (@cons (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v (@nil (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)))) (@vline K vT v) *) by rewrite span_def big_seq1. Qed. Lemma span_cons v X : (<<v :: X>> = <[v]> + <<X>>)%VS. Proof. (* Goal: @eq (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@span K vT (@cons (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v X)) (@addv K vT (@vline K vT v) (@span K vT X)) *) by rewrite !span_def big_cons. Qed. Lemma span_cat X Y : (<<X ++ Y>> = <<X>> + <<Y>>)%VS. Proof. (* Goal: @eq (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@span K vT (@cat (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X Y)) (@addv K vT (@span K vT X) (@span K vT Y)) *) by rewrite !span_def big_cat. Qed. Definition coord_expanded_def n (X : n.-tuple vT) i v := (v2r v *m pinvmx (b2mx X)) 0 i. Definition coord := locked_with span_key coord_expanded_def. Canonical coord_unlockable := [unlockable fun coord]. Fact coord_is_scalar n (X : n.-tuple vT) i : scalar (coord X i). Proof. (* Goal: @GRing.Linear.axiom (GRing.Field.ringType K) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT) (GRing.Ring.zmodType (GRing.Field.ringType K)) (@GRing.mul (GRing.Field.ringType K)) (@coord n X i) (GRing.Scale.mul_law (GRing.Field.ringType K)) (@Logic.eq_refl (forall (_ : GRing.Ring.sort (GRing.Field.ringType K)) (_ : GRing.Ring.sort (GRing.Field.ringType K)), GRing.Ring.sort (GRing.Field.ringType K)) (@GRing.mul (GRing.Field.ringType K))) *) by move=> k u v; rewrite unlock linearP mulmxDl -scalemxAl !mxE. Qed. Canonical coord_addidive n Xn i := Additive (@coord_is_scalar n Xn i). Canonical coord_linear n Xn i := AddLinear (@coord_is_scalar n Xn i). Lemma coord_span n (X : n.-tuple vT) v : Proof. (* Goal: forall _ : is_true (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@span K vT (@tval n (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X))))), @eq (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT))))) (Finite.sort (ordinal_finType n)) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT))))) (index_enum (ordinal_finType n)) (fun i : Finite.sort (ordinal_finType n) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT))))) (Finite.sort (ordinal_finType n)) i (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT))))) true (@GRing.scale (GRing.Field.ringType K) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT) (@coord n X i v) (@nth (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@tval n (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) (@nat_of_ord n i))))) *) rewrite memvK span_b2mx genmxE => Xv. (* Goal: @eq (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT))))) (Finite.sort (ordinal_finType n)) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT))))) (index_enum (ordinal_finType n)) (fun i : Finite.sort (ordinal_finType n) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT))))) (Finite.sort (ordinal_finType n)) i (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT))))) true (@GRing.scale (GRing.Field.ringType K) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT) (@coord n X i v) (@nth (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@tval n (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) (@nat_of_ord n i))))) *) by rewrite unlock_with mul_b2mx mulmxKpV ?v2rK. Qed. Lemma coord0 i v : coord [tuple 0] i v = 0. Proof. (* Goal: @eq (GRing.Ring.sort (GRing.Field.ringType K)) (@coord (S O) (@tuple (S O) (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@cons_tuple O (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (nil_tuple (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)))) (fun sP : is_true (@eq_op nat_eqType (@size (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@tval (S O) (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@cons_tuple O (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (nil_tuple (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)))))) (S O)) => @Tuple (S O) (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@cons (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@nil (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)))) sP)) i v) (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType K))) *) rewrite unlock /pinvmx rank_rV; case: negP => [[] | _]. (* Goal: @eq (GRing.Ring.sort (GRing.Field.ringType K)) (@fun_of_matrix (GRing.Ring.sort (GRing.Field.ringType K)) (S O) (S O) (@mulmx (GRing.Field.ringType K) (S O) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT) (S O) (@v2r (GRing.Field.ringType K) vT v) (@mulmx (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType K))) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT) (S O) (S O) (@mulmx (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType K))) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT) (S O) (@invmx (GRing.Field.comUnitRingType K) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT) (@row_ebase K (S O) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT) (@b2mx K vT (S O) (@tuple (S O) (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@cons_tuple O (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (nil_tuple (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)))) (fun sP : is_true (@eq_op nat_eqType (@size (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@tval (S O) (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@cons_tuple O (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (nil_tuple (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)))))) (S O)) => @Tuple (S O) (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@cons (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@nil (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)))) sP))))) (@pid_mx (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType K))) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT) (S O) (nat_of_bool false))) (@invmx (GRing.Field.comUnitRingType K) (S O) (@col_ebase K (S O) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT) (@b2mx K vT (S O) (@tuple (S O) (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@cons_tuple O (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (nil_tuple (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)))) (fun sP : is_true (@eq_op nat_eqType (@size (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@tval (S O) (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@cons_tuple O (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (nil_tuple (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)))))) (S O)) => @Tuple (S O) (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@cons (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@nil (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)))) sP))))))) (GRing.zero (Zp_zmodType O)) i) (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType K))) *) (* Goal: is_true (@eq_op (matrix_eqType (GRing.Field.eqType K) (S O) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@b2mx K vT (S O) (@tuple (S O) (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@cons_tuple O (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (nil_tuple (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)))) (fun sP : is_true (@eq_op nat_eqType (@size (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@tval (S O) (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@cons_tuple O (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (nil_tuple (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)))))) (S O)) => @Tuple (S O) (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@cons (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@nil (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)))) sP))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType K) (S O) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)))) *) by apply/eqP/rowP=> j; rewrite !mxE (tnth_nth 0) /= linear0 mxE. (* Goal: @eq (GRing.Ring.sort (GRing.Field.ringType K)) (@fun_of_matrix (GRing.Ring.sort (GRing.Field.ringType K)) (S O) (S O) (@mulmx (GRing.Field.ringType K) (S O) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT) (S O) (@v2r (GRing.Field.ringType K) vT v) (@mulmx (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType K))) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT) (S O) (S O) (@mulmx (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType K))) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT) (S O) (@invmx (GRing.Field.comUnitRingType K) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT) (@row_ebase K (S O) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT) (@b2mx K vT (S O) (@tuple (S O) (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@cons_tuple O (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (nil_tuple (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)))) (fun sP : is_true (@eq_op nat_eqType (@size (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@tval (S O) (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@cons_tuple O (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (nil_tuple (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)))))) (S O)) => @Tuple (S O) (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@cons (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@nil (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)))) sP))))) (@pid_mx (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType K))) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT) (S O) (nat_of_bool false))) (@invmx (GRing.Field.comUnitRingType K) (S O) (@col_ebase K (S O) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT) (@b2mx K vT (S O) (@tuple (S O) (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@cons_tuple O (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (nil_tuple (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)))) (fun sP : is_true (@eq_op nat_eqType (@size (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@tval (S O) (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@cons_tuple O (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (nil_tuple (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)))))) (S O)) => @Tuple (S O) (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@cons (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@nil (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)))) sP))))))) (GRing.zero (Zp_zmodType O)) i) (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType K))) *) by rewrite pid_mx_0 !(mulmx0, mul0mx) mxE. Qed. Lemma nil_free : free (Nil vT). Proof. (* Goal: is_true (@free K vT (@nil (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) *) by rewrite /free span_nil dimv0. Qed. Lemma seq1_free v : free [:: v] = (v != 0). Proof. (* Goal: @eq bool (@free K vT (@cons (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v (@nil (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)))) (negb (@eq_op (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)))) *) by rewrite /free span_seq1 dim_vline; case: (~~ _). Qed. Lemma perm_free X Y : perm_eq X Y -> free X = free Y. Proof. (* Goal: forall _ : is_true (@perm_eq (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X Y), @eq bool (@free K vT X) (@free K vT Y) *) by move=> eqX; rewrite /free (perm_eq_size eqX) (eq_span (perm_eq_mem eqX)). Qed. Lemma free_directv X : free X = (0 \notin X) && directv (\sum_(v <- X) <[v]>). Proof. (* Goal: @eq bool (@free K vT X) (andb (negb (@in_mem (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@mem (Equality.sort (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (seq_predType (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) X))) (@directv_def (proper_addv (@nary_addv_expr (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X (fun _ : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT => true) (fun v : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT => trivial_addv (@vline K vT v)))) (Phantom (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@BigOp.bigop (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@vline K vT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) X (fun v : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT => @BigBody (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v (@addv K vT) true (@vline K vT v)))))) *) have leXi i (v := tnth (in_tuple X) i): true -> \dim <[v]> <= 1 ?= iff (v != 0). (* Goal: @eq bool (@free K vT X) (andb (negb (@in_mem (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@mem (Equality.sort (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (seq_predType (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) X))) (@directv_def (proper_addv (@nary_addv_expr (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X (fun _ : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT => true) (fun v : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT => trivial_addv (@vline K vT v)))) (Phantom (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@BigOp.bigop (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@vline K vT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) X (fun v : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT => @BigBody (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v (@addv K vT) true (@vline K vT v)))))) *) (* Goal: forall _ : is_true true, leqif (@dimv K vT (@vline K vT v)) (S O) (negb (@eq_op (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)))) *) by rewrite -seq1_free -span_seq1 => _; apply/leqif_eq/dim_span. (* Goal: @eq bool (@free K vT X) (andb (negb (@in_mem (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@mem (Equality.sort (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (seq_predType (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) X))) (@directv_def (proper_addv (@nary_addv_expr (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X (fun _ : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT => true) (fun v : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT => trivial_addv (@vline K vT v)))) (Phantom (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@BigOp.bigop (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@vline K vT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) X (fun v : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT => @BigBody (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v (@addv K vT) true (@vline K vT v)))))) *) have [_ /=] := leqif_trans (dimv_sum_leqif _) (leqif_sum leXi). (* Goal: forall _ : @eq bool (@eq_op nat_eqType (@dimv K vT (@BigOp.bigop (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (ordinal (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X)) (@vline K vT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (index_enum (ordinal_finType (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X))) (fun i : ordinal (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) => @BigBody (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (ordinal (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X)) i (@addv K vT) true (@vline K vT (@tnth (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@in_tuple (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) i))))) (@BigOp.bigop nat (ordinal (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X)) O (index_enum (ordinal_finType (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X))) (fun i : ordinal (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) => @BigBody nat (ordinal (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X)) i addn true (S O)))) (andb (@directv_def (proper_addv (@nary_addv_expr (ordinal (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X)) (index_enum (ordinal_finType (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X))) (fun _ : ordinal (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) => true) (fun i : ordinal (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) => trivial_addv (@vline K vT (@tnth (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@in_tuple (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) i))))) (Phantom (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@BigOp.bigop (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (ordinal (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X)) (@vline K vT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (index_enum (ordinal_finType (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X))) (fun i : ordinal (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) => @BigBody (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (ordinal (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X)) i (@addv K vT) true (@vline K vT (@tnth (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@in_tuple (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) i)))))) (@FiniteQuant.quant0b (ordinal_finType (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X)) (fun i : ordinal (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) => @FiniteQuant.all_in (ordinal_finType (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X)) true (FiniteQuant.Quantified (negb (@eq_op (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@tnth (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@in_tuple (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) i) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))))) i))), @eq bool (@free K vT X) (andb (negb (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (seq_predType (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) X))) (@directv_def (proper_addv (@nary_addv_expr (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X (fun _ : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT => true) (fun v : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT => trivial_addv (@vline K vT v)))) (Phantom (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@BigOp.bigop (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@vline K vT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) X (fun v : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT => @BigBody (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v (@addv K vT) true (@vline K vT v)))))) *) rewrite sum1_card card_ord !directvE /= /free andbC span_def !(big_tnth _ _ X). (* Goal: forall _ : @eq bool (@eq_op nat_eqType (@dimv K vT (@BigOp.bigop (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (ordinal (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X)) (@vline K vT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (index_enum (ordinal_finType (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X))) (fun i : ordinal (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) => @BigBody (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (ordinal (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X)) i (@addv K vT) true (@vline K vT (@tnth (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@in_tuple (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) i))))) (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X)) (andb (@FiniteQuant.quant0b (ordinal_finType (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X)) (fun i : ordinal (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) => @FiniteQuant.all_in (ordinal_finType (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X)) true (FiniteQuant.Quantified (negb (@eq_op (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@tnth (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@in_tuple (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) i) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))))) i)) (@eq_op nat_eqType (@dimv K vT (@BigOp.bigop (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (ordinal (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X)) (@vline K vT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (index_enum (ordinal_finType (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X))) (fun i : ordinal (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) => @BigBody (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (ordinal (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X)) i (@addv K vT) true (@vline K vT (@tnth (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@in_tuple (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) i))))) (@BigOp.bigop nat (ordinal (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X)) O (index_enum (ordinal_finType (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X))) (fun i : ordinal (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) => @BigBody nat (ordinal (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X)) i addn true (@dimv K vT (@vline K vT (@tnth (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@in_tuple (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) i))))))), @eq bool (@eq_op nat_eqType (@dimv K vT (@BigOp.bigop (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (Finite.sort (ordinal_finType (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X))) (@vline K vT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (index_enum (ordinal_finType (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X))) (fun i : ordinal (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) => @BigBody (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (ordinal (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X)) i (@addv K vT) true (@vline K vT (@tnth (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@in_tuple (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) i))))) (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X)) (andb (negb (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (seq_predType (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) X))) (@eq_op nat_eqType (@dimv K vT (@BigOp.bigop (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (Finite.sort (ordinal_finType (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X))) (@vline K vT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (index_enum (ordinal_finType (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X))) (fun i : ordinal (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) => @BigBody (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (ordinal (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X)) i (@addv K vT) true (@vline K vT (@tnth (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@in_tuple (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) i))))) (@BigOp.bigop nat (Finite.sort (ordinal_finType (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X))) O (index_enum (ordinal_finType (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X))) (fun i : ordinal (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) => @BigBody nat (ordinal (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X)) i addn true (@dimv K vT (@vline K vT (@tnth (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@in_tuple (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) i))))))) *) by congr (_ = _ && _); rewrite -has_pred1 -all_predC -big_all big_tnth big_andE. Qed. Lemma free_not0 v X : free X -> v \in X -> v != 0. Proof. (* Goal: forall (_ : is_true (@free K vT X)) (_ : is_true (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v (@mem (Equality.sort (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (seq_predType (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) X))), is_true (negb (@eq_op (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)))) *) by rewrite free_directv andbC => /andP[_ /memPn]; apply. Qed. Lemma freeP n (X : n.-tuple vT) : Proof. (* Goal: Bool.reflect (forall (k : forall _ : ordinal n, GRing.Ring.sort (GRing.Field.ringType K)) (_ : @eq (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT))))) (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT))))) (Finite.sort (ordinal_finType n)) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT))))) (index_enum (ordinal_finType n)) (fun i : ordinal n => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT))))) (ordinal n) i (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT))))) true (@GRing.scale (GRing.Field.ringType K) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT) (k i) (@nth (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@tval n (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) (@nat_of_ord n i))))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)))))) (i : ordinal n), @eq (GRing.Ring.sort (GRing.Field.ringType K)) (k i) (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType K)))) (@free K vT (@tval n (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X)) *) rewrite free_b2mx; apply: (iffP idP) => [t_free k kt0 i | t_free]. (* Goal: is_true (@row_free K n (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT) (@b2mx K vT n X)) *) (* Goal: @eq (GRing.Ring.sort (GRing.Field.ringType K)) (k i) (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType K))) *) suffices /rowP/(_ i): \row_i k i = 0 by rewrite !mxE. (* Goal: is_true (@row_free K n (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT) (@b2mx K vT n X)) *) (* Goal: @eq (matrix (GRing.Ring.sort (GRing.Field.ringType K)) (S O) n) (@matrix_of_fun (GRing.Ring.sort (GRing.Field.ringType K)) (S O) n matrix_key (fun (_ : Finite.sort (ordinal_finType (S O))) (i : Finite.sort (ordinal_finType n)) => k i)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType K)) (S O) n)) *) by apply/(row_free_inj t_free)/r2v_inj; rewrite mul0mx -lin_b2mx kt0 linear0. (* Goal: is_true (@row_free K n (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT) (@b2mx K vT n X)) *) rewrite -kermx_eq0; apply/rowV0P=> rk /sub_kermxP kt0. (* Goal: @eq (matrix (GRing.Field.sort K) (S O) n) rk (GRing.zero (matrix_zmodType (GRing.Field.zmodType K) (S O) n)) *) by apply/rowP=> i; rewrite mxE {}t_free // mul_b2mx kt0 linear0. Qed. Lemma coord_free n (X : n.-tuple vT) (i j : 'I_n) : Proof. (* Goal: forall _ : is_true (@free K vT (@tval n (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X)), @eq (GRing.Ring.sort (GRing.Field.ringType K)) (@coord n X j (@nth (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@tval n (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) (@nat_of_ord n i))) (@GRing.natmul (GRing.Ring.zmodType (GRing.Field.ringType K)) (GRing.one (GRing.Field.ringType K)) (nat_of_bool (@eq_op (ordinal_eqType n) i j))) *) rewrite unlock free_b2mx => /row_freeP[Ct CtK]; rewrite -row_b2mx. (* Goal: @eq (GRing.Ring.sort (GRing.Field.ringType K)) (@fun_of_matrix (GRing.Ring.sort (GRing.Field.ringType K)) (S O) n (@mulmx (GRing.Field.ringType K) (S O) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT) n (@row (GRing.Ring.sort (GRing.Field.ringType K)) n (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT) i (@b2mx K vT n X)) (@pinvmx K n (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT) (@b2mx K vT n X))) (GRing.zero (Zp_zmodType O)) j) (@GRing.natmul (GRing.Ring.zmodType (GRing.Field.ringType K)) (GRing.one (GRing.Field.ringType K)) (nat_of_bool (@eq_op (ordinal_eqType n) i j))) *) by rewrite -row_mul -[pinvmx _]mulmx1 -CtK 2!mulmxA mulmxKpV // CtK !mxE. Qed. Lemma coord_sum_free n (X : n.-tuple vT) k j : Proof. (* Goal: forall _ : is_true (@free K vT (@tval n (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X)), @eq (GRing.Ring.sort (GRing.Field.ringType K)) (@coord n X j (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT))))) (Finite.sort (ordinal_finType n)) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT))))) (index_enum (ordinal_finType n)) (fun i : ordinal n => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT))))) (ordinal n) i (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT))))) true (@GRing.scale (GRing.Field.ringType K) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT) (k i) (@nth (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@tval n (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) (@nat_of_ord n i)))))) (k j) *) move=> Xfree; rewrite linear_sum (bigD1 j) ?linearZ //= coord_free // eqxx. (* Goal: @eq (GRing.Field.sort K) (@GRing.add (GRing.Ring.zmodType (GRing.Field.ringType K)) (@GRing.mul (GRing.Field.ringType K) (k j) (@GRing.natmul (GRing.Ring.zmodType (GRing.Field.ringType K)) (GRing.one (GRing.Field.ringType K)) (nat_of_bool true))) (@BigOp.bigop (GRing.Field.sort K) (ordinal n) (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType K))) (index_enum (ordinal_finType n)) (fun i : ordinal n => @BigBody (GRing.Field.sort K) (ordinal n) i (@GRing.add (GRing.Ring.zmodType (GRing.Field.ringType K))) (negb (@eq_op (Finite.eqType (ordinal_finType n)) i j)) (@coord n X j (@GRing.scale (GRing.Field.ringType K) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (k i) (@nth (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@tval n (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) (@nat_of_ord n i))))))) (k j) *) rewrite mulr1 big1 ?addr0 // => i /negPf j'i. (* Goal: @eq (GRing.Field.sort K) (@coord n X j (@GRing.scale (GRing.Field.ringType K) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (k i) (@nth (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@tval n (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) (@nat_of_ord n i)))) (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType K))) *) by rewrite linearZ /= coord_free // j'i mulr0. Qed. Lemma cat_free X Y : free (X ++ Y) = [&& free X, free Y & directv (<<X>> + <<Y>>)]. Proof. (* Goal: @eq bool (@free K vT (@cat (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X Y)) (andb (@free K vT X) (andb (@free K vT Y) (@directv_def (proper_addv (binary_addv_expr (trivial_addv (@span K vT X)) (trivial_addv (@span K vT Y)))) (Phantom (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@addv K vT (@span K vT X) (@span K vT Y)))))) *) rewrite !free_directv mem_cat directvE /= !big_cat -directvE directv_addE /=. (* Goal: @eq bool (andb (negb (orb (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (seq_predType (GRing.Zmodule.eqType (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) X)) (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (seq_predType (GRing.Zmodule.eqType (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) Y)))) (andb (@directv_def (proper_addv (@nary_addv_expr (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X (fun _ : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT => true) (fun i : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT => trivial_addv (@vline K vT i)))) (Phantom (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@BigOp.bigop (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@vline K vT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) X (fun i : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT => @BigBody (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) i (@addv K vT) true (@vline K vT i))))) (andb (@directv_def (proper_addv (@nary_addv_expr (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) Y (fun _ : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT => true) (fun i : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT => trivial_addv (@vline K vT i)))) (Phantom (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@BigOp.bigop (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@vline K vT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) Y (fun i : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT => @BigBody (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) i (@addv K vT) true (@vline K vT i))))) (@eq_op (@space_eqType K vT) (@capv K vT (@BigOp.bigop (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@vline K vT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) X (fun i : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT => @BigBody (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) i (@addv K vT) true (@vline K vT i))) (@BigOp.bigop (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@vline K vT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) Y (fun i : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT => @BigBody (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) i (@addv K vT) true (@vline K vT i)))) (@vline K vT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))))))) (andb (andb (negb (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (seq_predType (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) X))) (@directv_def (proper_addv (@nary_addv_expr (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X (fun _ : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT => true) (fun v : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT => trivial_addv (@vline K vT v)))) (Phantom (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@BigOp.bigop (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@vline K vT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) X (fun v : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT => @BigBody (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v (@addv K vT) true (@vline K vT v)))))) (andb (andb (negb (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (seq_predType (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) Y))) (@directv_def (proper_addv (@nary_addv_expr (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) Y (fun _ : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT => true) (fun v : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT => trivial_addv (@vline K vT v)))) (Phantom (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@BigOp.bigop (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@vline K vT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) Y (fun v : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT => @BigBody (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v (@addv K vT) true (@vline K vT v)))))) (@directv_def (proper_addv (binary_addv_expr (trivial_addv (@span K vT X)) (trivial_addv (@span K vT Y)))) (Phantom (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@addv K vT (@span K vT X) (@span K vT Y)))))) *) rewrite negb_or -!andbA; do !bool_congr; rewrite -!span_def. (* Goal: @eq bool (@eq_op (@space_eqType K vT) (@capv K vT (@span K vT X) (@span K vT Y)) (@vline K vT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)))) (@directv_def (proper_addv (binary_addv_expr (trivial_addv (@span K vT X)) (trivial_addv (@span K vT Y)))) (Phantom (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@addv K vT (@span K vT X) (@span K vT Y)))) *) by rewrite (sameP eqP directv_addP). Qed. Lemma catl_free Y X : free (X ++ Y) -> free X. Proof. (* Goal: forall _ : is_true (@free K vT (@cat (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X Y)), is_true (@free K vT X) *) by rewrite cat_free => /and3P[]. Qed. Lemma catr_free X Y : free (X ++ Y) -> free Y. Proof. (* Goal: forall _ : is_true (@free K vT (@cat (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X Y)), is_true (@free K vT Y) *) by rewrite cat_free => /and3P[]. Qed. Lemma filter_free p X : free X -> free (filter p X). Proof. (* Goal: forall _ : is_true (@free K vT X), is_true (@free K vT (@filter (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) p X)) *) rewrite -(perm_free (etrans (perm_filterC p X _) (perm_eq_refl X))). (* Goal: forall _ : is_true (@free K vT (@cat (Equality.sort (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@filter (Equality.sort (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) p X) (@filter (Equality.sort (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_simpl (Equality.sort (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@predC (Equality.sort (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) p)) X))), is_true (@free K vT (@filter (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) p X)) *) exact: catl_free. Qed. Lemma free_cons v X : free (v :: X) = (v \notin <<X>>)%VS && free X. Proof. (* Goal: @eq bool (@free K vT (@cons (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v X)) (andb (negb (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@span K vT X))))) (@free K vT X)) *) rewrite (cat_free [:: v]) seq1_free directvEgeq /= span_seq1 dim_vline. (* Goal: @eq bool (andb (negb (@eq_op (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)))) (andb (@free K vT X) (leq (addn (nat_of_bool (negb (@eq_op (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))))) (@dimv K vT (@span K vT X))) (@dimv K vT (@addv K vT (@vline K vT v) (@span K vT X)))))) (andb (negb (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@span K vT X))))) (@free K vT X)) *) case: eqP => [-> | _] /=; first by rewrite mem0v. (* Goal: @eq bool (andb (@free K vT X) (leq (addn (S O) (@dimv K vT (@span K vT X))) (@dimv K vT (@addv K vT (@vline K vT v) (@span K vT X))))) (andb (negb (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@span K vT X))))) (@free K vT X)) *) rewrite andbC ltnNge (geq_leqif (dimv_leqif_sup _)) ?addvSr //. (* Goal: @eq bool (andb (negb (@subsetv K vT (@addv K vT (@vline K vT v) (@span K vT X)) (@span K vT X))) (@free K vT X)) (andb (negb (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@span K vT X))))) (@free K vT X)) *) by rewrite subv_add subvv andbT -memvE. Qed. Lemma freeE n (X : n.-tuple vT) : Proof. (* Goal: @eq bool (@free K vT (@tval n (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X)) (@FiniteQuant.quant0b (ordinal_finType n) (fun i : ordinal n => @FiniteQuant.all (ordinal_finType n) (FiniteQuant.Quantified (negb (@in_mem (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@nth (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@tval n (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) (@nat_of_ord n i)) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@span K vT (@drop (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (S (@nat_of_ord n i)) (@tval n (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X)))))))) i)) *) case: X => X /= /eqP <-{n}; rewrite -(big_andE xpredT) /=. (* Goal: @eq bool (@free K vT X) (@BigOp.bigop bool (ordinal (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X)) true (index_enum (ordinal_finType (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X))) (fun i : ordinal (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) => @BigBody bool (ordinal (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X)) i andb true (negb (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@nth (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) X (@nat_of_ord (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) i)) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@span K vT (@drop (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (S (@nat_of_ord (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) i)) X)))))))) *) elim: X => [|v X IH_X] /=; first by rewrite nil_free big_ord0. (* Goal: @eq bool (@free K vT (@cons (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v X)) (@BigOp.bigop bool (ordinal (S (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X))) true (index_enum (ordinal_finType (S (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X)))) (fun i : ordinal (S (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X)) => @BigBody bool (ordinal (S (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X))) i andb true (negb (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@nth (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@cons (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v X) (@nat_of_ord (S (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X)) i)) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@span K vT (@drop (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@nat_of_ord (S (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X)) i) X)))))))) *) by rewrite free_cons IH_X big_ord_recl drop0. Qed. Lemma freeNE n (X : n.-tuple vT) : Proof. (* Goal: @eq bool (negb (@free K vT (@tval n (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X))) (negb (@FiniteQuant.quant0b (ordinal_finType n) (fun i : ordinal n => @FiniteQuant.ex (ordinal_finType n) (FiniteQuant.Quantified (@in_mem (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@nth (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@tval n (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) (@nat_of_ord n i)) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@span K vT (@drop (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (S (@nat_of_ord n i)) (@tval n (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X))))))) i))) *) by rewrite freeE -negb_exists negbK. Qed. Lemma free_uniq X : free X -> uniq X. Proof. (* Goal: forall _ : is_true (@free K vT X), is_true (@uniq (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) *) elim: X => //= v b IH_X; rewrite free_cons => /andP[X'v /IH_X->]. (* Goal: is_true (andb (negb (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (seq_predType (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) b))) true) *) by rewrite (contra _ X'v) // => /memv_span. Qed. Lemma free_span X v (sumX := fun k => \sum_(x <- X) k x *: x) : free X -> v \in <<X>>%VS -> {k | v = sumX k & forall k1, v = sumX k1 -> {in X, k1 =1 k}}. Proof. (* Goal: forall (_ : is_true (@free K vT X)) (_ : is_true (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@span K vT X))))), @sig2 (forall _ : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT, GRing.Ring.sort (GRing.Field.ringType K)) (fun k : forall _ : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT, GRing.Ring.sort (GRing.Field.ringType K) => @eq (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v (sumX k)) (fun k : forall _ : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT, GRing.Ring.sort (GRing.Field.ringType K) => forall (k1 : forall _ : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT, GRing.Ring.sort (GRing.Field.ringType K)) (_ : @eq (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v (sumX k1)), @prop_in1 (Equality.sort (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@mem (Equality.sort (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (seq_predType (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) X) (fun x : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT => @eq (GRing.Ring.sort (GRing.Field.ringType K)) (k1 x) (k x)) (inPhantom (@eqfun (GRing.Ring.sort (GRing.Field.ringType K)) (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) k1 k))) *) rewrite -{2}[X]in_tupleE => freeX /coord_span def_v. (* Goal: @sig2 (forall _ : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT, GRing.Ring.sort (GRing.Field.ringType K)) (fun k : forall _ : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT, GRing.Ring.sort (GRing.Field.ringType K) => @eq (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v (sumX k)) (fun k : forall _ : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT, GRing.Ring.sort (GRing.Field.ringType K) => forall (k1 : forall _ : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT, GRing.Ring.sort (GRing.Field.ringType K)) (_ : @eq (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v (sumX k1)), @prop_in1 (Equality.sort (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@mem (Equality.sort (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (seq_predType (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) X) (fun x : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT => @eq (GRing.Ring.sort (GRing.Field.ringType K)) (k1 x) (k x)) (inPhantom (@eqfun (GRing.Ring.sort (GRing.Field.ringType K)) (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) k1 k))) *) pose k x := oapp (fun i => coord (in_tuple X) i v) 0 (insub (index x X)). (* Goal: @sig2 (forall _ : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT, GRing.Ring.sort (GRing.Field.ringType K)) (fun k : forall _ : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT, GRing.Ring.sort (GRing.Field.ringType K) => @eq (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v (sumX k)) (fun k : forall _ : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT, GRing.Ring.sort (GRing.Field.ringType K) => forall (k1 : forall _ : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT, GRing.Ring.sort (GRing.Field.ringType K)) (_ : @eq (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v (sumX k1)), @prop_in1 (Equality.sort (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@mem (Equality.sort (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (seq_predType (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) X) (fun x : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT => @eq (GRing.Ring.sort (GRing.Field.ringType K)) (k1 x) (k x)) (inPhantom (@eqfun (GRing.Ring.sort (GRing.Field.ringType K)) (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) k1 k))) *) exists k => [|k1 {def_v}def_v _ /(nthP 0)[i ltiX <-]]. (* Goal: @eq (GRing.Ring.sort (GRing.Field.ringType K)) (k1 (@nth (Equality.sort (GRing.Zmodule.eqType (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) X i)) (k (@nth (Equality.sort (GRing.Zmodule.eqType (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) X i)) *) (* Goal: @eq (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v (sumX k) *) rewrite /sumX (big_nth 0) big_mkord def_v; apply: eq_bigr => i _. (* Goal: @eq (GRing.Ring.sort (GRing.Field.ringType K)) (k1 (@nth (Equality.sort (GRing.Zmodule.eqType (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) X i)) (k (@nth (Equality.sort (GRing.Zmodule.eqType (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) X i)) *) (* Goal: @eq (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@GRing.scale (GRing.Field.ringType K) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT) (@coord (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) (@in_tuple (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) i v) (@nth (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@tval (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@in_tuple (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X)) (@nat_of_ord (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) i))) (@GRing.scale (GRing.Field.ringType K) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT) (k (@nth (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) X (@nat_of_ord (@size (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) X) i))) (@nth (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) X (@nat_of_ord (@size (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) X) i))) *) by rewrite /k index_uniq ?free_uniq // valK. (* Goal: @eq (GRing.Ring.sort (GRing.Field.ringType K)) (k1 (@nth (Equality.sort (GRing.Zmodule.eqType (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) X i)) (k (@nth (Equality.sort (GRing.Zmodule.eqType (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) X i)) *) rewrite /k /= index_uniq ?free_uniq // insubT //= def_v. (* Goal: @eq (GRing.Field.sort K) (k1 (@nth (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) X i)) (@coord (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) (@in_tuple (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) (@Ordinal (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) i ltiX) (sumX k1)) *) by rewrite /sumX (big_nth 0) big_mkord coord_sum_free. Qed. Lemma linear_of_free (rT : lmodType K) X (fX : seq rT) : {f : {linear vT -> rT} | free X -> size fX = size X -> map f X = fX}. Proof. (* Goal: @sig (@GRing.Linear.map (GRing.Field.ringType K) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT))) (@GRing.scale (GRing.Field.ringType K) rT) (Phant (forall _ : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT, @GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT))) (fun f : @GRing.Linear.map (GRing.Field.ringType K) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT))) (@GRing.scale (GRing.Field.ringType K) rT) (Phant (forall _ : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT, @GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT)) => forall (_ : is_true (@free K vT X)) (_ : @eq nat (@size (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) fX) (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X)), @eq (list (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT))))) (@map (GRing.Zmodule.sort (@GRing.Lmodule.zmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT))) (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT)))) (@GRing.Linear.apply (GRing.Field.ringType K) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT))) (@GRing.scale (GRing.Field.ringType K) rT) (Phant (forall _ : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT, @GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT)) f) X) fX) *) pose f u := \sum_i coord (in_tuple X) i u *: fX`_i. (* Goal: @sig (@GRing.Linear.map (GRing.Field.ringType K) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT))) (@GRing.scale (GRing.Field.ringType K) rT) (Phant (forall _ : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT, @GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT))) (fun f : @GRing.Linear.map (GRing.Field.ringType K) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT))) (@GRing.scale (GRing.Field.ringType K) rT) (Phant (forall _ : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT, @GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT)) => forall (_ : is_true (@free K vT X)) (_ : @eq nat (@size (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) fX) (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X)), @eq (list (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT))))) (@map (GRing.Zmodule.sort (@GRing.Lmodule.zmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT))) (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT)))) (@GRing.Linear.apply (GRing.Field.ringType K) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT))) (@GRing.scale (GRing.Field.ringType K) rT) (Phant (forall _ : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT, @GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT)) f) X) fX) *) have lin_f: linear f. (* Goal: @sig (@GRing.Linear.map (GRing.Field.ringType K) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT))) (@GRing.scale (GRing.Field.ringType K) rT) (Phant (forall _ : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT, @GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT))) (fun f : @GRing.Linear.map (GRing.Field.ringType K) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT))) (@GRing.scale (GRing.Field.ringType K) rT) (Phant (forall _ : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT, @GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT)) => forall (_ : is_true (@free K vT X)) (_ : @eq nat (@size (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) fX) (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X)), @eq (list (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT))))) (@map (GRing.Zmodule.sort (@GRing.Lmodule.zmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT))) (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT)))) (@GRing.Linear.apply (GRing.Field.ringType K) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT))) (@GRing.scale (GRing.Field.ringType K) rT) (Phant (forall _ : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT, @GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT)) f) X) fX) *) (* Goal: @GRing.Linear.axiom (GRing.Field.ringType K) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT))) (@GRing.scale (GRing.Field.ringType K) rT) f (@GRing.Scale.scale_law (GRing.Field.ringType K) rT) (@Logic.eq_refl (forall (_ : GRing.Ring.sort (GRing.Field.ringType K)) (_ : GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT)))), GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT)))) (@GRing.scale (GRing.Field.ringType K) rT)) *) move=> k u v; rewrite scaler_sumr -big_split; apply: eq_bigr => i _. (* Goal: @sig (@GRing.Linear.map (GRing.Field.ringType K) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT))) (@GRing.scale (GRing.Field.ringType K) rT) (Phant (forall _ : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT, @GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT))) (fun f : @GRing.Linear.map (GRing.Field.ringType K) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT))) (@GRing.scale (GRing.Field.ringType K) rT) (Phant (forall _ : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT, @GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT)) => forall (_ : is_true (@free K vT X)) (_ : @eq nat (@size (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) fX) (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X)), @eq (list (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT))))) (@map (GRing.Zmodule.sort (@GRing.Lmodule.zmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT))) (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT)))) (@GRing.Linear.apply (GRing.Field.ringType K) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT))) (@GRing.scale (GRing.Field.ringType K) rT) (Phant (forall _ : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT, @GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT)) f) X) fX) *) (* Goal: @eq (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT)))) (@GRing.scale (GRing.Field.ringType K) rT (@coord (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) (@in_tuple (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) i (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)))) (@GRing.scale (GRing.Field.ringType K) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT) k u) v)) (@nth (GRing.Zmodule.sort (@GRing.Lmodule.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT)) (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT)) fX (@nat_of_ord (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) i))) (@Monoid.operator (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT)))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT)))) (@Monoid.com_operator (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT)))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT)))) (GRing.add_comoid (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT))))) (@GRing.scale (GRing.Field.ringType K) rT k (@GRing.scale (GRing.Field.ringType K) rT (@coord (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) (@in_tuple (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) i u) (@nth (GRing.Zmodule.sort (@GRing.Lmodule.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT)) (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT)) fX (@nat_of_ord (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) i)))) (@GRing.scale (GRing.Field.ringType K) rT (@coord (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) (@in_tuple (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) i v) (@nth (GRing.Zmodule.sort (@GRing.Lmodule.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT)) (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT)) fX (@nat_of_ord (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) i)))) *) by rewrite /= scalerA -scalerDl linearP. (* Goal: @sig (@GRing.Linear.map (GRing.Field.ringType K) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT))) (@GRing.scale (GRing.Field.ringType K) rT) (Phant (forall _ : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT, @GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT))) (fun f : @GRing.Linear.map (GRing.Field.ringType K) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT))) (@GRing.scale (GRing.Field.ringType K) rT) (Phant (forall _ : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT, @GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT)) => forall (_ : is_true (@free K vT X)) (_ : @eq nat (@size (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) fX) (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X)), @eq (list (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT))))) (@map (GRing.Zmodule.sort (@GRing.Lmodule.zmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT))) (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT)))) (@GRing.Linear.apply (GRing.Field.ringType K) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT))) (@GRing.scale (GRing.Field.ringType K) rT) (Phant (forall _ : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT, @GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT)) f) X) fX) *) exists (Linear lin_f) => freeX eq_szX. (* Goal: @eq (list (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT))))) (@map (GRing.Zmodule.sort (@GRing.Lmodule.zmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT))) (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT)))) (@GRing.Linear.apply (GRing.Field.ringType K) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT))) (@GRing.scale (GRing.Field.ringType K) rT) (Phant (forall _ : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT, @GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT)) (@GRing.Linear.Pack (GRing.Field.ringType K) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT))) (@GRing.scale (GRing.Field.ringType K) rT) (Phant (forall _ : @GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT), GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT))))) f (@GRing.Linear.class_of_axiom (GRing.Field.ringType K) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT))) (@GRing.scale (GRing.Field.ringType K) rT) f (@GRing.Scale.scale_law (GRing.Field.ringType K) rT) (@Logic.eq_refl (forall (_ : GRing.Ring.sort (GRing.Field.ringType K)) (_ : GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT)))), GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT)))) (@GRing.scale (GRing.Field.ringType K) rT)) lin_f))) X) fX *) apply/esym/(@eq_from_nth _ 0); rewrite ?size_map eq_szX // => i ltiX. (* Goal: @eq (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT)))) (@nth (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT)))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT)))) fX i) (@nth (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT)))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT)))) (@map (GRing.Zmodule.sort (@GRing.Lmodule.zmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT))) (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT)))) (@GRing.Linear.apply (GRing.Field.ringType K) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT))) (@GRing.scale (GRing.Field.ringType K) rT) (Phant (forall _ : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT, @GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT)) (@GRing.Linear.Pack (GRing.Field.ringType K) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT))) (@GRing.scale (GRing.Field.ringType K) rT) (Phant (forall _ : @GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT), GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT))))) f (@GRing.Linear.class_of_axiom (GRing.Field.ringType K) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT))) (@GRing.scale (GRing.Field.ringType K) rT) f (@GRing.Scale.scale_law (GRing.Field.ringType K) rT) (@Logic.eq_refl (forall (_ : GRing.Ring.sort (GRing.Field.ringType K)) (_ : GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT)))), GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT)))) (@GRing.scale (GRing.Field.ringType K) rT)) lin_f))) X) i) *) rewrite (nth_map 0) //= /f (bigD1 (Ordinal ltiX)) //=. (* Goal: @eq (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@nth (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT)))) fX i) (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT))) (@GRing.scale (GRing.Field.ringType K) rT (@coord (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) (@in_tuple (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) (@Ordinal (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) i ltiX) (@nth (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) X i)) (@nth (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT)) fX i)) (@BigOp.bigop (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (ordinal (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X)) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT)))) (index_enum (ordinal_finType (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X))) (fun i0 : ordinal (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) => @BigBody (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (ordinal (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X)) i0 (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT)))) (negb (@eq_op (Finite.eqType (ordinal_finType (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X))) i0 (@Ordinal (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) i ltiX))) (@GRing.scale (GRing.Field.ringType K) rT (@coord (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) (@in_tuple (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) i0 (@nth (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) X i)) (@nth (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT)) fX (@nat_of_ord (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) i0)))))) *) rewrite big1 => [|j /negbTE neqji]; rewrite (coord_free (Ordinal _)) //. (* Goal: @eq (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@GRing.scale (GRing.Field.ringType K) rT (@GRing.natmul (GRing.Ring.zmodType (GRing.Field.ringType K)) (GRing.one (GRing.Field.ringType K)) (nat_of_bool (@eq_op (ordinal_eqType (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X)) (@Ordinal (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) i ltiX) j))) (@nth (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT)) fX (@nat_of_ord (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) j))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT)))) *) (* Goal: @eq (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@nth (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT)))) fX i) (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT))) (@GRing.scale (GRing.Field.ringType K) rT (@GRing.natmul (GRing.Ring.zmodType (GRing.Field.ringType K)) (GRing.one (GRing.Field.ringType K)) (nat_of_bool (@eq_op (ordinal_eqType (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X)) (@Ordinal (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) i ltiX) (@Ordinal (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) i ltiX)))) (@nth (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT)) fX i)) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT))))) *) by rewrite eqxx scale1r addr0. (* Goal: @eq (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@GRing.scale (GRing.Field.ringType K) rT (@GRing.natmul (GRing.Ring.zmodType (GRing.Field.ringType K)) (GRing.one (GRing.Field.ringType K)) (nat_of_bool (@eq_op (ordinal_eqType (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X)) (@Ordinal (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) i ltiX) j))) (@nth (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT)) fX (@nat_of_ord (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) j))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT)))) *) by rewrite eq_sym neqji scale0r. Qed. Lemma span_basis U X : basis_of U X -> <<X>>%VS = U. Proof. (* Goal: forall _ : is_true (@basis_of K vT U X), @eq (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@span K vT X) U *) by case/andP=> /eqP. Qed. Lemma basis_free U X : basis_of U X -> free X. Proof. (* Goal: forall _ : is_true (@basis_of K vT U X), is_true (@free K vT X) *) by case/andP. Qed. Lemma coord_basis U n (X : n.-tuple vT) v : Proof. (* Goal: forall (_ : is_true (@basis_of K vT U (@tval n (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X))) (_ : is_true (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) U)))), @eq (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT))))) (Finite.sort (ordinal_finType n)) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT))))) (index_enum (ordinal_finType n)) (fun i : Finite.sort (ordinal_finType n) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT))))) (Finite.sort (ordinal_finType n)) i (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT))))) true (@GRing.scale (GRing.Field.ringType K) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT) (@coord n X i v) (@nth (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@tval n (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X) (@nat_of_ord n i))))) *) by move/span_basis <-; apply: coord_span. Qed. Lemma nil_basis : basis_of 0 (Nil vT). Proof. (* Goal: is_true (@basis_of K vT (@vline K vT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@nil (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) *) by rewrite /basis_of span_nil eqxx nil_free. Qed. Lemma seq1_basis v : v != 0 -> basis_of <[v]> [:: v]. Proof. (* Goal: forall _ : is_true (negb (@eq_op (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)))), is_true (@basis_of K vT (@vline K vT v) (@cons (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v (@nil (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)))) *) by move=> nz_v; rewrite /basis_of span_seq1 // eqxx seq1_free. Qed. Lemma basis_not0 x U X : basis_of U X -> x \in X -> x != 0. Proof. (* Goal: forall (_ : is_true (@basis_of K vT U X)) (_ : is_true (@in_mem (Equality.sort (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) x (@mem (Equality.sort (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (seq_predType (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) X))), is_true (negb (@eq_op (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) x (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)))) *) by move/basis_free/free_not0; apply. Qed. Lemma basis_mem x U X : basis_of U X -> x \in X -> x \in U. Proof. (* Goal: forall (_ : is_true (@basis_of K vT U X)) (_ : is_true (@in_mem (Equality.sort (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) x (@mem (Equality.sort (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (seq_predType (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) X))), is_true (@in_mem (Equality.sort (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) x (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) U))) *) by move/span_basis=> <- /memv_span. Qed. Lemma cat_basis U V X Y : directv (U + V) -> basis_of U X -> basis_of V Y -> basis_of (U + V) (X ++ Y). Proof. (* Goal: forall (_ : is_true (@directv_def (proper_addv (binary_addv_expr (trivial_addv U) (trivial_addv V))) (Phantom (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@addv K vT U V)))) (_ : is_true (@basis_of K vT U X)) (_ : is_true (@basis_of K vT V Y)), is_true (@basis_of K vT (@addv K vT U V) (@cat (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X Y)) *) move=> dxUV /andP[/eqP defU freeX] /andP[/eqP defV freeY]. (* Goal: is_true (@basis_of K vT (@addv K vT U V) (@cat (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X Y)) *) by rewrite /basis_of span_cat cat_free defU defV // eqxx freeX freeY. Qed. Lemma size_basis U n (X : n.-tuple vT) : basis_of U X -> \dim U = n. Proof. (* Goal: forall _ : is_true (@basis_of K vT U (@tval n (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X)), @eq nat (@dimv K vT U) n *) by case/andP=> /eqP <- /eqnP->; apply: size_tuple. Qed. Lemma basisEdim X U : basis_of U X = (U <= <<X>>)%VS && (size X <= \dim U). Lemma basisEfree X U : basis_of U X = [&& free X, (<<X>> <= U)%VS & \dim U <= size X]. Proof. (* Goal: @eq bool (@basis_of K vT U X) (andb (@free K vT X) (andb (@subsetv K vT (@span K vT X) U) (leq (@dimv K vT U) (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) X)))) *) by rewrite andbC; apply: andb_id2r => freeX; rewrite eqEdim (eqnP freeX). Qed. Lemma perm_basis X Y U : perm_eq X Y -> basis_of U X = basis_of U Y. Lemma vbasisP U : basis_of U (vbasis U). Proof. (* Goal: is_true (@basis_of K vT U (@tval (@dimv K vT U) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@vbasis K vT U))) *) rewrite /basis_of free_b2mx span_b2mx (sameP eqP (vs2mxP _ _)) !genmxE. (* Goal: is_true (andb (andb (@submx K (@dimv K vT U) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@b2mx K vT (@dimv K vT U) (@vbasis K vT U)) (@vs2mx K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) U)) (@submx K (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@dimv K vT U) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@vs2mx K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) U) (@b2mx K vT (@dimv K vT U) (@vbasis K vT U)))) (@row_free K (@dimv K vT U) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT) (@b2mx K vT (@dimv K vT U) (@vbasis K vT U)))) *) have ->: b2mx (vbasis U) = row_base (vs2mx U). (* Goal: is_true (andb (andb (@submx K (@dimv K vT U) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@row_base K (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@vs2mx K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) U)) (@vs2mx K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) U)) (@submx K (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@dimv K vT U) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@vs2mx K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) U) (@row_base K (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@vs2mx K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) U)))) (@row_free K (@dimv K vT U) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT) (@row_base K (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@vs2mx K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) U)))) *) (* Goal: @eq (matrix (GRing.Ring.sort (GRing.Field.ringType K)) (@dimv K vT U) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@b2mx K vT (@dimv K vT U) (@vbasis K vT U)) (@row_base K (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@vs2mx K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) U)) *) by apply/row_matrixP=> i; rewrite unlock rowK tnth_mktuple r2vK. (* Goal: is_true (andb (andb (@submx K (@dimv K vT U) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@row_base K (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@vs2mx K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) U)) (@vs2mx K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) U)) (@submx K (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@dimv K vT U) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@vs2mx K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) U) (@row_base K (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@vs2mx K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) U)))) (@row_free K (@dimv K vT U) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT) (@row_base K (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@vs2mx K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) U)))) *) by rewrite row_base_free !eq_row_base submx_refl. Qed. Lemma vbasis_mem v U : v \in (vbasis U) -> v \in U. Proof. (* Goal: forall _ : is_true (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v (@mem (Equality.sort (@GRing.Lmodule.eqType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT))) (tuple_predType (@dimv K vT U) (@GRing.Lmodule.eqType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT))) (@vbasis K vT U))), is_true (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) U))) *) exact: (basis_mem (vbasisP _)). Qed. Lemma coord_vbasis v U : v \in U -> v = \sum_(i < \dim U) coord (vbasis U) i v *: (vbasis U)`_i. Proof. (* Goal: forall _ : is_true (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) U))), @eq (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT))))) (Finite.sort (ordinal_finType (@dimv K vT U))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT))))) (index_enum (ordinal_finType (@dimv K vT U))) (fun i : ordinal (@dimv K vT U) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT))))) (ordinal (@dimv K vT U)) i (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT))))) true (@GRing.scale (GRing.Field.ringType K) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT) (@coord (@dimv K vT U) (@vbasis K vT U) i v) (@nth (GRing.Zmodule.sort (@GRing.Lmodule.zmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT))) (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT))) (@tval (@dimv K vT U) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@vbasis K vT U)) (@nat_of_ord (@dimv K vT U) i))))) *) exact: coord_basis (vbasisP U). Qed. Section BigSumBasis. Variables (I : finType) (P : pred I) (Xs : I -> seq vT). Lemma span_bigcat : (<<\big[cat/[::]]_(i | P i) Xs i>> = \sum_(i | P i) <<Xs i>>)%VS. Proof. (* Goal: @eq (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@span K vT (@BigOp.bigop (list (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (Finite.sort I) (@nil (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (index_enum I) (fun i : Finite.sort I => @BigBody (list (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (Finite.sort I) i (@cat (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (P i) (Xs i)))) (@BigOp.bigop (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (Finite.sort I) (@vline K vT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (index_enum I) (fun i : Finite.sort I => @BigBody (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (Finite.sort I) i (@addv K vT) (P i) (@span K vT (Xs i)))) *) by rewrite (big_morph _ span_cat span_nil). Qed. Lemma bigcat_free : directv (\sum_(i | P i) <<Xs i>>) -> (forall i, P i -> free (Xs i)) -> free (\big[cat/[::]]_(i | P i) Xs i). Proof. (* Goal: forall (_ : is_true (@directv_def (proper_addv (@nary_addv_expr (Finite.sort I) (index_enum I) P (fun i : Finite.sort I => trivial_addv (@span K vT (Xs i))))) (Phantom (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@BigOp.bigop (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (Finite.sort I) (@vline K vT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (index_enum I) (fun i : Finite.sort I => @BigBody (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (Finite.sort I) i (@addv K vT) (P i) (@span K vT (Xs i))))))) (_ : forall (i : Finite.sort I) (_ : is_true (P i)), is_true (@free K vT (Xs i))), is_true (@free K vT (@BigOp.bigop (list (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (Finite.sort I) (@nil (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (index_enum I) (fun i : Finite.sort I => @BigBody (list (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (Finite.sort I) i (@cat (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (P i) (Xs i)))) *) rewrite /free directvE /= span_bigcat => /directvP-> /= freeXs. (* Goal: is_true (@eq_op nat_eqType (@BigOp.bigop nat (Finite.sort I) O (index_enum I) (fun i : Finite.sort I => @BigBody nat (Finite.sort I) i addn (P i) (@dimv K vT (@span K vT (Xs i))))) (@size (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@BigOp.bigop (list (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (Finite.sort I) (@nil (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (index_enum I) (fun i : Finite.sort I => @BigBody (list (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (Finite.sort I) i (@cat (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (P i) (Xs i))))) *) rewrite (big_morph _ (@size_cat _) (erefl _)) /=. (* Goal: is_true (@eq_op nat_eqType (@BigOp.bigop nat (Finite.sort I) O (index_enum I) (fun i : Finite.sort I => @BigBody nat (Finite.sort I) i addn (P i) (@dimv K vT (@span K vT (Xs i))))) (@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 (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (Xs i))))) *) by apply/eqP/eq_bigr=> i /freeXs/eqP. Qed. Lemma bigcat_basis Us (U := (\sum_(i | P i) Us i)%VS) : directv U -> (forall i, P i -> basis_of (Us i) (Xs i)) -> basis_of U (\big[cat/[::]]_(i | P i) Xs i). Proof. (* Goal: forall (_ : is_true (@directv_def (proper_addv (@nary_addv_expr (Finite.sort I) (index_enum I) P (fun i : Finite.sort I => trivial_addv (Us i)))) (Phantom (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) U))) (_ : forall (i : Finite.sort I) (_ : is_true (P i)), is_true (@basis_of K vT (Us i) (Xs i))), is_true (@basis_of K vT U (@BigOp.bigop (list (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (Finite.sort I) (@nil (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (index_enum I) (fun i : Finite.sort I => @BigBody (list (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (Finite.sort I) i (@cat (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (P i) (Xs i)))) *) move=> dxU XsUs; rewrite /basis_of span_bigcat. (* Goal: is_true (andb (@eq_op (@space_eqType K vT) (@BigOp.bigop (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (Finite.sort I) (@vline K vT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (index_enum I) (fun i : Finite.sort I => @BigBody (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (Finite.sort I) i (@addv K vT) (P i) (@span K vT (Xs i)))) U) (@free K vT (@BigOp.bigop (list (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (Finite.sort I) (@nil (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (index_enum I) (fun i : Finite.sort I => @BigBody (list (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (Finite.sort I) i (@cat (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (P i) (Xs i))))) *) have defUs i: P i -> span (Xs i) = Us i by case/XsUs/andP=> /eqP. (* Goal: is_true (andb (@eq_op (@space_eqType K vT) (@BigOp.bigop (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (Finite.sort I) (@vline K vT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (index_enum I) (fun i : Finite.sort I => @BigBody (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (Finite.sort I) i (@addv K vT) (P i) (@span K vT (Xs i)))) U) (@free K vT (@BigOp.bigop (list (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (Finite.sort I) (@nil (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (index_enum I) (fun i : Finite.sort I => @BigBody (list (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (Finite.sort I) i (@cat (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (P i) (Xs i))))) *) rewrite (eq_bigr _ defUs) eqxx bigcat_free // => [|_ /XsUs/andP[]//]. (* Goal: is_true (@directv_def (proper_addv (@nary_addv_expr (Finite.sort I) (index_enum I) P (fun i : Finite.sort I => trivial_addv (@span K vT (Xs i))))) (Phantom (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@BigOp.bigop (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (Finite.sort I) (@vline K vT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (index_enum I) (fun i : Finite.sort I => @BigBody (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (Finite.sort I) i (@addv K vT) (P i) (@span K vT (Xs i)))))) *) apply/directvP; rewrite /= (eq_bigr _ defUs) (directvP dxU) /=. (* Goal: @eq nat (@BigOp.bigop nat (Finite.sort I) O (index_enum I) (fun i : Finite.sort I => @BigBody nat (Finite.sort I) i addn (P i) (@dimv K vT (Us i)))) (@BigOp.bigop nat (Finite.sort I) O (index_enum I) (fun i : Finite.sort I => @BigBody nat (Finite.sort I) i addn (P i) (@dimv K vT (@span K vT (Xs i))))) *) by apply/eq_bigr=> i /defUs->. Qed. Definition fun_of_lfun_def aT rT (f : 'Hom(aT, rT)) := r2v \o mulmxr (f2mx f) \o v2r. Definition fun_of_lfun := locked_with lfun_key fun_of_lfun_def. Canonical fun_of_lfun_unlockable := [unlockable fun fun_of_lfun]. Definition linfun_def aT rT (f : aT -> rT) := Vector.Hom (lin1_mx (v2r \o f \o r2v)). Definition linfun := locked_with lfun_key linfun_def. Canonical linfun_unlockable := [unlockable fun linfun]. Definition id_lfun vT := @linfun vT vT idfun. Definition comp_lfun aT vT rT (f : 'Hom(vT, rT)) (g : 'Hom(aT, vT)) := linfun (fun_of_lfun f \o fun_of_lfun g). End LfunDefs. Coercion fun_of_lfun : Vector.hom >-> Funclass. Notation "\1" := (@id_lfun _ _) : lfun_scope. Notation "f \o g" := (comp_lfun f g) : lfun_scope. Section LfunVspaceDefs. Variable K : fieldType. Implicit Types aT rT : vectType K. Definition inv_lfun aT rT (f : 'Hom(aT, rT)) := Vector.Hom (pinvmx (f2mx f)). Definition lker aT rT (f : 'Hom(aT, rT)) := mx2vs (kermx (f2mx f)). Definition lfun_img_def aT rT f (U : {vspace aT}) : {vspace rT} := mx2vs (vs2mx U *m f2mx f). Definition lfun_img := locked_with lfun_img_key lfun_img_def. Canonical lfun_img_unlockable := [unlockable fun lfun_img]. Definition lfun_preim aT rT (f : 'Hom(aT, rT)) W := (lfun_img (inv_lfun f) (W :&: lfun_img f fullv) + lker f)%VS. End LfunVspaceDefs. Prenex Implicits linfun lfun_img lker lfun_preim. Notation "f ^-1" := (inv_lfun f) : lfun_scope. Notation "f @: U" := (lfun_img f%VF%R U) (at level 24) : vspace_scope. Notation "f @^-1: W" := (lfun_preim f%VF%R W) (at level 24) : vspace_scope. Notation limg f := (lfun_img f fullv). Section LfunZmodType. Variables (R : ringType) (aT rT : vectType R). Implicit Types f g h : 'Hom(aT, rT). Definition lfun_eqMixin := Eval hnf in [eqMixin of 'Hom(aT, rT) by <:]. Canonical lfun_eqType := EqType 'Hom(aT, rT) lfun_eqMixin. Definition lfun_choiceMixin := [choiceMixin of 'Hom(aT, rT) by <:]. Canonical lfun_choiceType := ChoiceType 'Hom(aT, rT) lfun_choiceMixin. Fact lfun_is_linear f : linear f. Proof. (* Goal: @GRing.Linear.axiom R (@Vector.lmodType R (Phant (GRing.Ring.sort R)) aT) (@GRing.Lmodule.zmodType R (Phant (GRing.Ring.sort R)) (@Vector.lmodType R (Phant (GRing.Ring.sort R)) rT)) (@GRing.scale R (@Vector.lmodType R (Phant (GRing.Ring.sort R)) rT)) (@fun_of_lfun R aT rT f) (@GRing.Scale.scale_law R (@Vector.lmodType R (Phant (GRing.Ring.sort R)) rT)) (@Logic.eq_refl (forall (_ : GRing.Ring.sort R) (_ : GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (@Vector.lmodType R (Phant (GRing.Ring.sort R)) rT)) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (@Vector.lmodType R (Phant (GRing.Ring.sort R)) rT)) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) (@Vector.lmodType R (Phant (GRing.Ring.sort R)) rT))))), GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (@Vector.lmodType R (Phant (GRing.Ring.sort R)) rT)) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (@Vector.lmodType R (Phant (GRing.Ring.sort R)) rT)) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) (@Vector.lmodType R (Phant (GRing.Ring.sort R)) rT))))) (@GRing.scale R (@Vector.lmodType R (Phant (GRing.Ring.sort R)) rT))) *) by rewrite unlock; apply: linearP. Qed. Canonical lfun_additive f := Additive (lfun_is_linear f). Canonical lfun_linear f := AddLinear (lfun_is_linear f). Lemma lfunE (ff : {linear aT -> rT}) : linfun ff =1 ff. Proof. (* Goal: @eqfun (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (@Vector.lmodType R (Phant (GRing.Ring.sort R)) rT)) (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (@Vector.lmodType R (Phant (GRing.Ring.sort R)) aT)) (@fun_of_lfun R aT rT (@linfun R aT rT (@GRing.Linear.apply R (@Vector.lmodType R (Phant (GRing.Ring.sort R)) aT) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (@Vector.lmodType R (Phant (GRing.Ring.sort R)) rT)) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (@Vector.lmodType R (Phant (GRing.Ring.sort R)) rT)) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) (@Vector.lmodType R (Phant (GRing.Ring.sort R)) rT)))) (@GRing.scale R (@Vector.lmodType R (Phant (GRing.Ring.sort R)) rT)) (Phant (forall _ : @Vector.sort R (Phant (GRing.Ring.sort R)) aT, @Vector.sort R (Phant (GRing.Ring.sort R)) rT)) ff))) (@GRing.Linear.apply R (@Vector.lmodType R (Phant (GRing.Ring.sort R)) aT) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (@Vector.lmodType R (Phant (GRing.Ring.sort R)) rT)) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (@Vector.lmodType R (Phant (GRing.Ring.sort R)) rT)) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) (@Vector.lmodType R (Phant (GRing.Ring.sort R)) rT)))) (@GRing.scale R (@Vector.lmodType R (Phant (GRing.Ring.sort R)) rT)) (Phant (forall _ : @Vector.sort R (Phant (GRing.Ring.sort R)) aT, @Vector.sort R (Phant (GRing.Ring.sort R)) rT)) ff) *) by move=> v; rewrite 2!unlock /= mul_rV_lin1 /= !v2rK. Qed. Lemma fun_of_lfunK : cancel (@fun_of_lfun R aT rT) linfun. Proof. (* Goal: @cancel (forall _ : @GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (@Vector.lmodType R (Phant (GRing.Ring.sort R)) aT), @GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (@Vector.lmodType R (Phant (GRing.Ring.sort R)) rT)) (@Vector.hom R aT rT) (@fun_of_lfun R aT rT) (@linfun R aT rT) *) move=> f; apply/val_inj/row_matrixP=> i. (* Goal: @eq (matrix (GRing.Ring.sort R) (S O) (@Vector.dim R (Phant (GRing.Ring.sort R)) rT)) (@row (GRing.Ring.sort R) (@Vector.dim R (Phant (GRing.Ring.sort R)) aT) (@Vector.dim R (Phant (GRing.Ring.sort R)) rT) i (@val (matrix (GRing.Ring.sort R) (@Vector.dim R (Phant (GRing.Ring.sort R)) aT) (@Vector.dim R (Phant (GRing.Ring.sort R)) rT)) (fun _ : matrix (GRing.Ring.sort R) (@Vector.dim R (Phant (GRing.Ring.sort R)) aT) (@Vector.dim R (Phant (GRing.Ring.sort R)) rT) => true) (@hom_subType R aT rT) (@linfun R aT rT (@fun_of_lfun R aT rT f)))) (@row (GRing.Ring.sort R) (@Vector.dim R (Phant (GRing.Ring.sort R)) aT) (@Vector.dim R (Phant (GRing.Ring.sort R)) rT) i (@val (matrix (GRing.Ring.sort R) (@Vector.dim R (Phant (GRing.Ring.sort R)) aT) (@Vector.dim R (Phant (GRing.Ring.sort R)) rT)) (fun _ : matrix (GRing.Ring.sort R) (@Vector.dim R (Phant (GRing.Ring.sort R)) aT) (@Vector.dim R (Phant (GRing.Ring.sort R)) rT) => true) (@hom_subType R aT rT) f)) *) by rewrite 2!unlock /= !rowE mul_rV_lin1 /= !r2vK. Qed. Lemma lfunP f g : f =1 g <-> f = g. Proof. (* Goal: iff (@eqfun (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (@Vector.lmodType R (Phant (GRing.Ring.sort R)) rT)) (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (@Vector.lmodType R (Phant (GRing.Ring.sort R)) aT)) (@fun_of_lfun R aT rT f) (@fun_of_lfun R aT rT g)) (@eq (@Vector.hom R aT rT) f g) *) split=> [eq_fg | -> //]; rewrite -[f]fun_of_lfunK -[g]fun_of_lfunK unlock. (* Goal: @eq (@Vector.hom R aT rT) (@Vector.Hom R aT rT (@lin1_mx R (@Vector.dim R (Phant (GRing.Ring.sort R)) aT) (@Vector.dim R (Phant (GRing.Ring.sort R)) rT) (@funcomp (matrix (GRing.Ring.sort R) (S O) (@Vector.dim R (Phant (GRing.Ring.sort R)) rT)) (@Vector.sort R (Phant (GRing.Ring.sort R)) aT) (matrix (GRing.Ring.sort R) (S O) (@Vector.dim R (Phant (GRing.Ring.sort R)) aT)) tt (@funcomp (matrix (GRing.Ring.sort R) (S O) (@Vector.dim R (Phant (GRing.Ring.sort R)) rT)) (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (@Vector.lmodType R (Phant (GRing.Ring.sort R)) rT)) (@Vector.sort R (Phant (GRing.Ring.sort R)) aT) tt (@v2r R rT) (@fun_of_lfun R aT rT f)) (@r2v R aT)))) (@Vector.Hom R aT rT (@lin1_mx R (@Vector.dim R (Phant (GRing.Ring.sort R)) aT) (@Vector.dim R (Phant (GRing.Ring.sort R)) rT) (@funcomp (matrix (GRing.Ring.sort R) (S O) (@Vector.dim R (Phant (GRing.Ring.sort R)) rT)) (@Vector.sort R (Phant (GRing.Ring.sort R)) aT) (matrix (GRing.Ring.sort R) (S O) (@Vector.dim R (Phant (GRing.Ring.sort R)) aT)) tt (@funcomp (matrix (GRing.Ring.sort R) (S O) (@Vector.dim R (Phant (GRing.Ring.sort R)) rT)) (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (@Vector.lmodType R (Phant (GRing.Ring.sort R)) rT)) (@Vector.sort R (Phant (GRing.Ring.sort R)) aT) tt (@v2r R rT) (@fun_of_lfun R aT rT g)) (@r2v R aT)))) *) by apply/val_inj/row_matrixP=> i; rewrite !rowE !mul_rV_lin1 /= eq_fg. Qed. Definition zero_lfun : 'Hom(aT, rT) := linfun \0. Definition add_lfun f g := linfun (f \+ g). Definition opp_lfun f := linfun (-%R \o f). Fact lfun_addA : associative add_lfun. Proof. (* Goal: @associative (@Vector.hom R aT rT) add_lfun *) by move=> f g h; apply/lfunP=> v; rewrite !lfunE /= !lfunE addrA. Qed. Fact lfun_addC : commutative add_lfun. Proof. (* Goal: @commutative (@Vector.hom R aT rT) (@Vector.hom R aT rT) add_lfun *) by move=> f g; apply/lfunP=> v; rewrite !lfunE /= addrC. Qed. Fact lfun_add0 : left_id zero_lfun add_lfun. Proof. (* Goal: @left_id (@Vector.hom R aT rT) (@Vector.hom R aT rT) zero_lfun add_lfun *) by move=> f; apply/lfunP=> v; rewrite lfunE /= lfunE add0r. Qed. Lemma lfun_addN : left_inverse zero_lfun opp_lfun add_lfun. Proof. (* Goal: @left_inverse (@Vector.hom R aT rT) (@Vector.hom R aT rT) (@Vector.hom R aT rT) zero_lfun opp_lfun add_lfun *) by move=> f; apply/lfunP=> v; rewrite !lfunE /= lfunE addNr. Qed. Definition lfun_zmodMixin := ZmodMixin lfun_addA lfun_addC lfun_add0 lfun_addN. Lemma add_lfunE f g x : (f + g) x = f x + g x. Proof. exact: lfunE. Qed. Proof. (* Goal: @eq (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (@Vector.lmodType R (Phant (GRing.Ring.sort R)) rT)) (@fun_of_lfun R aT rT (@GRing.add lfun_zmodType f g) x) (@GRing.add (@GRing.Lmodule.zmodType R (Phant (GRing.Ring.sort R)) (@Vector.lmodType R (Phant (GRing.Ring.sort R)) rT)) (@fun_of_lfun R aT rT f x) (@fun_of_lfun R aT rT g x)) *) exact: lfunE. Qed. Lemma sum_lfunE I (r : seq I) (P : pred I) (fs : I -> 'Hom(aT, rT)) x : (\sum_(i <- r | P i) fs i) x = \sum_(i <- r | P i) fs i x. Proof. (* Goal: @eq (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (@Vector.lmodType R (Phant (GRing.Ring.sort R)) rT)) (@fun_of_lfun R aT rT (@BigOp.bigop (GRing.Zmodule.sort lfun_zmodType) I (GRing.zero lfun_zmodType) r (fun i : I => @BigBody (GRing.Zmodule.sort lfun_zmodType) I i (@GRing.add lfun_zmodType) (P i) (fs i))) x) (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Lmodule.zmodType R (Phant (GRing.Ring.sort R)) (@Vector.lmodType R (Phant (GRing.Ring.sort R)) rT))) I (GRing.zero (@GRing.Lmodule.zmodType R (Phant (GRing.Ring.sort R)) (@Vector.lmodType R (Phant (GRing.Ring.sort R)) rT))) r (fun i : I => @BigBody (GRing.Zmodule.sort (@GRing.Lmodule.zmodType R (Phant (GRing.Ring.sort R)) (@Vector.lmodType R (Phant (GRing.Ring.sort R)) rT))) I i (@GRing.add (@GRing.Lmodule.zmodType R (Phant (GRing.Ring.sort R)) (@Vector.lmodType R (Phant (GRing.Ring.sort R)) rT))) (P i) (@fun_of_lfun R aT rT (fs i) x))) *) by elim/big_rec2: _ => [|i _ f _ <-]; rewrite lfunE. Qed. End LfunZmodType. Arguments fun_of_lfunK {R aT rT}. Section LfunVectType. Variables (R : comRingType) (aT rT : vectType R). Implicit Types f : 'Hom(aT, rT). Definition scale_lfun k f := linfun (k \*: f). Local Infix "*:l" := scale_lfun (at level 40). Fact lfun_scaleA k1 k2 f : k1 *:l (k2 *:l f) = (k1 * k2) *:l f. Proof. (* Goal: @eq (@Vector.hom (GRing.ComRing.ringType R) aT rT) (scale_lfun k1 (scale_lfun k2 f)) (scale_lfun (@GRing.mul (GRing.ComRing.ringType R) k1 k2) f) *) by apply/lfunP=> v; rewrite !lfunE /= lfunE scalerA. Qed. Fact lfun_scale1 f : 1 *:l f = f. Proof. (* Goal: @eq (@Vector.hom (GRing.ComRing.ringType R) aT rT) (scale_lfun (GRing.one (GRing.ComRing.ringType R)) f) f *) by apply/lfunP=> v; rewrite lfunE /= scale1r. Qed. Fact lfun_scaleDr k f1 f2 : k *:l (f1 + f2) = k *:l f1 + k *:l f2. Proof. (* Goal: @eq (@Vector.hom (GRing.ComRing.ringType R) aT rT) (scale_lfun k (@GRing.add (@lfun_zmodType (GRing.ComRing.ringType R) aT rT) f1 f2)) (@GRing.add (@lfun_zmodType (GRing.ComRing.ringType R) aT rT) (scale_lfun k f1) (scale_lfun k f2)) *) by apply/lfunP=> v; rewrite !lfunE /= !lfunE scalerDr. Qed. Fact lfun_scaleDl f k1 k2 : (k1 + k2) *:l f = k1 *:l f + k2 *:l f. Proof. (* Goal: @eq (@Vector.hom (GRing.ComRing.ringType R) aT rT) (scale_lfun (@GRing.add (GRing.Ring.zmodType (GRing.ComRing.ringType R)) k1 k2) f) (@GRing.add (@lfun_zmodType (GRing.ComRing.ringType R) aT rT) (scale_lfun k1 f) (scale_lfun k2 f)) *) by apply/lfunP=> v; rewrite !lfunE /= !lfunE scalerDl. Qed. Definition lfun_lmodMixin := LmodMixin lfun_scaleA lfun_scale1 lfun_scaleDr lfun_scaleDl. Fact lfun_vect_iso : Vector.axiom (Vector.dim aT * Vector.dim rT) 'Hom(aT, rT). Proof. (* Goal: @Vector.axiom_def (GRing.ComRing.ringType R) (muln (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.ComRing.sort R)) aT) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.ComRing.sort R)) rT)) lfun_lmodType (Phant (@Vector.hom (GRing.ComRing.ringType R) aT rT)) *) exists (mxvec \o f2mx) => [a f g|]. (* Goal: @bijective (matrix (GRing.Ring.sort (GRing.ComRing.ringType R)) (S O) (muln (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.ComRing.sort R)) aT) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.ComRing.sort R)) rT))) (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) lfun_lmodType) (@funcomp (matrix (GRing.Ring.sort (GRing.ComRing.ringType R)) (S O) (muln (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) aT) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) rT))) (matrix (GRing.Ring.sort (GRing.ComRing.ringType R)) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) aT) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) rT)) (@Vector.hom (GRing.ComRing.ringType R) aT rT) tt (@mxvec (GRing.Ring.sort (GRing.ComRing.ringType R)) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) aT) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) rT)) (@f2mx (GRing.ComRing.ringType R) aT rT)) *) (* Goal: @eq (GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.ComRing.ringType R)) (S O) (muln (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.ComRing.sort R)) aT) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.ComRing.sort R)) rT)))) (@funcomp (matrix (GRing.Ring.sort (GRing.ComRing.ringType R)) (S O) (muln (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) aT) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) rT))) (matrix (GRing.Ring.sort (GRing.ComRing.ringType R)) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) aT) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) rT)) (@Vector.hom (GRing.ComRing.ringType R) aT rT) tt (@mxvec (GRing.Ring.sort (GRing.ComRing.ringType R)) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) aT) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) rT)) (@f2mx (GRing.ComRing.ringType R) aT rT) (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) lfun_lmodType) (@GRing.Lmodule.base (GRing.ComRing.ringType R) (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) lfun_lmodType) (@GRing.Lmodule.class (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) lfun_lmodType))) (@GRing.scale (GRing.ComRing.ringType R) lfun_lmodType a f) g)) (@GRing.add (matrix_zmodType (GRing.Ring.zmodType (GRing.ComRing.ringType R)) (S O) (muln (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.ComRing.sort R)) aT) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.ComRing.sort R)) rT))) (@GRing.scale (GRing.ComRing.ringType R) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (muln (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.ComRing.sort R)) aT) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.ComRing.sort R)) rT))) a (@funcomp (matrix (GRing.Ring.sort (GRing.ComRing.ringType R)) (S O) (muln (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) aT) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) rT))) (matrix (GRing.Ring.sort (GRing.ComRing.ringType R)) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) aT) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) rT)) (@Vector.hom (GRing.ComRing.ringType R) aT rT) tt (@mxvec (GRing.Ring.sort (GRing.ComRing.ringType R)) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) aT) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) rT)) (@f2mx (GRing.ComRing.ringType R) aT rT) f)) (@funcomp (matrix (GRing.Ring.sort (GRing.ComRing.ringType R)) (S O) (muln (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) aT) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) rT))) (matrix (GRing.Ring.sort (GRing.ComRing.ringType R)) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) aT) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) rT)) (@Vector.hom (GRing.ComRing.ringType R) aT rT) tt (@mxvec (GRing.Ring.sort (GRing.ComRing.ringType R)) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) aT) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) rT)) (@f2mx (GRing.ComRing.ringType R) aT rT) g)) *) rewrite /= -linearP /= -[A in _ = mxvec A]/(f2mx (Vector.Hom _)). (* Goal: @bijective (matrix (GRing.Ring.sort (GRing.ComRing.ringType R)) (S O) (muln (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.ComRing.sort R)) aT) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.ComRing.sort R)) rT))) (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) lfun_lmodType) (@funcomp (matrix (GRing.Ring.sort (GRing.ComRing.ringType R)) (S O) (muln (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) aT) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) rT))) (matrix (GRing.Ring.sort (GRing.ComRing.ringType R)) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) aT) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) rT)) (@Vector.hom (GRing.ComRing.ringType R) aT rT) tt (@mxvec (GRing.Ring.sort (GRing.ComRing.ringType R)) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) aT) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) rT)) (@f2mx (GRing.ComRing.ringType R) aT rT)) *) (* Goal: @eq (matrix (GRing.ComRing.sort R) (S O) (muln (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.ComRing.sort R)) aT) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.ComRing.sort R)) rT))) (@mxvec (GRing.ComRing.sort R) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.ComRing.sort R)) aT) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.ComRing.sort R)) rT) (@f2mx (GRing.ComRing.ringType R) aT rT (@GRing.add (@GRing.Zmodule.Pack (@Vector.hom (GRing.ComRing.ringType R) aT rT) (@GRing.Zmodule.Class (@Vector.hom (GRing.ComRing.ringType R) aT rT) (@Choice.Class (@Vector.hom (GRing.ComRing.ringType R) aT rT) (@lfun_eqMixin (GRing.ComRing.ringType R) aT rT) (@lfun_choiceMixin (GRing.ComRing.ringType R) aT rT)) (@lfun_zmodMixin (GRing.ComRing.ringType R) aT rT))) (@GRing.scale (GRing.ComRing.ringType R) lfun_lmodType a f) g))) (@mxvec (GRing.ComRing.sort R) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.ComRing.sort R)) aT) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.ComRing.sort R)) rT) (@f2mx (GRing.ComRing.ringType R) aT rT (@Vector.Hom (GRing.ComRing.ringType R) aT rT (@GRing.add (@GRing.Zmodule.Pack (matrix (GRing.ComRing.sort R) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.ComRing.sort R)) aT) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.ComRing.sort R)) rT)) (@GRing.Zmodule.Class (matrix (GRing.ComRing.sort R) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.ComRing.sort R)) aT) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.ComRing.sort R)) rT)) (@Choice.Class (matrix (GRing.ComRing.sort R) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.ComRing.sort R)) aT) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.ComRing.sort R)) rT)) (matrix_eqMixin (Choice.eqType (GRing.Zmodule.choiceType (GRing.Ring.zmodType (GRing.ComRing.ringType R)))) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.ComRing.sort R)) aT) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.ComRing.sort R)) rT)) (matrix_choiceMixin (GRing.Zmodule.choiceType (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.ComRing.sort R)) aT) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.ComRing.sort R)) rT))) (matrix_zmodMixin (GRing.Ring.zmodType (GRing.ComRing.ringType R)) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.ComRing.sort R)) aT) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.ComRing.sort R)) rT)))) (@GRing.scale (GRing.ComRing.ringType R) (matrix_lmodType (GRing.ComRing.ringType R) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.ComRing.sort R)) aT) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.ComRing.sort R)) rT)) a (@f2mx (GRing.ComRing.ringType R) aT rT f)) (@f2mx (GRing.ComRing.ringType R) aT rT g))))) *) congr (mxvec (f2mx _)); apply/lfunP=> v; do 2!rewrite lfunE /=. (* Goal: @bijective (matrix (GRing.Ring.sort (GRing.ComRing.ringType R)) (S O) (muln (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.ComRing.sort R)) aT) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.ComRing.sort R)) rT))) (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) lfun_lmodType) (@funcomp (matrix (GRing.Ring.sort (GRing.ComRing.ringType R)) (S O) (muln (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) aT) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) rT))) (matrix (GRing.Ring.sort (GRing.ComRing.ringType R)) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) aT) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) rT)) (@Vector.hom (GRing.ComRing.ringType R) aT rT) tt (@mxvec (GRing.Ring.sort (GRing.ComRing.ringType R)) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) aT) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) rT)) (@f2mx (GRing.ComRing.ringType R) aT rT)) *) (* Goal: @eq (@Vector.sort (GRing.ComRing.ringType R) (Phant (GRing.ComRing.sort R)) rT) (@GRing.add (@GRing.Zmodule.Pack (@Vector.sort (GRing.ComRing.ringType R) (Phant (GRing.ComRing.sort R)) rT) (@GRing.Lmodule.base (GRing.ComRing.ringType R) (@Vector.sort (GRing.ComRing.ringType R) (Phant (GRing.ComRing.sort R)) rT) (@Vector.base (GRing.ComRing.ringType R) (let '@Vector.Pack _ _ T c := rT in T) (@Vector.class (GRing.ComRing.ringType R) (Phant (GRing.ComRing.sort R)) rT)))) (@GRing.scale (GRing.ComRing.ringType R) (@Vector.lmodType (GRing.ComRing.ringType R) (Phant (GRing.ComRing.sort R)) rT) a (@fun_of_lfun (GRing.ComRing.ringType R) aT rT f v)) (@fun_of_lfun (GRing.ComRing.ringType R) aT rT g v)) (@fun_of_lfun (GRing.ComRing.ringType R) aT rT (@Vector.Hom (GRing.ComRing.ringType R) aT rT (@GRing.add (@GRing.Zmodule.Pack (matrix (GRing.ComRing.sort R) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.ComRing.sort R)) aT) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.ComRing.sort R)) rT)) (@GRing.Zmodule.Class (matrix (GRing.ComRing.sort R) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.ComRing.sort R)) aT) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.ComRing.sort R)) rT)) (@Choice.Class (matrix (GRing.ComRing.sort R) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.ComRing.sort R)) aT) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.ComRing.sort R)) rT)) (matrix_eqMixin (Choice.eqType (GRing.Zmodule.choiceType (GRing.Ring.zmodType (GRing.ComRing.ringType R)))) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.ComRing.sort R)) aT) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.ComRing.sort R)) rT)) (matrix_choiceMixin (GRing.Zmodule.choiceType (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.ComRing.sort R)) aT) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.ComRing.sort R)) rT))) (matrix_zmodMixin (GRing.Ring.zmodType (GRing.ComRing.ringType R)) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.ComRing.sort R)) aT) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.ComRing.sort R)) rT)))) (@GRing.scale (GRing.ComRing.ringType R) (matrix_lmodType (GRing.ComRing.ringType R) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.ComRing.sort R)) aT) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.ComRing.sort R)) rT)) a (@f2mx (GRing.ComRing.ringType R) aT rT f)) (@f2mx (GRing.ComRing.ringType R) aT rT g))) v) *) by rewrite unlock /= -linearP mulmxDr scalemxAr. (* Goal: @bijective (matrix (GRing.Ring.sort (GRing.ComRing.ringType R)) (S O) (muln (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.ComRing.sort R)) aT) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.ComRing.sort R)) rT))) (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) lfun_lmodType) (@funcomp (matrix (GRing.Ring.sort (GRing.ComRing.ringType R)) (S O) (muln (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) aT) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) rT))) (matrix (GRing.Ring.sort (GRing.ComRing.ringType R)) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) aT) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) rT)) (@Vector.hom (GRing.ComRing.ringType R) aT rT) tt (@mxvec (GRing.Ring.sort (GRing.ComRing.ringType R)) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) aT) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) rT)) (@f2mx (GRing.ComRing.ringType R) aT rT)) *) apply: Bijective (Vector.Hom \o vec_mx) _ _ => [[A]|A] /=; last exact: vec_mxK. (* Goal: @eq (@Vector.hom (GRing.ComRing.ringType R) aT rT) (@Vector.Hom (GRing.ComRing.ringType R) aT rT (@vec_mx (GRing.ComRing.sort R) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.ComRing.sort R)) aT) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.ComRing.sort R)) rT) (@mxvec (GRing.ComRing.sort R) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.ComRing.sort R)) aT) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.ComRing.sort R)) rT) A))) (@Vector.Hom (GRing.ComRing.ringType R) aT rT A) *) by rewrite mxvecK. Qed. Definition lfun_vectMixin := VectMixin lfun_vect_iso. Canonical lfun_vectType := VectType R 'Hom(aT, rT) lfun_vectMixin. End LfunVectType. Section CompLfun. Variables (R : ringType) (wT aT vT rT : vectType R). Implicit Types (f : 'Hom(vT, rT)) (g : 'Hom(aT, vT)) (h : 'Hom(wT, aT)). Lemma id_lfunE u: \1%VF u = u :> aT. Proof. exact: lfunE. Qed. Proof. (* Goal: @eq (@Vector.sort R (Phant (GRing.Ring.sort R)) aT) (@fun_of_lfun R aT aT (@id_lfun R aT) u) u *) exact: lfunE. Qed. Lemma comp_lfunA f g h : (f \o (g \o h) = (f \o g) \o h)%VF. Proof. (* Goal: @eq (@Vector.hom R wT rT) (@comp_lfun R wT vT rT f (@comp_lfun R wT aT vT g h)) (@comp_lfun R wT aT rT (@comp_lfun R aT vT rT f g) h) *) by apply/lfunP=> u; do !rewrite lfunE /=. Qed. Lemma comp_lfun1l f : (\1 \o f)%VF = f. Proof. (* Goal: @eq (@Vector.hom R vT rT) (@comp_lfun R vT rT rT (@id_lfun R rT) f) f *) by apply/lfunP=> u; do !rewrite lfunE /=. Qed. Lemma comp_lfun1r f : (f \o \1)%VF = f. Proof. (* Goal: @eq (@Vector.hom R vT rT) (@comp_lfun R vT vT rT f (@id_lfun R vT)) f *) by apply/lfunP=> u; do !rewrite lfunE /=. Qed. Lemma comp_lfun0l g : (0 \o g)%VF = 0 :> 'Hom(aT, rT). Proof. (* Goal: @eq (@Vector.hom R aT rT) (@comp_lfun R aT vT rT (GRing.zero (@lfun_zmodType R vT rT)) g) (GRing.zero (@lfun_zmodType R aT rT)) *) by apply/lfunP=> u; do !rewrite lfunE /=. Qed. Lemma comp_lfun0r f : (f \o 0)%VF = 0 :> 'Hom(aT, rT). Proof. (* Goal: @eq (@Vector.hom R aT rT) (@comp_lfun R aT vT rT f (GRing.zero (@lfun_zmodType R aT vT))) (GRing.zero (@lfun_zmodType R aT rT)) *) by apply/lfunP=> u; do !rewrite lfunE /=; rewrite linear0. Qed. Lemma comp_lfunDl f1 f2 g : ((f1 + f2) \o g = (f1 \o g) + (f2 \o g))%VF. Proof. (* Goal: @eq (@Vector.hom R aT rT) (@comp_lfun R aT vT rT (@GRing.add (@lfun_zmodType R vT rT) f1 f2) g) (@GRing.add (@lfun_zmodType R aT rT) (@comp_lfun R aT vT rT f1 g) (@comp_lfun R aT vT rT f2 g)) *) by apply/lfunP=> u; do !rewrite lfunE /=. Qed. Lemma comp_lfunDr f g1 g2 : (f \o (g1 + g2) = (f \o g1) + (f \o g2))%VF. Proof. (* Goal: @eq (@Vector.hom R aT rT) (@comp_lfun R aT vT rT f (@GRing.add (@lfun_zmodType R aT vT) g1 g2)) (@GRing.add (@lfun_zmodType R aT rT) (@comp_lfun R aT vT rT f g1) (@comp_lfun R aT vT rT f g2)) *) by apply/lfunP=> u; do !rewrite lfunE /=; rewrite linearD. Qed. Lemma comp_lfunNl f g : ((- f) \o g = - (f \o g))%VF. Proof. (* Goal: @eq (@Vector.hom R aT rT) (@comp_lfun R aT vT rT (@GRing.opp (@lfun_zmodType R vT rT) f) g) (@GRing.opp (@lfun_zmodType R aT rT) (@comp_lfun R aT vT rT f g)) *) by apply/lfunP=> u; do !rewrite lfunE /=. Qed. Lemma comp_lfunNr f g : (f \o (- g) = - (f \o g))%VF. Proof. (* Goal: @eq (@Vector.hom R aT rT) (@comp_lfun R aT vT rT f (@GRing.opp (@lfun_zmodType R aT vT) g)) (@GRing.opp (@lfun_zmodType R aT rT) (@comp_lfun R aT vT rT f g)) *) by apply/lfunP=> u; do !rewrite lfunE /=; rewrite linearN. Qed. End CompLfun. Definition lfun_simp := (comp_lfunE, scale_lfunE, opp_lfunE, add_lfunE, sum_lfunE, lfunE). Section ScaleCompLfun. Variables (R : comRingType) (aT vT rT : vectType R). Implicit Types (f : 'Hom(vT, rT)) (g : 'Hom(aT, vT)). Lemma comp_lfunZl k f g : (k *: (f \o g) = (k *: f) \o g)%VF. Proof. (* Goal: @eq (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (@lfun_lmodType R aT rT)) (@GRing.Lmodule.base (GRing.ComRing.ringType R) (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (@lfun_lmodType R aT rT)) (@GRing.Lmodule.class (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (@lfun_lmodType R aT rT))))) (@GRing.scale (GRing.ComRing.ringType R) (@lfun_lmodType R aT rT) k (@comp_lfun (GRing.ComRing.ringType R) aT vT rT f g)) (@comp_lfun (GRing.ComRing.ringType R) aT vT rT (@GRing.scale (GRing.ComRing.ringType R) (@lfun_lmodType R vT rT) k f) g) *) by apply/lfunP=> u; do !rewrite lfunE /=. Qed. Lemma comp_lfunZr k f g : (k *: (f \o g) = f \o (k *: g))%VF. Proof. (* Goal: @eq (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (@lfun_lmodType R aT rT)) (@GRing.Lmodule.base (GRing.ComRing.ringType R) (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (@lfun_lmodType R aT rT)) (@GRing.Lmodule.class (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (@lfun_lmodType R aT rT))))) (@GRing.scale (GRing.ComRing.ringType R) (@lfun_lmodType R aT rT) k (@comp_lfun (GRing.ComRing.ringType R) aT vT rT f g)) (@comp_lfun (GRing.ComRing.ringType R) aT vT rT f (@GRing.scale (GRing.ComRing.ringType R) (@lfun_lmodType R aT vT) k g)) *) by apply/lfunP=> u; do !rewrite lfunE /=; rewrite linearZ. Qed. End ScaleCompLfun. Section LinearImage. Variables (K : fieldType) (aT rT : vectType K). Implicit Types (f g : 'Hom(aT, rT)) (U V : {vspace aT}) (W : {vspace rT}). Lemma limgS f U V : (U <= V)%VS -> (f @: U <= f @: V)%VS. Proof. (* Goal: forall _ : is_true (@subsetv K aT U V), is_true (@subsetv K rT (@lfun_img K aT rT f U) (@lfun_img K aT rT f V)) *) by rewrite unlock /subsetv !genmxE; apply: submxMr. Qed. Lemma limg_line f v : (f @: <[v]> = <[f v]>)%VS. Proof. (* Goal: @eq (@Vector.space K rT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT))) (@lfun_img K aT rT f (@vline K aT v)) (@vline K rT (@fun_of_lfun (GRing.Field.ringType K) aT rT f v)) *) apply/eqP; rewrite 2!unlock eqEsubv /subsetv /= r2vK !genmxE. (* Goal: is_true (andb (@submx K (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (S O) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@mulmx (GRing.Field.ringType K) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@genmx K (S O) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@v2r (GRing.Field.ringType K) aT v)) (@f2mx (GRing.Field.ringType K) aT rT f)) (@mulmx (GRing.Field.ringType K) (S O) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@v2r (GRing.Field.ringType K) aT v) (@f2mx (GRing.Field.ringType K) aT rT f))) (@submx K (S O) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@mulmx (GRing.Field.ringType K) (S O) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@v2r (GRing.Field.ringType K) aT v) (@f2mx (GRing.Field.ringType K) aT rT f)) (@mulmx (GRing.Field.ringType K) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@genmx K (S O) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@v2r (GRing.Field.ringType K) aT v)) (@f2mx (GRing.Field.ringType K) aT rT f)))) *) by rewrite !(eqmxMr _ (genmxE _)) submx_refl. Qed. Lemma memv_img f v U : v \in U -> f v \in (f @: U)%VS. Proof. (* Goal: forall _ : is_true (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) v (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@pred_of_vspace K aT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) U))), is_true (@in_mem (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT)) (@fun_of_lfun (GRing.Field.ringType K) aT rT f v) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT)) (@pred_of_vspace K rT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT)) (@lfun_img K aT rT f U)))) *) by move=> Uv; rewrite memvE -limg_line limgS. Qed. Lemma memv_imgP f w U : reflect (exists2 u, u \in U & w = f u) (w \in f @: U)%VS. Lemma lim0g U : (0 @: U = 0 :> {vspace rT})%VS. Proof. (* Goal: @eq (@Vector.space K rT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT))) (@lfun_img K aT rT (GRing.zero (@lfun_zmodType (GRing.Field.ringType K) aT rT)) U) (@vline K rT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT))) *) apply/eqP; rewrite -subv0; apply/subvP=> _ /memv_imgP[u _ ->]. (* Goal: is_true (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@fun_of_lfun (GRing.Field.ringType K) aT rT (GRing.zero (@lfun_zmodType (GRing.Field.ringType K) aT rT)) u) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT)) (@pred_of_vspace K rT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT)) (@vline K rT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT)))))) *) by rewrite lfunE rpred0. Qed. Lemma eq_in_limg V f g : {in V, f =1 g} -> (f @: V = g @: V)%VS. Proof. (* Goal: forall _ : @prop_in1 (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@pred_of_vspace K aT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) V)) (fun x : @GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT) => @eq (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT)) (@fun_of_lfun (GRing.Field.ringType K) aT rT f x) (@fun_of_lfun (GRing.Field.ringType K) aT rT g x)) (inPhantom (@eqfun (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT)) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT)) (@fun_of_lfun (GRing.Field.ringType K) aT rT f) (@fun_of_lfun (GRing.Field.ringType K) aT rT g))), @eq (@Vector.space K rT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT))) (@lfun_img K aT rT f V) (@lfun_img K aT rT g V) *) move=> eq_fg; apply/vspaceP=> y. (* Goal: @eq bool (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) y (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT)) (@pred_of_vspace K rT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT)) (@lfun_img K aT rT f V)))) (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) y (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT)) (@pred_of_vspace K rT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT)) (@lfun_img K aT rT g V)))) *) by apply/memv_imgP/memv_imgP=> [][x Vx ->]; exists x; rewrite ?eq_fg. Qed. Lemma limg_add f : {morph lfun_img f : U V / U + V}%VS. Proof. (* Goal: @morphism_2 (@Vector.space K aT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@Vector.space K rT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT))) (@lfun_img K aT rT f) (fun U V : @Vector.space K aT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) => @addv K aT U V) (fun U V : @Vector.space K rT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT)) => @addv K rT U V) *) move=> U V; apply/eqP; rewrite unlock eqEsubv /subsetv /= -genmx_adds. (* Goal: is_true (andb (@submx K (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@genmx K (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@mulmx (GRing.Field.ringType K) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@genmx K (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@addsmx K (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@vs2mx K aT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) U) (@vs2mx K aT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) V))) (@f2mx (GRing.Field.ringType K) aT rT f))) (@genmx K (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@genmx K (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@addsmx K (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@mulmx (GRing.Field.ringType K) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@vs2mx K aT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) U) (@f2mx (GRing.Field.ringType K) aT rT f)) (@mulmx (GRing.Field.ringType K) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@vs2mx K aT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) V) (@f2mx (GRing.Field.ringType K) aT rT f)))))) (@submx K (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@genmx K (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@genmx K (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@addsmx K (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@mulmx (GRing.Field.ringType K) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@vs2mx K aT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) U) (@f2mx (GRing.Field.ringType K) aT rT f)) (@mulmx (GRing.Field.ringType K) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@vs2mx K aT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) V) (@f2mx (GRing.Field.ringType K) aT rT f))))) (@genmx K (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@mulmx (GRing.Field.ringType K) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@genmx K (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@addsmx K (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@vs2mx K aT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) U) (@vs2mx K aT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) V))) (@f2mx (GRing.Field.ringType K) aT rT f))))) *) by rewrite !genmxE !(eqmxMr _ (genmxE _)) !addsmxMr submx_refl. Qed. Lemma limg_sum f I r (P : pred I) Us : (f @: (\sum_(i <- r | P i) Us i) = \sum_(i <- r | P i) f @: Us i)%VS. Proof. (* Goal: @eq (@Vector.space K rT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT))) (@lfun_img K aT rT f (@BigOp.bigop (@Vector.space K aT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) I (@vline K aT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) r (fun i : I => @BigBody (@Vector.space K aT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) I i (@addv K aT) (P i) (Us i)))) (@BigOp.bigop (@Vector.space K rT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT))) I (@vline K rT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT))) r (fun i : I => @BigBody (@Vector.space K rT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT))) I i (@addv K rT) (P i) (@lfun_img K aT rT f (Us i)))) *) exact: (big_morph _ (limg_add f) (limg0 f)). Qed. Lemma limg_cap f U V : (f @: (U :&: V) <= f @: U :&: f @: V)%VS. Proof. (* Goal: is_true (@subsetv K rT (@lfun_img K aT rT f (@capv K aT U V)) (@capv K rT (@lfun_img K aT rT f U) (@lfun_img K aT rT f V))) *) by rewrite subv_cap !limgS ?capvSl ?capvSr. Qed. Lemma limg_bigcap f I r (P : pred I) Us : (f @: (\bigcap_(i <- r | P i) Us i) <= \bigcap_(i <- r | P i) f @: Us i)%VS. Proof. (* Goal: is_true (@subsetv K rT (@lfun_img K aT rT f (@BigOp.bigop (@Vector.space K aT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) I (@fullv K aT) r (fun i : I => @BigBody (@Vector.space K aT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) I i (@capv K aT) (P i) (Us i)))) (@BigOp.bigop (@Vector.space K rT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT))) I (@fullv K rT) r (fun i : I => @BigBody (@Vector.space K rT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT))) I i (@capv K rT) (P i) (@lfun_img K aT rT f (Us i))))) *) elim/big_rec2: _ => [|i V U _ sUV]; first exact: subvf. (* Goal: is_true (@subsetv K rT (@lfun_img K aT rT f (@capv K aT (Us i) U)) (@capv K rT (@lfun_img K aT rT f (Us i)) V)) *) by rewrite (subv_trans (limg_cap f _ U)) ?capvS. Qed. Lemma limg_span f X : (f @: <<X>> = <<map f X>>)%VS. Proof. (* Goal: @eq (@Vector.space K rT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT))) (@lfun_img K aT rT f (@span K aT X)) (@span K rT (@map (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT)) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT)) (@fun_of_lfun (GRing.Field.ringType K) aT rT f) X)) *) by rewrite !span_def big_map limg_sum; apply: eq_bigr => x _; rewrite limg_line. Qed. Lemma lfunPn f g : reflect (exists u, f u != g u) (f != g). Lemma inv_lfun_def f : (f \o f^-1 \o f)%VF = f. Proof. (* Goal: @eq (@Vector.hom (GRing.Field.ringType K) aT rT) (@comp_lfun (GRing.Field.ringType K) aT rT rT (@comp_lfun (GRing.Field.ringType K) rT aT rT f (@inv_lfun K aT rT f)) f) f *) apply/lfunP=> u; do !rewrite lfunE /=; rewrite unlock /= !r2vK. (* Goal: @eq (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@r2v (GRing.Field.ringType K) rT (@mulmx (GRing.Field.ringType K) (S O) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@mulmx (GRing.Field.ringType K) (S O) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@mulmx (GRing.Field.ringType K) (S O) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@v2r (GRing.Field.ringType K) aT u) (@f2mx (GRing.Field.ringType K) aT rT f)) (@pinvmx K (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@f2mx (GRing.Field.ringType K) aT rT f))) (@f2mx (GRing.Field.ringType K) aT rT f))) (@r2v (GRing.Field.ringType K) rT (@mulmx (GRing.Field.ringType K) (S O) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@v2r (GRing.Field.ringType K) aT u) (@f2mx (GRing.Field.ringType K) aT rT f))) *) by rewrite mulmxKpV ?submxMl. Qed. Lemma limg_lfunVK f : {in limg f, cancel f^-1%VF f}. Proof. (* Goal: @prop_in1 (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT)) (@pred_of_vspace K rT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT)) (@lfun_img K aT rT f (@fullv K aT)))) (fun x : @GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) => @eq (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT)) (@fun_of_lfun (GRing.Field.ringType K) aT rT f (@fun_of_lfun (GRing.Field.ringType K) rT aT (@inv_lfun K aT rT f) x)) x) (inPhantom (@cancel (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT)) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT)) (@fun_of_lfun (GRing.Field.ringType K) rT aT (@inv_lfun K aT rT f)) (@fun_of_lfun (GRing.Field.ringType K) aT rT f))) *) by move=> _ /memv_imgP[u _ ->]; rewrite -!comp_lfunE inv_lfun_def. Qed. Lemma lkerE f U : (U <= lker f)%VS = (f @: U == 0)%VS. Proof. (* Goal: @eq bool (@subsetv K aT U (@lker K aT rT f)) (@eq_op (@space_eqType K rT) (@lfun_img K aT rT f U) (@vline K rT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT)))) *) rewrite unlock -dimv_eq0 /dimv /subsetv !genmxE mxrank_eq0. (* Goal: @eq bool (@submx K (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@vs2mx K aT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) U) (@kermx K (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@f2mx (GRing.Field.ringType K) aT rT f))) (@eq_op (matrix_eqType (GRing.Field.eqType K) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT)) (@mulmx (GRing.Field.ringType K) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@vs2mx K aT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) U) (@f2mx (GRing.Field.ringType K) aT rT f)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType K) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT)))) *) by rewrite (sameP sub_kermxP eqP). Qed. Lemma memv_ker f v : (v \in lker f) = (f v == 0). Proof. (* Goal: @eq bool (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) v (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@pred_of_vspace K aT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@lker K aT rT f)))) (@eq_op (@GRing.Lmodule.eqType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT)) (@fun_of_lfun (GRing.Field.ringType K) aT rT f v) (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT)))) *) by rewrite -memv0 !memvE subv0 lkerE limg_line. Qed. Lemma eqlfunP f g v : reflect (f v = g v) (v \in lker (f - g)). Proof. (* Goal: Bool.reflect (@eq (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT)) (@fun_of_lfun (GRing.Field.ringType K) aT rT f v) (@fun_of_lfun (GRing.Field.ringType K) aT rT g v)) (@in_mem (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT)) v (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@pred_of_vspace K aT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@lker K aT rT (@GRing.add (@lfun_zmodType (GRing.Field.ringType K) aT rT) f (@GRing.opp (@lfun_zmodType (GRing.Field.ringType K) aT rT) g)))))) *) by rewrite memv_ker !lfun_simp subr_eq0; apply: eqP. Qed. Lemma eqlfun_inP V f g : reflect {in V, f =1 g} (V <= lker (f - g))%VS. Proof. (* Goal: Bool.reflect (@prop_in1 (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@pred_of_vspace K aT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) V)) (fun x : @GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT) => @eq (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT)) (@fun_of_lfun (GRing.Field.ringType K) aT rT f x) (@fun_of_lfun (GRing.Field.ringType K) aT rT g x)) (inPhantom (@eqfun (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT)) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT)) (@fun_of_lfun (GRing.Field.ringType K) aT rT f) (@fun_of_lfun (GRing.Field.ringType K) aT rT g)))) (@subsetv K aT V (@lker K aT rT (@GRing.add (@lfun_zmodType (GRing.Field.ringType K) aT rT) f (@GRing.opp (@lfun_zmodType (GRing.Field.ringType K) aT rT) g)))) *) by apply: (iffP subvP) => E x /E/eqlfunP. Qed. Lemma limg_ker_compl f U : (f @: (U :\: lker f) = f @: U)%VS. Lemma limg_ker_dim f U : (\dim (U :&: lker f) + \dim (f @: U) = \dim U)%N. Proof. (* Goal: @eq nat (addn (@dimv K aT (@capv K aT U (@lker K aT rT f))) (@dimv K rT (@lfun_img K aT rT f U))) (@dimv K aT U) *) rewrite unlock /dimv /= genmx_cap genmx_id -genmx_cap !genmxE. (* Goal: @eq nat (addn (@mxrank K (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@capmx K (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@vs2mx K aT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) U) (@kermx K (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@f2mx (GRing.Field.ringType K) aT rT f)))) (@mxrank K (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@mulmx (GRing.Field.ringType K) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@vs2mx K aT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) U) (@f2mx (GRing.Field.ringType K) aT rT f)))) (@mxrank K (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@vs2mx K aT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) U)) *) by rewrite addnC mxrank_mul_ker. Qed. Lemma limg_dim_eq f U : (U :&: lker f = 0)%VS -> \dim (f @: U) = \dim U. Proof. (* Goal: forall _ : @eq (@Vector.space K aT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@capv K aT U (@lker K aT rT f)) (@vline K aT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))), @eq nat (@dimv K rT (@lfun_img K aT rT f U)) (@dimv K aT U) *) by rewrite -(limg_ker_dim f U) => ->; rewrite dimv0. Qed. Lemma limg_basis_of f U X : (U :&: lker f = 0)%VS -> basis_of U X -> basis_of (f @: U) (map f X). Proof. (* Goal: forall (_ : @eq (@Vector.space K aT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@capv K aT U (@lker K aT rT f)) (@vline K aT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (_ : is_true (@basis_of K aT U X)), is_true (@basis_of K rT (@lfun_img K aT rT f U) (@map (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT)) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT)) (@fun_of_lfun (GRing.Field.ringType K) aT rT f) X)) *) move=> injUf /andP[/eqP defU /eqnP freeX]. (* Goal: is_true (@basis_of K rT (@lfun_img K aT rT f U) (@map (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT)) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT)) (@fun_of_lfun (GRing.Field.ringType K) aT rT f) X)) *) by rewrite /basis_of /free size_map -limg_span -freeX defU limg_dim_eq ?eqxx. Qed. Lemma lker0P f : reflect (injective f) (lker f == 0%VS). Proof. (* Goal: Bool.reflect (@injective (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT)) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT)) (@fun_of_lfun (GRing.Field.ringType K) aT rT f)) (@eq_op (@space_eqType K aT) (@lker K aT rT f) (@vline K aT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) *) rewrite -subv0; apply: (iffP subvP) => [injf u v eq_fuv | injf u]. (* Goal: forall _ : is_true (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) u (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@pred_of_vspace K aT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@lker K aT rT f)))), is_true (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) u (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@pred_of_vspace K aT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@vline K aT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))))) *) (* Goal: @eq (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT)) u v *) apply/eqP; rewrite -subr_eq0 -memv0 injf //. (* Goal: forall _ : is_true (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) u (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@pred_of_vspace K aT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@lker K aT rT f)))), is_true (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) u (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@pred_of_vspace K aT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@vline K aT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))))) *) (* Goal: is_true (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@GRing.add (@GRing.Lmodule.zmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT)) u (@GRing.opp (@GRing.Lmodule.zmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT)) v)) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@pred_of_vspace K aT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@lker K aT rT f)))) *) by rewrite memv_ker linearB /= eq_fuv subrr. (* Goal: forall _ : is_true (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) u (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@pred_of_vspace K aT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@lker K aT rT f)))), is_true (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) u (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@pred_of_vspace K aT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@vline K aT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))))) *) by rewrite memv_ker memv0 -(inj_eq injf) linear0. Qed. Lemma limg_ker0 f U V : lker f == 0%VS -> (f @: U <= f @: V)%VS = (U <= V)%VS. Proof. (* Goal: forall _ : is_true (@eq_op (@space_eqType K aT) (@lker K aT rT f) (@vline K aT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))), @eq bool (@subsetv K rT (@lfun_img K aT rT f U) (@lfun_img K aT rT f V)) (@subsetv K aT U V) *) move/lker0P=> injf; apply/idP/idP=> [/subvP sfUV | ]; last exact: limgS. (* Goal: is_true (@subsetv K aT U V) *) by apply/subvP=> u Uu; have /memv_imgP[v Vv /injf->] := sfUV _ (memv_img f Uu). Qed. Lemma eq_limg_ker0 f U V : lker f == 0%VS -> (f @: U == f @: V)%VS = (U == V). Proof. (* Goal: forall _ : is_true (@eq_op (@space_eqType K aT) (@lker K aT rT f) (@vline K aT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))), @eq bool (@eq_op (@space_eqType K rT) (@lfun_img K aT rT f U) (@lfun_img K aT rT f V)) (@eq_op (@space_eqType K aT) U V) *) by move=> injf; rewrite !eqEsubv !limg_ker0. Qed. Lemma lker0_lfunK f : lker f == 0%VS -> cancel f f^-1%VF. Proof. (* Goal: forall _ : is_true (@eq_op (@space_eqType K aT) (@lker K aT rT f) (@vline K aT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))), @cancel (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT)) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT)) (@fun_of_lfun (GRing.Field.ringType K) aT rT f) (@fun_of_lfun (GRing.Field.ringType K) rT aT (@inv_lfun K aT rT f)) *) by move/lker0P=> injf u; apply: injf; rewrite limg_lfunVK ?memv_img ?memvf. Qed. Lemma lker0_compVf f : lker f == 0%VS -> (f^-1 \o f = \1)%VF. Proof. (* Goal: forall _ : is_true (@eq_op (@space_eqType K aT) (@lker K aT rT f) (@vline K aT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))), @eq (@Vector.hom (GRing.Field.ringType K) aT aT) (@comp_lfun (GRing.Field.ringType K) aT rT aT (@inv_lfun K aT rT f) f) (@id_lfun (GRing.Field.ringType K) aT) *) by move/lker0_lfunK=> fK; apply/lfunP=> u; rewrite !lfunE /= fK. Qed. End LinearImage. Arguments memv_imgP {K aT rT f w U}. Arguments lfunPn {K aT rT f g}. Arguments lker0P {K aT rT f}. Arguments eqlfunP {K aT rT f g v}. Arguments eqlfun_inP {K aT rT V f g}. Arguments limg_lfunVK {K aT rT f} [x] f_x. Section FixedSpace. Variables (K : fieldType) (vT : vectType K). Implicit Types (f : 'End(vT)) (U : {vspace vT}). Definition fixedSpace f : {vspace vT} := lker (f - \1%VF). Lemma fixedSpaceP f a : reflect (f a = a) (a \in fixedSpace f). Proof. (* Goal: Bool.reflect (@eq (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@fun_of_lfun (GRing.Field.ringType K) vT vT f a) a) (@in_mem (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) a (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (fixedSpace f)))) *) by rewrite memv_ker add_lfunE opp_lfunE id_lfunE subr_eq0; apply: eqP. Qed. Lemma fixedSpacesP f U : reflect {in U, f =1 id} (U <= fixedSpace f)%VS. Proof. (* Goal: Bool.reflect (@prop_in1 (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) U)) (fun x : @GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT) => @eq (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@fun_of_lfun (GRing.Field.ringType K) vT vT f x) ((fun x0 : @GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT) => x0) x)) (inPhantom (@eqfun (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@fun_of_lfun (GRing.Field.ringType K) vT vT f) (fun x : @GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT) => x)))) (@subsetv K vT U (fixedSpace f)) *) by apply: (iffP subvP) => cUf x /cUf/fixedSpaceP. Qed. Lemma fixedSpace_limg f U : (U <= fixedSpace f -> f @: U = U)%VS. Proof. (* Goal: forall _ : is_true (@subsetv K vT U (fixedSpace f)), @eq (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@lfun_img K vT vT f U) U *) move/fixedSpacesP=> cUf; apply/vspaceP=> x. (* Goal: @eq bool (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) x (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@lfun_img K vT vT f U)))) (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) x (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) U))) *) by apply/memv_imgP/idP=> [[{x} x Ux ->] | Ux]; last exists x; rewrite ?cUf. Qed. Lemma fixedSpace_id : fixedSpace \1 = {:vT}%VS. Proof. (* Goal: @eq (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (fixedSpace (@id_lfun (GRing.Field.ringType K) vT)) (@fullv K vT) *) by apply/vspaceP=> x; rewrite memvf; apply/fixedSpaceP; rewrite lfunE. Qed. End FixedSpace. Arguments fixedSpaceP {K vT f a}. Arguments fixedSpacesP {K vT f U}. Section LinAut. Variables (K : fieldType) (vT : vectType K) (f : 'End(vT)). Hypothesis kerf0 : lker f == 0%VS. Lemma lker0_limgf : limg f = fullv. Proof. (* Goal: @eq (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@lfun_img K vT vT f (@fullv K vT)) (@fullv K vT) *) by apply/eqP; rewrite eqEdim subvf limg_dim_eq //= (eqP kerf0) capv0. Qed. Lemma lker0_lfunVK : cancel f^-1%VF f. Proof. (* Goal: @cancel (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@fun_of_lfun (GRing.Field.ringType K) vT vT (@inv_lfun K vT vT f)) (@fun_of_lfun (GRing.Field.ringType K) vT vT f) *) by move=> u; rewrite limg_lfunVK // lker0_limgf memvf. Qed. Lemma lker0_compfV : (f \o f^-1 = \1)%VF. Proof. (* Goal: @eq (@Vector.hom (GRing.Field.ringType K) vT vT) (@comp_lfun (GRing.Field.ringType K) vT vT vT f (@inv_lfun K vT vT f)) (@id_lfun (GRing.Field.ringType K) vT) *) by apply/lfunP=> u; rewrite !lfunE /= lker0_lfunVK. Qed. Lemma lker0_compVKf aT g : (f \o (f^-1 \o g))%VF = g :> 'Hom(aT, vT). Proof. (* Goal: @eq (@Vector.hom (GRing.Field.ringType K) aT vT) (@comp_lfun (GRing.Field.ringType K) aT vT vT f (@comp_lfun (GRing.Field.ringType K) aT vT vT (@inv_lfun K vT vT f) g)) g *) by rewrite comp_lfunA lker0_compfV comp_lfun1l. Qed. Lemma lker0_compKf aT g : (f^-1 \o (f \o g))%VF = g :> 'Hom(aT, vT). Proof. (* Goal: @eq (@Vector.hom (GRing.Field.ringType K) aT vT) (@comp_lfun (GRing.Field.ringType K) aT vT vT (@inv_lfun K vT vT f) (@comp_lfun (GRing.Field.ringType K) aT vT vT f g)) g *) by rewrite comp_lfunA lker0_compVf ?comp_lfun1l. Qed. Lemma lker0_compfK rT h : ((h \o f) \o f^-1)%VF = h :> 'Hom(vT, rT). Proof. (* Goal: @eq (@Vector.hom (GRing.Field.ringType K) vT rT) (@comp_lfun (GRing.Field.ringType K) vT vT rT (@comp_lfun (GRing.Field.ringType K) vT vT rT h f) (@inv_lfun K vT vT f)) h *) by rewrite -comp_lfunA lker0_compfV comp_lfun1r. Qed. Lemma lker0_compfVK rT h : ((h \o f^-1) \o f)%VF = h :> 'Hom(vT, rT). Proof. (* Goal: @eq (@Vector.hom (GRing.Field.ringType K) vT rT) (@comp_lfun (GRing.Field.ringType K) vT vT rT (@comp_lfun (GRing.Field.ringType K) vT vT rT h (@inv_lfun K vT vT f)) f) h *) by rewrite -comp_lfunA lker0_compVf ?comp_lfun1r. Qed. End LinAut. Section LinearImageComp. Variables (K : fieldType) (aT vT rT : vectType K). Implicit Types (f : 'Hom(aT, vT)) (g : 'Hom(vT, rT)) (U : {vspace aT}). Lemma lim1g U : (\1 @: U)%VS = U. Proof. (* Goal: @eq (@Vector.space K aT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@lfun_img K aT aT (@id_lfun (GRing.Field.ringType K) aT) U) U *) have /andP[/eqP <- _] := vbasisP U; rewrite limg_span map_id_in // => u _. (* Goal: @eq (Equality.sort (@GRing.Lmodule.eqType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT))) (@fun_of_lfun (GRing.Field.ringType K) aT aT (@id_lfun (GRing.Field.ringType K) aT) u) u *) by rewrite lfunE. Qed. Lemma limg_comp f g U : ((g \o f) @: U = g @: (f @: U))%VS. End LinearImageComp. Section LinearPreimage. Variables (K : fieldType) (aT rT : vectType K). Implicit Types (f : 'Hom(aT, rT)) (U : {vspace aT}) (V W : {vspace rT}). Lemma lpreim_cap_limg f W : (f @^-1: (W :&: limg f))%VS = (f @^-1: W)%VS. Proof. (* Goal: @eq (@Vector.space K aT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@lfun_preim K aT rT f (@capv K rT W (@lfun_img K aT rT f (@fullv K aT)))) (@lfun_preim K aT rT f W) *) by rewrite /lfun_preim -capvA capvv. Qed. Lemma lpreim0 f : (f @^-1: 0)%VS = lker f. Proof. (* Goal: @eq (@Vector.space K aT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@lfun_preim K aT rT f (@vline K rT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT)))) (@lker K aT rT f) *) by rewrite /lfun_preim cap0v limg0 add0v. Qed. Lemma lpreimS f V W : (V <= W)%VS-> (f @^-1: V <= f @^-1: W)%VS. Proof. (* Goal: forall _ : is_true (@subsetv K rT V W), is_true (@subsetv K aT (@lfun_preim K aT rT f V) (@lfun_preim K aT rT f W)) *) by move=> sVW; rewrite addvS // limgS // capvS. Qed. Lemma lpreimK f W : (W <= limg f)%VS -> (f @: (f @^-1: W))%VS = W. Proof. (* Goal: forall _ : is_true (@subsetv K rT W (@lfun_img K aT rT f (@fullv K aT))), @eq (@Vector.space K rT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT))) (@lfun_img K aT rT f (@lfun_preim K aT rT f W)) W *) move=> sWf; rewrite limg_add (capv_idPl sWf) // -limg_comp. (* Goal: @eq (@Vector.space K rT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT))) (@addv K rT (@lfun_img K rT rT (@comp_lfun (GRing.Field.ringType K) rT aT rT f (@inv_lfun K aT rT f)) W) (@lfun_img K aT rT f (@lker K aT rT f))) W *) have /eqP->: (f @: lker f == 0)%VS by rewrite -lkerE. (* Goal: @eq (@Vector.space K rT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT))) (@addv K rT (@lfun_img K rT rT (@comp_lfun (GRing.Field.ringType K) rT aT rT f (@inv_lfun K aT rT f)) W) (@vline K rT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT)))) W *) have /andP[/eqP defW _] := vbasisP W; rewrite addv0 -defW limg_span. (* Goal: @eq (@Vector.space K rT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT))) (@span K rT (@map (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT)) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT)) (@fun_of_lfun (GRing.Field.ringType K) rT rT (@comp_lfun (GRing.Field.ringType K) rT aT rT f (@inv_lfun K aT rT f))) (@tval (@dimv K rT W) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT)) (@vbasis K rT W)))) (@span K rT (@tval (@dimv K rT W) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT)) (@vbasis K rT W))) *) rewrite map_id_in // => x Xx; rewrite lfunE /= limg_lfunVK //. (* Goal: is_true (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) x (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT)) (@pred_of_vspace K rT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT)) (@lfun_img K aT rT f (@fullv K aT))))) *) by apply: span_subvP Xx; rewrite defW. Qed. Lemma memv_preim f u W : (f u \in W) = (u \in f @^-1: W)%VS. Proof. (* Goal: @eq bool (@in_mem (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT)) (@fun_of_lfun (GRing.Field.ringType K) aT rT f u) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT)) (@pred_of_vspace K rT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT)) W))) (@in_mem (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT)) u (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@pred_of_vspace K aT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@lfun_preim K aT rT f W)))) *) apply/idP/idP=> [Wfu | /(memv_img f)]; last first. (* Goal: is_true (@in_mem (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT)) u (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@pred_of_vspace K aT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@lfun_preim K aT rT f W)))) *) (* Goal: forall _ : is_true (@in_mem (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT)) (@fun_of_lfun (GRing.Field.ringType K) aT rT f u) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT)) (@pred_of_vspace K rT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT)) (@lfun_img K aT rT f (@lfun_preim K aT rT f W))))), is_true (@in_mem (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT)) (@fun_of_lfun (GRing.Field.ringType K) aT rT f u) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT)) (@pred_of_vspace K rT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT)) W))) *) by rewrite -lpreim_cap_limg lpreimK ?capvSr // => /memv_capP[]. (* Goal: is_true (@in_mem (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT)) u (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@pred_of_vspace K aT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@lfun_preim K aT rT f W)))) *) rewrite -[u](addNKr (f^-1%VF (f u))) memv_add ?memv_img //. (* Goal: is_true (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@GRing.add (@GRing.Lmodule.zmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT)) (@GRing.opp (@GRing.Lmodule.zmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT)) (@fun_of_lfun (GRing.Field.ringType K) rT aT (@inv_lfun K aT rT f) (@fun_of_lfun (GRing.Field.ringType K) aT rT f u))) u) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@pred_of_vspace K aT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@lker K aT rT f)))) *) (* Goal: is_true (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@fun_of_lfun (GRing.Field.ringType K) aT rT f u) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT)) (@pred_of_vspace K rT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT)) (@capv K rT W (@lfun_img K aT rT f (@fullv K aT)))))) *) by rewrite memv_cap Wfu memv_img ?memvf. (* Goal: is_true (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@GRing.add (@GRing.Lmodule.zmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT)) (@GRing.opp (@GRing.Lmodule.zmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT)) (@fun_of_lfun (GRing.Field.ringType K) rT aT (@inv_lfun K aT rT f) (@fun_of_lfun (GRing.Field.ringType K) aT rT f u))) u) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@pred_of_vspace K aT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@lker K aT rT f)))) *) by rewrite memv_ker addrC linearB /= subr_eq0 limg_lfunVK ?memv_img ?memvf. Qed. End LinearPreimage. Arguments lpreimK {K aT rT f} [W] fW. Section LfunAlgebra. Variables (R : comRingType) (vT : vectType R). Hypothesis vT_proper : Vector.dim vT > 0. Fact lfun1_neq0 : \1%VF != 0 :> 'End(vT). Proof. (* Goal: is_true (negb (@eq_op (@lfun_eqType (GRing.ComRing.ringType R) vT vT) (@id_lfun (GRing.ComRing.ringType R) vT : @Vector.hom (GRing.ComRing.ringType R) vT vT) (GRing.zero (@lfun_zmodType (GRing.ComRing.ringType R) vT vT) : @Vector.hom (GRing.ComRing.ringType R) vT vT))) *) apply/eqP=> /lfunP/(_ (r2v (const_mx 1))); rewrite !lfunE /= => /(canRL r2vK). (* Goal: forall _ : @eq (matrix (GRing.Ring.sort (GRing.ComRing.ringType R)) (S O) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) vT)) (@const_mx (GRing.ComRing.sort R) (S O) (@Vector.dim (GRing.ComRing.ringType R) (Phant (GRing.ComRing.sort R)) vT) (GRing.one (GRing.ComRing.ringType R))) (@v2r (GRing.ComRing.ringType R) vT (GRing.zero (@GRing.Zmodule.Pack (@Vector.sort (GRing.ComRing.ringType R) (Phant (GRing.ComRing.sort R)) vT) (@GRing.Lmodule.base (GRing.ComRing.ringType R) (@Vector.sort (GRing.ComRing.ringType R) (Phant (GRing.ComRing.sort R)) vT) (@Vector.base (GRing.ComRing.ringType R) (let '@Vector.Pack _ _ T c := vT in T) (@Vector.class (GRing.ComRing.ringType R) (Phant (GRing.ComRing.sort R)) vT)))))), False *) by move=> /rowP/(_ (Ordinal vT_proper))/eqP; rewrite linear0 !mxE oner_eq0. Qed. Prenex Implicits comp_lfunA comp_lfun1l comp_lfun1r comp_lfunDl comp_lfunDr. Definition lfun_comp_ringMixin := RingMixin comp_lfunA comp_lfun1l comp_lfun1r comp_lfunDl comp_lfunDr lfun1_neq0. Definition lfun_comp_ringType := RingType 'End(vT) lfun_comp_ringMixin. Definition lfun_ringMixin : GRing.Ring.mixin_of (lfun_zmodType vT vT) := GRing.converse_ringMixin lfun_comp_ringType. Definition lfun_ringType := Eval hnf in RingType 'End(vT) lfun_ringMixin. Definition lfun_lalgType := Eval hnf in [lalgType R of 'End(vT) for LalgType R lfun_ringType (fun k x y => comp_lfunZr k y x)]. Definition lfun_algType := Eval hnf in [algType R of 'End(vT) for AlgType R _ (fun k (x y : lfun_lalgType) => comp_lfunZl k y x)]. End LfunAlgebra. Section Projection. Variables (K : fieldType) (vT : vectType K). Implicit Types U V : {vspace vT}. Definition daddv_pi U V := Vector.Hom (proj_mx (vs2mx U) (vs2mx V)). Definition projv U := daddv_pi U U^C. Definition addv_pi1 U V := daddv_pi (U :\: V) V. Definition addv_pi2 U V := daddv_pi V (U :\: V). Lemma memv_pi U V w : (daddv_pi U V) w \in U. Proof. (* Goal: is_true (@in_mem (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@fun_of_lfun (GRing.Field.ringType K) vT vT (daddv_pi U V) w) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) U))) *) by rewrite unlock memvE /subsetv genmxE /= r2vK proj_mx_sub. Qed. Lemma memv_pi1 U V w : (addv_pi1 U V) w \in U. Proof. (* Goal: is_true (@in_mem (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@fun_of_lfun (GRing.Field.ringType K) vT vT (addv_pi1 U V) w) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) U))) *) by rewrite (subvP (diffvSl U V)) ?memv_pi. Qed. Lemma daddv_pi_id U V u : (U :&: V = 0)%VS -> u \in U -> daddv_pi U V u = u. Proof. (* Goal: forall (_ : @eq (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@capv K vT U V) (@vline K vT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)))) (_ : is_true (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) u (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) U)))), @eq (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@fun_of_lfun (GRing.Field.ringType K) vT vT (daddv_pi U V) u) u *) move/eqP; rewrite -dimv_eq0 memvE /subsetv /dimv !genmxE mxrank_eq0 => /eqP. (* Goal: forall (_ : @eq (Equality.sort (matrix_eqType (GRing.Field.eqType K) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@capmx K (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@vs2mx K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) U) (@vs2mx K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) V)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType K) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)))) (_ : is_true (@submx K (S O) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@v2r (GRing.Field.ringType K) vT u) (@vs2mx K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) U))), @eq (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@fun_of_lfun (GRing.Field.ringType K) vT vT (daddv_pi U V) u) u *) by move=> dxUV Uu; rewrite unlock /= proj_mx_id ?v2rK. Qed. Lemma daddv_pi_proj U V w (pi := daddv_pi U V) : (U :&: V = 0)%VS -> pi (pi w) = pi w. Proof. (* Goal: forall _ : @eq (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@capv K vT U V) (@vline K vT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))), @eq (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@fun_of_lfun (GRing.Field.ringType K) vT vT pi (@fun_of_lfun (GRing.Field.ringType K) vT vT pi w)) (@fun_of_lfun (GRing.Field.ringType K) vT vT pi w) *) by move/daddv_pi_id=> -> //; apply: memv_pi. Qed. Lemma daddv_pi_add U V w : (U :&: V = 0)%VS -> (w \in U + V)%VS -> daddv_pi U V w + daddv_pi V U w = w. Proof. (* Goal: forall (_ : @eq (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@capv K vT U V) (@vline K vT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)))) (_ : is_true (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) w (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@addv K vT U V))))), @eq (GRing.Zmodule.sort (@GRing.Lmodule.zmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT))) (@GRing.add (@GRing.Lmodule.zmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@fun_of_lfun (GRing.Field.ringType K) vT vT (daddv_pi U V) w) (@fun_of_lfun (GRing.Field.ringType K) vT vT (daddv_pi V U) w)) w *) move/eqP; rewrite -dimv_eq0 memvE /subsetv /dimv !genmxE mxrank_eq0 => /eqP. (* Goal: forall (_ : @eq (Equality.sort (matrix_eqType (GRing.Field.eqType K) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@capmx K (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@vs2mx K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) U) (@vs2mx K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) V)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType K) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)))) (_ : is_true (@submx K (S O) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@v2r (GRing.Field.ringType K) vT w) (@addsmx K (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@Vector.dim (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@vs2mx K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) U) (@vs2mx K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) V)))), @eq (GRing.Zmodule.sort (@GRing.Lmodule.zmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT))) (@GRing.add (@GRing.Lmodule.zmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@fun_of_lfun (GRing.Field.ringType K) vT vT (daddv_pi U V) w) (@fun_of_lfun (GRing.Field.ringType K) vT vT (daddv_pi V U) w)) w *) by move=> dxUW UVw; rewrite unlock /= -linearD /= add_proj_mx ?v2rK. Qed. Lemma projv_id U u : u \in U -> projv U u = u. Proof. (* Goal: forall _ : is_true (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) u (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) U))), @eq (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@fun_of_lfun (GRing.Field.ringType K) vT vT (projv U) u) u *) exact: daddv_pi_id (capv_compl _). Qed. Lemma projv_proj U w : projv U (projv U w) = projv U w. Proof. (* Goal: @eq (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@fun_of_lfun (GRing.Field.ringType K) vT vT (projv U) (@fun_of_lfun (GRing.Field.ringType K) vT vT (projv U) w)) (@fun_of_lfun (GRing.Field.ringType K) vT vT (projv U) w) *) exact: daddv_pi_proj (capv_compl _). Qed. Lemma memv_projC U w : w - projv U w \in (U^C)%VS. Proof. (* Goal: is_true (@in_mem (GRing.Zmodule.sort (@GRing.Lmodule.zmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT))) (@GRing.add (@GRing.Lmodule.zmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) w (@GRing.opp (@GRing.Lmodule.zmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@fun_of_lfun (GRing.Field.ringType K) vT vT (projv U) w))) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@complv K vT U)))) *) rewrite -{1}[w](daddv_pi_add (capv_compl U)) ?addv_complf ?memvf //. (* Goal: is_true (@in_mem (GRing.Zmodule.sort (@GRing.Lmodule.zmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT))) (@GRing.add (@GRing.Lmodule.zmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.add (@GRing.Lmodule.zmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@fun_of_lfun (GRing.Field.ringType K) vT vT (daddv_pi U (@complv K vT U)) w) (@fun_of_lfun (GRing.Field.ringType K) vT vT (daddv_pi (@complv K vT U) U) w)) (@GRing.opp (@GRing.Lmodule.zmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@fun_of_lfun (GRing.Field.ringType K) vT vT (projv U) w))) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@complv K vT U)))) *) by rewrite addrC addKr memv_pi. Qed. Lemma limg_proj U : limg (projv U) = U. Lemma lker_proj U : lker (projv U) = (U^C)%VS. Proof. (* Goal: @eq (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (@lker K vT vT (projv U)) (@complv K vT U) *) apply/eqP; rewrite eqEdim andbC; apply/andP; split. (* Goal: is_true (@subsetv K vT (@lker K vT vT (projv U)) (@complv K vT U)) *) (* Goal: is_true (leq (@dimv K vT (@complv K vT U)) (@dimv K vT (@lker K vT vT (projv U)))) *) by rewrite dimv_compl -(limg_ker_dim (projv U) fullv) limg_proj addnK capfv. (* Goal: is_true (@subsetv K vT (@lker K vT vT (projv U)) (@complv K vT U)) *) by apply/subvP=> v; rewrite memv_ker -{2}[v]subr0 => /eqP <-; apply: memv_projC. Qed. Lemma addv_pi1_proj U V w (pi1 := addv_pi1 U V) : pi1 (pi1 w) = pi1 w. Proof. (* Goal: @eq (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@fun_of_lfun (GRing.Field.ringType K) vT vT pi1 (@fun_of_lfun (GRing.Field.ringType K) vT vT pi1 w)) (@fun_of_lfun (GRing.Field.ringType K) vT vT pi1 w) *) by rewrite daddv_pi_proj // capv_diff. Qed. Lemma addv_pi2_id U V v : v \in V -> addv_pi2 U V v = v. Proof. (* Goal: forall _ : is_true (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) V))), @eq (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@fun_of_lfun (GRing.Field.ringType K) vT vT (addv_pi2 U V) v) v *) by apply: daddv_pi_id; rewrite capvC capv_diff. Qed. Lemma addv_pi2_proj U V w (pi2 := addv_pi2 U V) : pi2 (pi2 w) = pi2 w. Proof. (* Goal: @eq (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@fun_of_lfun (GRing.Field.ringType K) vT vT pi2 (@fun_of_lfun (GRing.Field.ringType K) vT vT pi2 w)) (@fun_of_lfun (GRing.Field.ringType K) vT vT pi2 w) *) by rewrite addv_pi2_id ?memv_pi2. Qed. Lemma addv_pi1_pi2 U V w : w \in (U + V)%VS -> addv_pi1 U V w + addv_pi2 U V w = w. Proof. (* Goal: forall _ : is_true (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) w (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@addv K vT U V)))), @eq (GRing.Zmodule.sort (@GRing.Lmodule.zmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT))) (@GRing.add (@GRing.Lmodule.zmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@fun_of_lfun (GRing.Field.ringType K) vT vT (addv_pi1 U V) w) (@fun_of_lfun (GRing.Field.ringType K) vT vT (addv_pi2 U V) w)) w *) by rewrite -addv_diff; apply: daddv_pi_add; apply: capv_diff. Qed. Section Sumv_Pi. Variables (I : eqType) (r0 : seq I) (P : pred I) (Vs : I -> {vspace vT}). Let sumv_pi_rec i := fix loop r := if r is j :: r1 then let V1 := (\sum_(k <- r1) Vs k)%VS in if j == i then addv_pi1 (Vs j) V1 else (loop r1 \o addv_pi2 (Vs j) V1)%VF else 0. Notation sumV := (\sum_(i <- r0 | P i) Vs i)%VS. Definition sumv_pi_for V of V = sumV := fun i => sumv_pi_rec i (filter P r0). Variables (V : {vspace vT}) (defV : V = sumV). Lemma memv_sum_pi i v : sumv_pi_for defV i v \in Vs i. Proof. (* Goal: is_true (@in_mem (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@fun_of_lfun (GRing.Field.ringType K) vT vT (@sumv_pi_for V defV i) v) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (Vs i)))) *) rewrite /sumv_pi_for. (* Goal: is_true (@in_mem (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@fun_of_lfun (GRing.Field.ringType K) vT vT (sumv_pi_rec i (@filter (Equality.sort I) P r0)) v) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (Vs i)))) *) elim: (filter P r0) v => [|j r IHr] v /=; first by rewrite lfunE mem0v. (* Goal: is_true (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@fun_of_lfun (GRing.Field.ringType K) vT vT (if @eq_op I j i then addv_pi1 (Vs j) (@BigOp.bigop (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (Equality.sort I) (@vline K vT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) r (fun k : Equality.sort I => @BigBody (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (Equality.sort I) k (@addv K vT) true (Vs k))) else @comp_lfun (GRing.Field.ringType K) vT vT vT (sumv_pi_rec i r) (addv_pi2 (Vs j) (@BigOp.bigop (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (Equality.sort I) (@vline K vT (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) r (fun k : Equality.sort I => @BigBody (@Vector.space K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT))) (Equality.sort I) k (@addv K vT) true (Vs k))))) v) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (Vs i)))) *) by case: eqP => [->|_]; rewrite ?lfunE ?memv_pi1 /=. Qed. Lemma sumv_pi_uniq_sum v : uniq (filter P r0) -> v \in V -> \sum_(i <- r0 | P i) sumv_pi_for defV i v = v. End Sumv_Pi. End Projection. Prenex Implicits daddv_pi projv addv_pi1 addv_pi2. Notation sumv_pi V := (sumv_pi_for (erefl V)). Section SumvPi. Variable (K : fieldType) (vT : vectType K). Lemma sumv_pi_sum (I : finType) (P : pred I) Vs v (V : {vspace vT}) (defV : V = (\sum_(i | P i) Vs i)%VS) : v \in V -> \sum_(i | P i) sumv_pi_for defV i v = v :> vT. Proof. (* Goal: forall _ : is_true (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) V))), @eq (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Lmodule.zmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT))) (Finite.sort I) (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT))) (index_enum I) (fun i : Finite.sort I => @BigBody (GRing.Zmodule.sort (@GRing.Lmodule.zmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT))) (Finite.sort I) i (@GRing.add (@GRing.Lmodule.zmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT))) (P i) (@fun_of_lfun (GRing.Field.ringType K) vT vT (@sumv_pi_for K vT (Finite.eqType I) (index_enum I) P Vs V defV i) v))) v *) by apply: sumv_pi_uniq_sum; apply: enum_uniq. Qed. Lemma sumv_pi_nat_sum m n (P : pred nat) Vs v (V : {vspace vT}) (defV : V = (\sum_(m <= i < n | P i) Vs i)%VS) : v \in V -> \sum_(m <= i < n | P i) sumv_pi_for defV i v = v :> vT. Proof. (* Goal: forall _ : is_true (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) v (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) V))), @eq (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Lmodule.zmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT))) nat (GRing.zero (@GRing.Lmodule.zmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT))) (index_iota m n) (fun i : nat => @BigBody (GRing.Zmodule.sort (@GRing.Lmodule.zmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT))) nat i (@GRing.add (@GRing.Lmodule.zmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT))) (P i) (@fun_of_lfun (GRing.Field.ringType K) vT vT (@sumv_pi_for K vT nat_eqType (index_iota m n) P Vs V defV i) v))) v *) by apply: sumv_pi_uniq_sum; apply/filter_uniq/iota_uniq. Qed. End SumvPi. Section SubVector. Variable (K : fieldType) (vT : vectType K) (U : {vspace vT}). Inductive subvs_of : predArgType := Subvs u & u \in U. Definition vsval w := let: Subvs u _ := w in u. Canonical subvs_subType := Eval hnf in [subType for vsval]. Definition subvs_eqMixin := Eval hnf in [eqMixin of subvs_of by <:]. Canonical subvs_eqType := Eval hnf in EqType subvs_of subvs_eqMixin. Definition subvs_choiceMixin := [choiceMixin of subvs_of by <:]. Canonical subvs_choiceType := ChoiceType subvs_of subvs_choiceMixin. Definition subvs_zmodMixin := [zmodMixin of subvs_of by <:]. Canonical subvs_zmodType := ZmodType subvs_of subvs_zmodMixin. Definition subvs_lmodMixin := [lmodMixin of subvs_of by <:]. Lemma subvs_inj : injective vsval. Proof. exact: val_inj. Qed. Proof. (* Goal: @injective (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) subvs_of vsval *) exact: val_inj. Qed. Lemma vsval_is_linear : linear vsval. Proof. by []. Qed. Proof. (* Goal: @GRing.Linear.axiom (GRing.Field.ringType K) subvs_lmodType (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@GRing.scale (GRing.Field.ringType K) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) vsval (@GRing.Scale.scale_law (GRing.Field.ringType K) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@Logic.eq_refl (forall (_ : GRing.Ring.sort (GRing.Field.ringType K)) (_ : GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT))))), GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT))))) (@GRing.scale (GRing.Field.ringType K) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT))) *) by []. Qed. Definition vsproj_def u := Subvs (memv_proj U u). Definition vsproj := locked_with vsproj_key vsproj_def. Canonical vsproj_unlockable := [unlockable fun vsproj]. Lemma vsprojK : {in U, cancel vsproj vsval}. Proof. (* Goal: @prop_in1 (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) U)) (fun x : @GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT) => @eq (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (vsval (vsproj x)) x) (inPhantom (@cancel subvs_of (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) vsproj vsval)) *) by rewrite unlock; apply: projv_id. Qed. Lemma vsvalK : cancel vsval vsproj. Proof. (* Goal: @cancel (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) subvs_of vsval vsproj *) by move=> w; apply/val_inj/vsprojK/subvsP. Qed. Lemma vsproj_is_linear : linear vsproj. Proof. (* Goal: @GRing.Linear.axiom (GRing.Field.ringType K) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT) subvs_zmodType (@GRing.scale (GRing.Field.ringType K) subvs_lmodType) vsproj (@GRing.Scale.scale_law (GRing.Field.ringType K) subvs_lmodType) (@Logic.eq_refl (forall (_ : GRing.Ring.sort (GRing.Field.ringType K)) (_ : GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) subvs_lmodType) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) subvs_lmodType) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) subvs_lmodType)))), GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) subvs_lmodType) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) subvs_lmodType) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) subvs_lmodType)))) (@GRing.scale (GRing.Field.ringType K) subvs_lmodType)) *) by move=> k w1 w2; apply: val_inj; rewrite unlock /= linearP. Qed. Canonical vsproj_additive := Additive vsproj_is_linear. Canonical vsproj_linear := AddLinear vsproj_is_linear. Fact subvs_vect_iso : Vector.axiom (\dim U) subvs_of. Definition subvs_vectMixin := VectMixin subvs_vect_iso. Canonical subvs_vectType := VectType K subvs_of subvs_vectMixin. End SubVector. Prenex Implicits vsval vsproj vsvalK. Arguments subvs_inj {K vT U} [x1 x2]. Arguments vsprojK {K vT U} [x] Ux. Section MatrixVectType. Variables (R : ringType) (m n : nat). Fact matrix_vect_iso : Vector.axiom (m * n) 'M[R]_(m, n). Proof. (* Goal: @Vector.axiom_def R (muln m n) (matrix_lmodType R m n) (Phant (matrix (GRing.Ring.sort R) m n)) *) exists mxvec => /=; first exact: linearP. (* Goal: @bijective (matrix (GRing.Ring.sort R) (S O) (muln m n)) (matrix (GRing.Ring.sort R) m n) (@mxvec (GRing.Ring.sort R) m n) *) by exists vec_mx; [apply: mxvecK | apply: vec_mxK]. Qed. Definition matrix_vectMixin := VectMixin matrix_vect_iso. Canonical matrix_vectType := VectType R 'M[R]_(m, n) matrix_vectMixin. End MatrixVectType. Section RegularVectType. Variable R : ringType. Fact regular_vect_iso : Vector.axiom 1 R^o. Proof. (* Goal: @Vector.axiom_def R (S O) (GRing.regular_lmodType R) (Phant (GRing.regular (GRing.Ring.sort R))) *) exists (fun a => a%:M) => [a b c|]; first by rewrite rmorphD scale_scalar_mx. (* Goal: @bijective (matrix (GRing.Ring.sort R) (S O) (S O)) (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (GRing.regular_lmodType R)) (fun a : GRing.Zmodule.sort (GRing.Ring.zmodType (@GRing.Lalgebra.ringType R (Phant (GRing.Ring.sort R)) (GRing.regular_lalgType R))) => @scalar_mx (@GRing.Lalgebra.ringType R (Phant (GRing.Ring.sort R)) (GRing.regular_lalgType R)) (S O) a) *) by exists (fun A : 'M_1 => A 0 0) => [a | A]; rewrite ?mxE // -mx11_scalar. Qed. Definition regular_vectMixin := VectMixin regular_vect_iso. Canonical regular_vectType := VectType R R^o regular_vectMixin. End RegularVectType. Section ProdVector. Variables (R : ringType) (vT1 vT2 : vectType R). Fact pair_vect_iso : Vector.axiom (Vector.dim vT1 + Vector.dim vT2) (vT1 * vT2). Proof. (* Goal: @Vector.axiom_def R (addn (@Vector.dim R (Phant (GRing.Ring.sort R)) vT1) (@Vector.dim R (Phant (GRing.Ring.sort R)) vT2)) (@pair_lmodType R (@Vector.lmodType R (Phant (GRing.Ring.sort R)) vT1) (@Vector.lmodType R (Phant (GRing.Ring.sort R)) vT2)) (Phant (prod (@Vector.sort R (Phant (GRing.Ring.sort R)) vT1) (@Vector.sort R (Phant (GRing.Ring.sort R)) vT2))) *) pose p2r (u : vT1 * vT2) := row_mx (v2r u.1) (v2r u.2). (* Goal: @Vector.axiom_def R (addn (@Vector.dim R (Phant (GRing.Ring.sort R)) vT1) (@Vector.dim R (Phant (GRing.Ring.sort R)) vT2)) (@pair_lmodType R (@Vector.lmodType R (Phant (GRing.Ring.sort R)) vT1) (@Vector.lmodType R (Phant (GRing.Ring.sort R)) vT2)) (Phant (prod (@Vector.sort R (Phant (GRing.Ring.sort R)) vT1) (@Vector.sort R (Phant (GRing.Ring.sort R)) vT2))) *) pose r2p w := (r2v (lsubmx w) : vT1, r2v (rsubmx w) : vT2). (* Goal: @Vector.axiom_def R (addn (@Vector.dim R (Phant (GRing.Ring.sort R)) vT1) (@Vector.dim R (Phant (GRing.Ring.sort R)) vT2)) (@pair_lmodType R (@Vector.lmodType R (Phant (GRing.Ring.sort R)) vT1) (@Vector.lmodType R (Phant (GRing.Ring.sort R)) vT2)) (Phant (prod (@Vector.sort R (Phant (GRing.Ring.sort R)) vT1) (@Vector.sort R (Phant (GRing.Ring.sort R)) vT2))) *) have r2pK : cancel r2p p2r by move=> w; rewrite /p2r !r2vK hsubmxK. (* Goal: @Vector.axiom_def R (addn (@Vector.dim R (Phant (GRing.Ring.sort R)) vT1) (@Vector.dim R (Phant (GRing.Ring.sort R)) vT2)) (@pair_lmodType R (@Vector.lmodType R (Phant (GRing.Ring.sort R)) vT1) (@Vector.lmodType R (Phant (GRing.Ring.sort R)) vT2)) (Phant (prod (@Vector.sort R (Phant (GRing.Ring.sort R)) vT1) (@Vector.sort R (Phant (GRing.Ring.sort R)) vT2))) *) have p2rK : cancel p2r r2p by case=> u v; rewrite /r2p row_mxKl row_mxKr !v2rK. (* Goal: @Vector.axiom_def R (addn (@Vector.dim R (Phant (GRing.Ring.sort R)) vT1) (@Vector.dim R (Phant (GRing.Ring.sort R)) vT2)) (@pair_lmodType R (@Vector.lmodType R (Phant (GRing.Ring.sort R)) vT1) (@Vector.lmodType R (Phant (GRing.Ring.sort R)) vT2)) (Phant (prod (@Vector.sort R (Phant (GRing.Ring.sort R)) vT1) (@Vector.sort R (Phant (GRing.Ring.sort R)) vT2))) *) have r2p_lin: linear r2p by move=> a u v; congr (_ , _); rewrite /= !linearP. (* Goal: @Vector.axiom_def R (addn (@Vector.dim R (Phant (GRing.Ring.sort R)) vT1) (@Vector.dim R (Phant (GRing.Ring.sort R)) vT2)) (@pair_lmodType R (@Vector.lmodType R (Phant (GRing.Ring.sort R)) vT1) (@Vector.lmodType R (Phant (GRing.Ring.sort R)) vT2)) (Phant (prod (@Vector.sort R (Phant (GRing.Ring.sort R)) vT1) (@Vector.sort R (Phant (GRing.Ring.sort R)) vT2))) *) by exists p2r; [apply: (@can2_linear _ _ _ (Linear r2p_lin)) | exists r2p]. Qed. Definition pair_vectMixin := VectMixin pair_vect_iso. Canonical pair_vectType := VectType R (vT1 * vT2) pair_vectMixin. End ProdVector. Section FunVectType. Variable (I : finType) (R : ringType) (vT : vectType R). Fact ffun_vect_iso : Vector.axiom (#|I| * Vector.dim vT) {ffun I -> vT}. Proof. (* Goal: @Vector.axiom_def R (muln (@card I (@mem (Equality.sort (Finite.eqType I)) (predPredType (Equality.sort (Finite.eqType I))) (@sort_of_simpl_pred (Equality.sort (Finite.eqType I)) (pred_of_argType (Equality.sort (Finite.eqType I)))))) (@Vector.dim R (Phant (GRing.Ring.sort R)) vT)) (@ffun_lmodType R I (@Vector.lmodType R (Phant (GRing.Ring.sort R)) vT)) (Phant (@finfun_of I (@Vector.sort R (Phant (GRing.Ring.sort R)) vT) (Phant (forall _ : Finite.sort I, @Vector.sort R (Phant (GRing.Ring.sort R)) vT)))) *) pose fr (f : {ffun I -> vT}) := mxvec (\matrix_(i < #|I|) v2r (f (enum_val i))). (* Goal: @Vector.axiom_def R (muln (@card I (@mem (Equality.sort (Finite.eqType I)) (predPredType (Equality.sort (Finite.eqType I))) (@sort_of_simpl_pred (Equality.sort (Finite.eqType I)) (pred_of_argType (Equality.sort (Finite.eqType I)))))) (@Vector.dim R (Phant (GRing.Ring.sort R)) vT)) (@ffun_lmodType R I (@Vector.lmodType R (Phant (GRing.Ring.sort R)) vT)) (Phant (@finfun_of I (@Vector.sort R (Phant (GRing.Ring.sort R)) vT) (Phant (forall _ : Finite.sort I, @Vector.sort R (Phant (GRing.Ring.sort R)) vT)))) *) exists fr => /= [k f g|]. (* Goal: @bijective (matrix (GRing.Ring.sort R) (S O) (muln (@card I (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@sort_of_simpl_pred (Finite.sort I) (pred_of_argType (Finite.sort I))))) (@Vector.dim R (Phant (GRing.Ring.sort R)) vT))) (@finfun_of I (@Vector.sort R (Phant (GRing.Ring.sort R)) vT) (Phant (forall _ : Finite.sort I, @Vector.sort R (Phant (GRing.Ring.sort R)) vT))) fr *) (* Goal: @eq (GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType R) (S O) (muln (@card I (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@sort_of_simpl_pred (Finite.sort I) (pred_of_argType (Finite.sort I))))) (@Vector.dim R (Phant (GRing.Ring.sort R)) vT)))) (fr (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (@ffun_lmodType R I (@Vector.lmodType R (Phant (GRing.Ring.sort R)) vT))) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (@ffun_lmodType R I (@Vector.lmodType R (Phant (GRing.Ring.sort R)) vT))) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) (@ffun_lmodType R I (@Vector.lmodType R (Phant (GRing.Ring.sort R)) vT))))) (@GRing.scale R (@ffun_lmodType R I (@Vector.lmodType R (Phant (GRing.Ring.sort R)) vT)) k f) g)) (@GRing.add (matrix_zmodType (GRing.Ring.zmodType R) (S O) (muln (@card I (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@sort_of_simpl_pred (Finite.sort I) (pred_of_argType (Finite.sort I))))) (@Vector.dim R (Phant (GRing.Ring.sort R)) vT))) (@GRing.scale R (matrix_lmodType R (S O) (muln (@card I (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@sort_of_simpl_pred (Finite.sort I) (pred_of_argType (Finite.sort I))))) (@Vector.dim R (Phant (GRing.Ring.sort R)) vT))) k (fr f)) (fr g)) *) rewrite /fr -linearP; congr (mxvec _); apply/matrixP=> i j. (* Goal: @bijective (matrix (GRing.Ring.sort R) (S O) (muln (@card I (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@sort_of_simpl_pred (Finite.sort I) (pred_of_argType (Finite.sort I))))) (@Vector.dim R (Phant (GRing.Ring.sort R)) vT))) (@finfun_of I (@Vector.sort R (Phant (GRing.Ring.sort R)) vT) (Phant (forall _ : Finite.sort I, @Vector.sort R (Phant (GRing.Ring.sort R)) vT))) fr *) (* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@fun_of_matrix (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@card I (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@sort_of_simpl_pred (Finite.sort I) (pred_of_argType (Finite.sort I))))) (@Vector.dim R (Phant (GRing.Ring.sort R)) vT) (@matrix_of_fun (GRing.Ring.sort R) (@card I (@mem (Equality.sort (Finite.eqType I)) (predPredType (Equality.sort (Finite.eqType I))) (@sort_of_simpl_pred (Equality.sort (Finite.eqType I)) (pred_of_argType (Equality.sort (Finite.eqType I)))))) (@Vector.dim R (Phant (GRing.Ring.sort R)) vT) matrix_key (fun (i : Finite.sort (ordinal_finType (@card I (@mem (Equality.sort (Finite.eqType I)) (predPredType (Equality.sort (Finite.eqType I))) (@sort_of_simpl_pred (Equality.sort (Finite.eqType I)) (pred_of_argType (Equality.sort (Finite.eqType I)))))))) (j : Finite.sort (ordinal_finType (@Vector.dim R (Phant (GRing.Ring.sort R)) vT))) => @fun_of_matrix (GRing.Ring.sort R) (S O) (@Vector.dim R (Phant (GRing.Ring.sort R)) vT) (@v2r R vT (@FunFinfun.fun_of_fin I (@Vector.sort R (Phant (GRing.Ring.sort R)) vT) (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (@ffun_lmodType R I (@Vector.lmodType R (Phant (GRing.Ring.sort R)) vT))) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (@ffun_lmodType R I (@Vector.lmodType R (Phant (GRing.Ring.sort R)) vT))) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) (@ffun_lmodType R I (@Vector.lmodType R (Phant (GRing.Ring.sort R)) vT))))) (@GRing.scale R (@ffun_lmodType R I (@Vector.lmodType R (Phant (GRing.Ring.sort R)) vT)) k f) g) (@enum_val I (fun _ : Equality.sort (Finite.eqType I) => true) i))) (GRing.zero (Zp_zmodType O)) j)) i j) (@fun_of_matrix (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@card I (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@sort_of_simpl_pred (Finite.sort I) (pred_of_argType (Finite.sort I))))) (@Vector.dim R (Phant (GRing.Ring.sort R)) vT) (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType R (@card I (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@sort_of_simpl_pred (Finite.sort I) (pred_of_argType (Finite.sort I))))) (@Vector.dim R (Phant (GRing.Ring.sort R)) vT))) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType R (@card I (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@sort_of_simpl_pred (Finite.sort I) (pred_of_argType (Finite.sort I))))) (@Vector.dim R (Phant (GRing.Ring.sort R)) vT))) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) (matrix_lmodType R (@card I (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@sort_of_simpl_pred (Finite.sort I) (pred_of_argType (Finite.sort I))))) (@Vector.dim R (Phant (GRing.Ring.sort R)) vT))))) (@GRing.scale R (matrix_lmodType R (@card I (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@sort_of_simpl_pred (Finite.sort I) (pred_of_argType (Finite.sort I))))) (@Vector.dim R (Phant (GRing.Ring.sort R)) vT)) k (@matrix_of_fun (GRing.Ring.sort R) (@card I (@mem (Equality.sort (Finite.eqType I)) (predPredType (Equality.sort (Finite.eqType I))) (@sort_of_simpl_pred (Equality.sort (Finite.eqType I)) (pred_of_argType (Equality.sort (Finite.eqType I)))))) (@Vector.dim R (Phant (GRing.Ring.sort R)) vT) matrix_key (fun (i : Finite.sort (ordinal_finType (@card I (@mem (Equality.sort (Finite.eqType I)) (predPredType (Equality.sort (Finite.eqType I))) (@sort_of_simpl_pred (Equality.sort (Finite.eqType I)) (pred_of_argType (Equality.sort (Finite.eqType I)))))))) (j : Finite.sort (ordinal_finType (@Vector.dim R (Phant (GRing.Ring.sort R)) vT))) => @fun_of_matrix (GRing.Ring.sort R) (S O) (@Vector.dim R (Phant (GRing.Ring.sort R)) vT) (@v2r R vT (@FunFinfun.fun_of_fin I (@Vector.sort R (Phant (GRing.Ring.sort R)) vT) f (@enum_val I (fun _ : Equality.sort (Finite.eqType I) => true) i))) (GRing.zero (Zp_zmodType O)) j))) (@matrix_of_fun (GRing.Ring.sort R) (@card I (@mem (Equality.sort (Finite.eqType I)) (predPredType (Equality.sort (Finite.eqType I))) (@sort_of_simpl_pred (Equality.sort (Finite.eqType I)) (pred_of_argType (Equality.sort (Finite.eqType I)))))) (@Vector.dim R (Phant (GRing.Ring.sort R)) vT) matrix_key (fun (i : Finite.sort (ordinal_finType (@card I (@mem (Equality.sort (Finite.eqType I)) (predPredType (Equality.sort (Finite.eqType I))) (@sort_of_simpl_pred (Equality.sort (Finite.eqType I)) (pred_of_argType (Equality.sort (Finite.eqType I)))))))) (j : Finite.sort (ordinal_finType (@Vector.dim R (Phant (GRing.Ring.sort R)) vT))) => @fun_of_matrix (GRing.Ring.sort R) (S O) (@Vector.dim R (Phant (GRing.Ring.sort R)) vT) (@v2r R vT (@FunFinfun.fun_of_fin I (@Vector.sort R (Phant (GRing.Ring.sort R)) vT) g (@enum_val I (fun _ : Equality.sort (Finite.eqType I) => true) i))) (GRing.zero (Zp_zmodType O)) j))) i j) *) by rewrite !mxE /= !ffunE linearP !mxE. (* Goal: @bijective (matrix (GRing.Ring.sort R) (S O) (muln (@card I (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@sort_of_simpl_pred (Finite.sort I) (pred_of_argType (Finite.sort I))))) (@Vector.dim R (Phant (GRing.Ring.sort R)) vT))) (@finfun_of I (@Vector.sort R (Phant (GRing.Ring.sort R)) vT) (Phant (forall _ : Finite.sort I, @Vector.sort R (Phant (GRing.Ring.sort R)) vT))) fr *) exists (fun r => [ffun i => r2v (row (enum_rank i) (vec_mx r)) : vT]) => [g|r]. (* Goal: @eq (matrix (GRing.Ring.sort R) (S O) (muln (@card I (@mem (Finite.sort I) (predPredType (Finite.sort I)) (fun x : Finite.sort I => @pred_of_simpl (Equality.sort (Finite.eqType I)) (pred_of_argType (Equality.sort (Finite.eqType I))) x))) (@Vector.dim R (Phant (GRing.Ring.sort R)) vT))) (fr (@FunFinfun.finfun I (@Vector.sort R (Phant (GRing.Ring.sort R)) vT) (fun i : Finite.sort I => @r2v R vT (@row (GRing.Ring.sort R) (@card I (@mem (Finite.sort I) (predPredType (Finite.sort I)) (fun x : Finite.sort I => @pred_of_simpl (Equality.sort (Finite.eqType I)) (pred_of_argType (Equality.sort (Finite.eqType I))) x))) (@Vector.dim R (Phant (GRing.Ring.sort R)) vT) (@enum_rank I i) (@vec_mx (GRing.Ring.sort R) (@card I (@mem (Finite.sort I) (predPredType (Finite.sort I)) (fun x : Finite.sort I => @pred_of_simpl (Equality.sort (Finite.eqType I)) (pred_of_argType (Equality.sort (Finite.eqType I))) x))) (@Vector.dim R (Phant (GRing.Ring.sort R)) vT) r))))) r *) (* Goal: @eq (@finfun_of I (@Vector.sort R (Phant (GRing.Ring.sort R)) vT) (Phant (forall _ : Finite.sort I, @Vector.sort R (Phant (GRing.Ring.sort R)) vT))) (@FunFinfun.finfun I (@Vector.sort R (Phant (GRing.Ring.sort R)) vT) (fun i : Finite.sort I => @r2v R vT (@row (GRing.Ring.sort R) (@card I (@mem (Finite.sort I) (predPredType (Finite.sort I)) (fun x : Finite.sort I => @pred_of_simpl (Equality.sort (Finite.eqType I)) (pred_of_argType (Equality.sort (Finite.eqType I))) x))) (@Vector.dim R (Phant (GRing.Ring.sort R)) vT) (@enum_rank I i) (@vec_mx (GRing.Ring.sort R) (@card I (@mem (Finite.sort I) (predPredType (Finite.sort I)) (fun x : Finite.sort I => @pred_of_simpl (Equality.sort (Finite.eqType I)) (pred_of_argType (Equality.sort (Finite.eqType I))) x))) (@Vector.dim R (Phant (GRing.Ring.sort R)) vT) (fr g))))) g *) by apply/ffunP=> i; rewrite ffunE mxvecK rowK v2rK enum_rankK. (* Goal: @eq (matrix (GRing.Ring.sort R) (S O) (muln (@card I (@mem (Finite.sort I) (predPredType (Finite.sort I)) (fun x : Finite.sort I => @pred_of_simpl (Equality.sort (Finite.eqType I)) (pred_of_argType (Equality.sort (Finite.eqType I))) x))) (@Vector.dim R (Phant (GRing.Ring.sort R)) vT))) (fr (@FunFinfun.finfun I (@Vector.sort R (Phant (GRing.Ring.sort R)) vT) (fun i : Finite.sort I => @r2v R vT (@row (GRing.Ring.sort R) (@card I (@mem (Finite.sort I) (predPredType (Finite.sort I)) (fun x : Finite.sort I => @pred_of_simpl (Equality.sort (Finite.eqType I)) (pred_of_argType (Equality.sort (Finite.eqType I))) x))) (@Vector.dim R (Phant (GRing.Ring.sort R)) vT) (@enum_rank I i) (@vec_mx (GRing.Ring.sort R) (@card I (@mem (Finite.sort I) (predPredType (Finite.sort I)) (fun x : Finite.sort I => @pred_of_simpl (Equality.sort (Finite.eqType I)) (pred_of_argType (Equality.sort (Finite.eqType I))) x))) (@Vector.dim R (Phant (GRing.Ring.sort R)) vT) r))))) r *) by apply/(canLR vec_mxK)/matrixP=> i j; rewrite mxE ffunE r2vK enum_valK mxE. Qed. Definition ffun_vectMixin := VectMixin ffun_vect_iso. Canonical ffun_vectType := VectType R {ffun I -> vT} ffun_vectMixin. End FunVectType. Canonical exp_vectType (K : fieldType) (vT : vectType K) n := [vectType K of vT ^ n]. Section Solver. Variable (K : fieldType) (vT : vectType K). Variables (n : nat) (lhs : n.-tuple 'End(vT)) (rhs : n.-tuple vT). Let lhsf u := finfun ((tnth lhs)^~ u). Definition vsolve_eq U := finfun (tnth rhs) \in (linfun lhsf @: U)%VS. Lemma vsolve_eqP (U : {vspace vT}) : reflect (exists2 u, u \in U & forall i, tnth lhs i u = tnth rhs i) (vsolve_eq U). Proof. (* Goal: Bool.reflect (@ex2 (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (fun u : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT => is_true (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) u (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) U)))) (fun u : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT => forall i : ordinal n, @eq (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@fun_of_lfun (GRing.Field.ringType K) vT vT (@tnth n (@Vector.hom (GRing.Field.ringType K) vT vT) lhs i) u) (@tnth n (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) rhs i))) (vsolve_eq U) *) have lhsZ: linear lhsf by move=> a u v; apply/ffunP=> i; rewrite !ffunE linearP. (* Goal: Bool.reflect (@ex2 (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (fun u : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT => is_true (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) u (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) (@pred_of_vspace K vT (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT)) U)))) (fun u : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT => forall i : ordinal n, @eq (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@fun_of_lfun (GRing.Field.ringType K) vT vT (@tnth n (@Vector.hom (GRing.Field.ringType K) vT vT) lhs i) u) (@tnth n (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) rhs i))) (vsolve_eq U) *) apply: (iffP memv_imgP) => [] [u Uu sol_u]; exists u => //. (* Goal: @eq (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@ffun_vectType (ordinal_finType n) (GRing.Field.ringType K) vT))) (@FunFinfun.finfun (ordinal_finType n) (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@tnth n (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) rhs)) (@fun_of_lfun (GRing.Field.ringType K) vT (@ffun_vectType (ordinal_finType n) (GRing.Field.ringType K) vT) (@linfun (GRing.Field.ringType K) vT (@ffun_vectType (ordinal_finType n) (GRing.Field.ringType K) vT) lhsf) u) *) (* Goal: forall i : ordinal n, @eq (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) vT)) (@fun_of_lfun (GRing.Field.ringType K) vT vT (@tnth n (@Vector.hom (GRing.Field.ringType K) vT vT) lhs i) u) (@tnth n (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) rhs i) *) by move=> i; rewrite -[tnth rhs i]ffunE sol_u (lfunE (Linear lhsZ)) ffunE. (* Goal: @eq (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@ffun_vectType (ordinal_finType n) (GRing.Field.ringType K) vT))) (@FunFinfun.finfun (ordinal_finType n) (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) (@tnth n (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) vT) rhs)) (@fun_of_lfun (GRing.Field.ringType K) vT (@ffun_vectType (ordinal_finType n) (GRing.Field.ringType K) vT) (@linfun (GRing.Field.ringType K) vT (@ffun_vectType (ordinal_finType n) (GRing.Field.ringType K) vT) lhsf) u) *) by apply/ffunP=> i; rewrite (lfunE (Linear lhsZ)) !ffunE sol_u. Qed. End Solver.
From mathcomp Require Import ssreflect ssrbool eqtype ssrfun seq path. From LemmaOverloading Require Import ordtype prelude. Set Implicit Arguments. Unset Strict Implicit. Unset Printing Implicit Defensive. Section Def. Variables (K : ordType) (V : Type). Definition key (x : K * V) := x.1. Definition value (x : K * V) := x.2. Definition predk k := preim key (pred1 k). Definition predCk k := preim key (predC1 k). Structure finMap : Type := FinMap { seq_of : seq (K * V); _ : sorted ord (map key seq_of)}. Definition finMap_for of phant (K -> V) := finMap. Identity Coercion finMap_for_finMap : finMap_for >-> finMap. End Def. Notation "{ 'finMap' fT }" := (finMap_for (Phant fT)) (at level 0, format "{ 'finMap' '[hv' fT ']' }") : type_scope. Prenex Implicits key value predk predCk seq_of. Section Ops. Variables (K : ordType) (V : Type). Notation fmap := (finMap K V). Notation key := (@key K V). Notation predk := (@predk K V). Notation predCk := (@predCk K V). Lemma fmapE (s1 s2 : fmap) : s1 = s2 <-> seq_of s1 = seq_of s2. Proof. (* Goal: iff (@eq (finMap K V) s1 s2) (@eq (list (prod (Ordered.sort K) V)) (@seq_of K V s1) (@seq_of K V s2)) *) split=>[->|] //. (* Goal: forall _ : @eq (list (prod (Ordered.sort K) V)) (@seq_of K V s1) (@seq_of K V s2), @eq (finMap K V) s1 s2 *) move: s1 s2 => [s1 H1] [s2 H2] /= H. (* Goal: @eq (finMap K V) (@FinMap K V s1 H1) (@FinMap K V s2 H2) *) by rewrite H in H1 H2 *; rewrite (bool_irrelevance H1 H2). Qed. Definition nil := FinMap sorted_nil. Definition fnd k (s : fmap) := if (filter (predk k) (seq_of s)) is (_, v):: _ then Some v else None. Fixpoint ins' (k : K) (v : V) (s : seq (K * V)) {struct s} : seq (K * V) := if s is (k1, v1)::s1 then if ord k k1 then (k, v)::s else if k == k1 then (k, v)::s1 else (k1, v1)::(ins' k v s1) else [:: (k, v)]. Lemma path_ins' s k1 k2 v : ord k1 k2 -> path ord k1 (map key s) -> path ord k1 (map key (ins' k2 v s)). Proof. (* Goal: forall (_ : is_true (@ord K k1 k2)) (_ : is_true (@path (Ordered.sort K) (@ord K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@SerTop.key K V) s))), is_true (@path (Ordered.sort K) (@ord K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@SerTop.key K V) (ins' k2 v s))) *) elim: s k1 k2 v=>[|[k' v'] s IH] k1 k2 v H1 /=; first by rewrite H1. (* Goal: forall _ : is_true (andb (@ord K k1 k') (@path (Ordered.sort K) (@ord K) k' (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@SerTop.key K V) s))), is_true (@path (Ordered.sort K) (@ord K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@SerTop.key K V) (if @ord K k2 k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') s) else if @eq_op (Ordered.eqType K) k2 k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (ins' k2 v s)))) *) case/andP=>H2 H3; case: ifP=>/= H4; first by rewrite H1 H3 H4. (* Goal: is_true (@path (Ordered.sort K) (@ord K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@SerTop.key K V) (if @eq_op (Ordered.eqType K) k2 k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (ins' k2 v s)))) *) case: ifP=>H5 /=; first by rewrite H1 (eqP H5) H3. (* Goal: is_true (andb (@ord K k1 k') (@path (Ordered.sort K) (@ord K) k' (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@SerTop.key K V) (ins' k2 v s)))) *) by rewrite H2 IH //; move: (total k2 k'); rewrite H4 H5. Qed. Lemma sorted_ins' s k v : sorted ord (map key s) -> sorted ord (map key (ins' k v s)). Proof. (* Goal: forall _ : is_true (@sorted (Ordered.eqType K) (@ord K) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@SerTop.key K V) s)), is_true (@sorted (Ordered.eqType K) (@ord K) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@SerTop.key K V) (ins' k v s))) *) case: s=>// [[k' v']] s /= H. (* Goal: is_true (@sorted (Ordered.eqType K) (@ord K) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@SerTop.key K V) (if @ord K k k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') s) else if @eq_op (Ordered.eqType K) k k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (ins' k v s)))) *) case: ifP=>//= H1; first by rewrite H H1. (* Goal: is_true (@sorted (Ordered.eqType K) (@ord K) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@SerTop.key K V) (if @eq_op (Ordered.eqType K) k k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (ins' k v s)))) *) case: ifP=>//= H2; first by rewrite (eqP H2). (* Goal: is_true (@path (Ordered.sort K) (@ord K) k' (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@SerTop.key K V) (ins' k v s))) *) by rewrite path_ins' //; move: (total k k'); rewrite H1 H2. Qed. Definition ins k v s := let: FinMap s' p' := s in FinMap (sorted_ins' k v p'). Lemma sorted_filter k s : sorted ord (map key s) -> sorted ord (map key (filter (predCk k) s)). Proof. (* Goal: forall _ : is_true (@sorted (Ordered.eqType K) (@ord K) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@SerTop.key K V) s)), is_true (@sorted (Ordered.eqType K) (@ord K) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@SerTop.key K V) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@SerTop.predCk K V k)) s))) *) by move=>H; rewrite -filter_map sorted_filter //; apply: trans. Qed. Definition rem k s := let: FinMap s' p' := s in FinMap (sorted_filter k p'). Definition supp s := map key (seq_of s). End Ops. Prenex Implicits fnd ins rem supp. Section Laws. Variables (K : ordType) (V : Type). Notation fmap := (finMap K V). Notation nil := (nil K V). Lemma ord_path (x y : K) s : ord x y -> path ord y s -> path ord x s. Proof. (* Goal: forall (_ : is_true (@ord K x y)) (_ : is_true (@path (Ordered.sort K) (@ord K) y s)), is_true (@path (Ordered.sort K) (@ord K) x s) *) elim: s x y=>[|k s IH] x y //=. (* Goal: forall (_ : is_true (@ord K x y)) (_ : is_true (andb (@ord K y k) (@path (Ordered.sort K) (@ord K) k s))), is_true (andb (@ord K x k) (@path (Ordered.sort K) (@ord K) k s)) *) by move=>H1; case/andP=>H2 ->; rewrite (trans H1 H2). Qed. Lemma last_ins' (x : K) (v : V) s : path ord x (map key s) -> ins' x v s = (x, v) :: s. Proof. (* Goal: forall _ : is_true (@path (Ordered.sort K) (@ord K) x (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s)), @eq (list (prod (Ordered.sort K) V)) (@ins' K V x v s) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) s) *) by elim: s=>[|[k1 v1] s IH] //=; case: ifP. Qed. Lemma notin_path (x : K) s : path ord x s -> x \notin s. Proof. (* Goal: forall _ : is_true (@path (Ordered.sort K) (@ord K) x s), is_true (negb (@in_mem (Ordered.sort K) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) s))) *) elim: s=>[|k s IH] //=. (* Goal: forall _ : is_true (andb (@ord K x k) (@path (Ordered.sort K) (@ord K) k s)), is_true (negb (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k s)))) *) rewrite inE negb_or; case/andP=>T1 T2; case: eqP=>H /=. (* Goal: is_true (negb (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) s))) *) (* Goal: is_true false *) - (* Goal: is_true (negb (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) s))) *) (* Goal: is_true false *) by rewrite H irr in T1. (* Goal: is_true (negb (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) s))) *) by apply: IH; apply: ord_path T2. Qed. Lemma path_supp_ord (s : fmap) k : path ord k (supp s) -> forall m, m \in supp s -> ord k m. Proof. (* Goal: forall (_ : is_true (@path (Ordered.sort K) (@ord K) k (@supp K V s))) (m : Equality.sort (Ordered.eqType K)) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) m (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s)))), is_true (@ord K k m) *) case: s=>s H; rewrite /supp /= => H1 m H2; case: totalP H1 H2=>//. (* Goal: forall (_ : is_true (@eq_op (Ordered.eqType K) m k)) (_ : is_true (@path (Ordered.sort K) (@ord K) k (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s))) (_ : is_true (@in_mem (Ordered.sort K) m (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s)))), is_true false *) (* Goal: forall (_ : is_true (@ord K m k)) (_ : is_true (@path (Ordered.sort K) (@ord K) k (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s))) (_ : is_true (@in_mem (Ordered.sort K) m (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s)))), is_true false *) - (* Goal: forall (_ : is_true (@eq_op (Ordered.eqType K) m k)) (_ : is_true (@path (Ordered.sort K) (@ord K) k (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s))) (_ : is_true (@in_mem (Ordered.sort K) m (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s)))), is_true false *) (* Goal: forall (_ : is_true (@ord K m k)) (_ : is_true (@path (Ordered.sort K) (@ord K) k (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s))) (_ : is_true (@in_mem (Ordered.sort K) m (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s)))), is_true false *) by move=>H1 H2; move: (notin_path (ord_path H1 H2)); case: (m \in _). (* Goal: forall (_ : is_true (@eq_op (Ordered.eqType K) m k)) (_ : is_true (@path (Ordered.sort K) (@ord K) k (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s))) (_ : is_true (@in_mem (Ordered.sort K) m (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s)))), is_true false *) by move/eqP=>->; move/notin_path; case: (k \in _). Qed. Lemma notin_filter (x : K) s : x \notin (map key s) -> filter (predk V x) s = [::]. Proof. (* Goal: forall _ : is_true (negb (@in_mem (Ordered.sort K) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s)))), @eq (list (prod (Ordered.sort K) V)) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V x)) s) (@Datatypes.nil (prod (Ordered.sort K) V)) *) elim: s=>[|[k v] s IH] //=. (* Goal: forall _ : is_true (negb (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s))))), @eq (list (prod (Ordered.sort K) V)) (if @eq_op (Ordered.eqType K) k x then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V x)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V x)) s) (@Datatypes.nil (prod (Ordered.sort K) V)) *) rewrite inE negb_or; case/andP=>H1 H2. (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @eq_op (Ordered.eqType K) k x then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V x)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V x)) s) (@Datatypes.nil (prod (Ordered.sort K) V)) *) by rewrite eq_sym (negbTE H1); apply: IH. Qed. Lemma fmapP (s1 s2 : fmap) : (forall k, fnd k s1 = fnd k s2) -> s1 = s2. Proof. (* Goal: forall _ : forall k : Equality.sort (Ordered.eqType K), @eq (option V) (@fnd K V k s1) (@fnd K V k s2), @eq (finMap K V) s1 s2 *) rewrite /fnd; move: s1 s2 => [s1 P1][s2 P2] H; rewrite fmapE /=. (* Goal: @eq (list (prod (Ordered.sort K) V)) s1 s2 *) elim: s1 P1 s2 P2 H=>[|[k v] s1 IH] /= P1. (* Goal: forall (s2 : list (prod (Ordered.sort K) V)) (_ : is_true (@sorted (Ordered.eqType K) (@ord K) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2))) (_ : forall k0 : Ordered.sort K, @eq (option V) match (if @eq_op (Ordered.eqType K) k k0 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k0)) s1) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k0)) s1) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end match @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k0)) s2 with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end), @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s1) s2 *) (* Goal: forall (s2 : list (prod (Ordered.sort K) V)) (_ : is_true (@sorted (Ordered.eqType K) (@ord K) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2))) (_ : forall k : Ordered.sort K, @eq (option V) (@None V) match @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k)) s2 with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end), @eq (list (prod (Ordered.sort K) V)) (@Datatypes.nil (prod (Ordered.sort K) V)) s2 *) - (* Goal: forall (s2 : list (prod (Ordered.sort K) V)) (_ : is_true (@sorted (Ordered.eqType K) (@ord K) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2))) (_ : forall k0 : Ordered.sort K, @eq (option V) match (if @eq_op (Ordered.eqType K) k k0 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k0)) s1) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k0)) s1) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end match @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k0)) s2 with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end), @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s1) s2 *) (* Goal: forall (s2 : list (prod (Ordered.sort K) V)) (_ : is_true (@sorted (Ordered.eqType K) (@ord K) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2))) (_ : forall k : Ordered.sort K, @eq (option V) (@None V) match @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k)) s2 with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end), @eq (list (prod (Ordered.sort K) V)) (@Datatypes.nil (prod (Ordered.sort K) V)) s2 *) by case=>[|[k2 v2] s2 P2] //=; move/(_ k2); rewrite eq_refl. (* Goal: forall (s2 : list (prod (Ordered.sort K) V)) (_ : is_true (@sorted (Ordered.eqType K) (@ord K) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2))) (_ : forall k0 : Ordered.sort K, @eq (option V) match (if @eq_op (Ordered.eqType K) k k0 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k0)) s1) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k0)) s1) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end match @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k0)) s2 with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end), @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s1) s2 *) have S1: sorted ord (map key s1) by apply: path_sorted P1. (* Goal: forall (s2 : list (prod (Ordered.sort K) V)) (_ : is_true (@sorted (Ordered.eqType K) (@ord K) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2))) (_ : forall k0 : Ordered.sort K, @eq (option V) match (if @eq_op (Ordered.eqType K) k k0 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k0)) s1) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k0)) s1) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end match @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k0)) s2 with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end), @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s1) s2 *) case=>[|[k2 v2] s2] /= P2; first by move/(_ k); rewrite eq_refl. (* Goal: forall _ : forall k0 : Ordered.sort K, @eq (option V) match (if @eq_op (Ordered.eqType K) k k0 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k0)) s1) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k0)) s1) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end match (if @eq_op (Ordered.eqType K) k2 k0 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k0)) s2) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k0)) s2) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end, @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s2) *) have S2: sorted ord (map key s2) by apply: path_sorted P2. (* Goal: forall _ : forall k0 : Ordered.sort K, @eq (option V) match (if @eq_op (Ordered.eqType K) k k0 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k0)) s1) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k0)) s1) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end match (if @eq_op (Ordered.eqType K) k2 k0 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k0)) s2) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k0)) s2) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end, @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s2) *) move: (IH S1 s2 S2)=>{IH} /= IH H. (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s2) *) move: (notin_path P1) (notin_path P2)=>N1 N2. (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s2) *) case E: (k == k2). (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s2) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s2) *) - (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s2) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s2) *) rewrite -{k2 E}(eqP E) in P2 H N2 *. move: (H k); rewrite eq_refl=>[[E2]]; rewrite -E2 {v2 E2} in H *. rewrite IH // => k'. case E: (k == k'); first by rewrite -(eqP E) !notin_filter. by move: (H k'); rewrite E. move: (H k); rewrite eq_refl eq_sym E notin_filter //. move: (total k k2); rewrite E /=; case/orP=>L1. (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s2) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s2) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s2) *) - (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s2) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s2) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s2) *) by apply: notin_path; apply: ord_path P2. move: (H k2); rewrite E eq_refl notin_filter //. by apply: notin_path; apply: ord_path P1. Qed. Qed. Lemma predkN (k1 k2 : K) : predI (predk V k1) (predCk V k2) =1 if k1 == k2 then pred0 else predk V k1. Proof. (* Goal: @eqfun bool (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predI (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k2)))) (@pred_of_simpl (prod (Ordered.sort K) V) (if @eq_op (Ordered.eqType K) k1 k2 then @pred0 (prod (Ordered.sort K) V) else @predk K V k1)) *) by move=>x; case: ifP=>H /=; [|case: eqP=>//->]; rewrite ?(eqP H) ?andbN ?H. Qed. CoInductive supp_spec x (s : fmap) : bool -> Type := | supp_spec_some v of fnd x s = Some v : supp_spec x s true | supp_spec_none of fnd x s = None : supp_spec x s false. Lemma suppP x (s : fmap) : supp_spec x s (x \in supp s). Lemma supp_nilE (s : fmap) : (supp s = [::]) <-> (s = nil). Proof. (* Goal: iff (@eq (list (Ordered.sort K)) (@supp K V s) (@Datatypes.nil (Ordered.sort K))) (@eq (finMap K V) s (SerTop.nil K V)) *) by split=>[|-> //]; case: s; case=>// H; rewrite fmapE. Qed. Lemma supp_rem k (s : fmap) : supp (rem k s) =i predI (predC1 k) (mem (supp s)). Proof. (* Goal: @eq_mem (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@rem K V k s))) (@mem (Equality.sort (Ordered.eqType K)) (simplPredType (Equality.sort (Ordered.eqType K))) (@predI (Equality.sort (Ordered.eqType K)) (@pred_of_simpl (Equality.sort (Ordered.eqType K)) (@predC1 (Ordered.eqType K) k)) (@pred_of_simpl (Equality.sort (Ordered.eqType K)) (@pred_of_mem_pred (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s)))))) *) case: s => s H1 x; rewrite /supp inE /=. (* Goal: @eq bool (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k)) s)))) (andb (negb (@eq_op (Ordered.eqType K) x k)) (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s)))) *) by case H2: (x == k)=>/=; rewrite -filter_map mem_filter /= H2. Qed. Lemma supp_ins k v (s : fmap) : supp (ins k v s) =i predU (pred1 k) (mem (supp s)). Proof. (* Goal: @eq_mem (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k v s))) (@mem (Equality.sort (Ordered.eqType K)) (simplPredType (Equality.sort (Ordered.eqType K))) (@predU (Equality.sort (Ordered.eqType K)) (@pred_of_simpl (Equality.sort (Ordered.eqType K)) (@pred1 (Ordered.eqType K) k)) (@pred_of_simpl (Equality.sort (Ordered.eqType K)) (@pred_of_mem_pred (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s)))))) *) case: s => s H x; rewrite /supp inE /=. (* Goal: @eq bool (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) (@ins' K V k v s)))) (orb (@eq_op (Ordered.eqType K) x k) (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s)))) *) elim: s x k v H=>[|[k1 v1] s IH] //= x k v H. (* Goal: @eq bool (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) (if @ord K k k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s) else if @eq_op (Ordered.eqType K) k k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k v s))))) (orb (@eq_op (Ordered.eqType K) x k) (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s))))) *) case: ifP=>H1 /=; first by rewrite inE. (* Goal: @eq bool (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) (if @eq_op (Ordered.eqType K) k k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k v s))))) (orb (@eq_op (Ordered.eqType K) x k) (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s))))) *) case: ifP=>H2 /=; first by rewrite !inE (eqP H2) orbA orbb. (* Goal: @eq bool (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) (@ins' K V k v s))))) (orb (@eq_op (Ordered.eqType K) x k) (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s))))) *) by rewrite !inE (IH _ _ _ (path_sorted H)) orbCA. Qed. Lemma fnd_rem k1 k2 (s : fmap) : fnd k1 (rem k2 s) = if k1 == k2 then None else fnd k1 s. Proof. (* Goal: @eq (option V) (@fnd K V k1 (@rem K V k2 s)) (if @eq_op (Ordered.eqType K) k1 k2 then @None V else @fnd K V k1 s) *) case: s => s H; rewrite /fnd -filter_predI (eq_filter (predkN k1 k2)). (* Goal: @eq (option V) match @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (if @eq_op (Ordered.eqType K) k1 k2 then @pred0 (prod (Ordered.sort K) V) else @predk K V k1)) s with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (if @eq_op (Ordered.eqType K) k1 k2 then @None V else match @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) (@seq_of K V (@FinMap K V s H)) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end) *) by case: eqP=>//; rewrite filter_pred0. Qed. Lemma fnd_ins k1 k2 v (s : fmap) : fnd k1 (ins k2 v s) = if k1 == k2 then Some v else fnd k1 s. Proof. (* Goal: @eq (option V) (@fnd K V k1 (@ins K V k2 v s)) (if @eq_op (Ordered.eqType K) k1 k2 then @Some V v else @fnd K V k1 s) *) case: s => s H; rewrite /fnd /=. (* Goal: @eq (option V) match @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) (@ins' K V k2 v s) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (if @eq_op (Ordered.eqType K) k1 k2 then @Some V v else match @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end) *) elim: s k1 k2 v H=>[|[k' v'] s IH] //= k1 k2 v H. (* Goal: @eq (option V) match @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) (if @ord K k2 k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') s) else if @eq_op (Ordered.eqType K) k2 k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@ins' K V k2 v s)) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (if @eq_op (Ordered.eqType K) k1 k2 then @Some V v else match (if @eq_op (Ordered.eqType K) k' k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end) *) (* Goal: @eq (option V) match (if @eq_op (Ordered.eqType K) k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (@Datatypes.nil (prod (Ordered.sort K) V)) else @Datatypes.nil (prod (Ordered.sort K) V)) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (if @eq_op (Ordered.eqType K) k1 k2 then @Some V v else @None V) *) - (* Goal: @eq (option V) match @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) (if @ord K k2 k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') s) else if @eq_op (Ordered.eqType K) k2 k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@ins' K V k2 v s)) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (if @eq_op (Ordered.eqType K) k1 k2 then @Some V v else match (if @eq_op (Ordered.eqType K) k' k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end) *) (* Goal: @eq (option V) match (if @eq_op (Ordered.eqType K) k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (@Datatypes.nil (prod (Ordered.sort K) V)) else @Datatypes.nil (prod (Ordered.sort K) V)) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (if @eq_op (Ordered.eqType K) k1 k2 then @Some V v else @None V) *) by case: ifP=>H1; [rewrite (eqP H1) eq_refl | rewrite eq_sym H1]. (* Goal: @eq (option V) match @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) (if @ord K k2 k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') s) else if @eq_op (Ordered.eqType K) k2 k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@ins' K V k2 v s)) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (if @eq_op (Ordered.eqType K) k1 k2 then @Some V v else match (if @eq_op (Ordered.eqType K) k' k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end) *) case: ifP=>H1 /=. (* Goal: @eq (option V) match @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) (if @eq_op (Ordered.eqType K) k2 k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@ins' K V k2 v s)) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (if @eq_op (Ordered.eqType K) k1 k2 then @Some V v else match (if @eq_op (Ordered.eqType K) k' k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end) *) (* Goal: @eq (option V) match (if @eq_op (Ordered.eqType K) k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (if @eq_op (Ordered.eqType K) k' k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) else if @eq_op (Ordered.eqType K) k' k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (if @eq_op (Ordered.eqType K) k1 k2 then @Some V v else match (if @eq_op (Ordered.eqType K) k' k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end) *) - (* Goal: @eq (option V) match @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) (if @eq_op (Ordered.eqType K) k2 k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@ins' K V k2 v s)) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (if @eq_op (Ordered.eqType K) k1 k2 then @Some V v else match (if @eq_op (Ordered.eqType K) k' k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end) *) (* Goal: @eq (option V) match (if @eq_op (Ordered.eqType K) k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (if @eq_op (Ordered.eqType K) k' k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) else if @eq_op (Ordered.eqType K) k' k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (if @eq_op (Ordered.eqType K) k1 k2 then @Some V v else match (if @eq_op (Ordered.eqType K) k' k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end) *) by case: ifP=>H2; [rewrite (eqP H2) eq_refl | rewrite (eq_sym k1) H2]. (* Goal: @eq (option V) match @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) (if @eq_op (Ordered.eqType K) k2 k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@ins' K V k2 v s)) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (if @eq_op (Ordered.eqType K) k1 k2 then @Some V v else match (if @eq_op (Ordered.eqType K) k' k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end) *) case: ifP=>H2 /=. (* Goal: @eq (option V) match (if @eq_op (Ordered.eqType K) k' k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) (@ins' K V k2 v s)) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) (@ins' K V k2 v s)) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (if @eq_op (Ordered.eqType K) k1 k2 then @Some V v else match (if @eq_op (Ordered.eqType K) k' k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end) *) (* Goal: @eq (option V) match (if @eq_op (Ordered.eqType K) k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (if @eq_op (Ordered.eqType K) k1 k2 then @Some V v else match (if @eq_op (Ordered.eqType K) k' k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end) *) - (* Goal: @eq (option V) match (if @eq_op (Ordered.eqType K) k' k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) (@ins' K V k2 v s)) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) (@ins' K V k2 v s)) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (if @eq_op (Ordered.eqType K) k1 k2 then @Some V v else match (if @eq_op (Ordered.eqType K) k' k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end) *) (* Goal: @eq (option V) match (if @eq_op (Ordered.eqType K) k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (if @eq_op (Ordered.eqType K) k1 k2 then @Some V v else match (if @eq_op (Ordered.eqType K) k' k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end) *) rewrite (eqP H2). (* Goal: @eq (option V) match (if @eq_op (Ordered.eqType K) k' k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) (@ins' K V k2 v s)) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) (@ins' K V k2 v s)) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (if @eq_op (Ordered.eqType K) k1 k2 then @Some V v else match (if @eq_op (Ordered.eqType K) k' k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end) *) (* Goal: @eq (option V) match (if @eq_op (Ordered.eqType K) k' k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (if @eq_op (Ordered.eqType K) k1 k' then @Some V v else match (if @eq_op (Ordered.eqType K) k' k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end) *) by case: ifP=>H3; [rewrite (eqP H3) eq_refl | rewrite eq_sym H3]. (* Goal: @eq (option V) match (if @eq_op (Ordered.eqType K) k' k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) (@ins' K V k2 v s)) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) (@ins' K V k2 v s)) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (if @eq_op (Ordered.eqType K) k1 k2 then @Some V v else match (if @eq_op (Ordered.eqType K) k' k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end) *) case: ifP=>H3; first by rewrite -(eqP H3) eq_sym H2. (* Goal: @eq (option V) match @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) (@ins' K V k2 v s) with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end (if @eq_op (Ordered.eqType K) k1 k2 then @Some V v else match @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predk K V k1)) s with | Datatypes.nil => @None V | cons (pair s v as p) l => @Some V v end) *) by apply: IH; apply: path_sorted H. Qed. Lemma ins_rem k1 k2 v (s : fmap) : ins k1 v (rem k2 s) = if k1 == k2 then ins k1 v s else rem k2 (ins k1 v s). Proof. (* Goal: @eq (finMap K V) (@ins K V k1 v (@rem K V k2 s)) (if @eq_op (Ordered.eqType K) k1 k2 then @ins K V k1 v s else @rem K V k2 (@ins K V k1 v s)) *) move: k1 k2 v s. (* Goal: forall (k1 : Ordered.sort K) (k2 : Equality.sort (Ordered.eqType K)) (v : V) (s : finMap K V), @eq (finMap K V) (@ins K V k1 v (@rem K V k2 s)) (if @eq_op (Ordered.eqType K) k1 k2 then @ins K V k1 v s else @rem K V k2 (@ins K V k1 v s)) *) have L3: forall (x : K) s, path ord x (map key s) -> filter (predCk V x) s = s. (* Goal: forall (k1 : Ordered.sort K) (k2 : Equality.sort (Ordered.eqType K)) (v : V) (s : finMap K V), @eq (finMap K V) (@ins K V k1 v (@rem K V k2 s)) (if @eq_op (Ordered.eqType K) k1 k2 then @ins K V k1 v s else @rem K V k2 (@ins K V k1 v s)) *) (* Goal: forall (x : Ordered.sort K) (s : list (prod (Ordered.sort K) V)) (_ : is_true (@path (Ordered.sort K) (@ord K) x (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s))), @eq (list (prod (Ordered.sort K) V)) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s) s *) - (* Goal: forall (k1 : Ordered.sort K) (k2 : Equality.sort (Ordered.eqType K)) (v : V) (s : finMap K V), @eq (finMap K V) (@ins K V k1 v (@rem K V k2 s)) (if @eq_op (Ordered.eqType K) k1 k2 then @ins K V k1 v s else @rem K V k2 (@ins K V k1 v s)) *) (* Goal: forall (x : Ordered.sort K) (s : list (prod (Ordered.sort K) V)) (_ : is_true (@path (Ordered.sort K) (@ord K) x (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s))), @eq (list (prod (Ordered.sort K) V)) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s) s *) move=>x t; move/notin_path; elim: t=>[|[k3 v3] t IH] //=. (* Goal: forall (k1 : Ordered.sort K) (k2 : Equality.sort (Ordered.eqType K)) (v : V) (s : finMap K V), @eq (finMap K V) (@ins K V k1 v (@rem K V k2 s)) (if @eq_op (Ordered.eqType K) k1 k2 then @ins K V k1 v s else @rem K V k2 (@ins K V k1 v s)) *) (* Goal: forall _ : is_true (negb (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k3 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) t))))), @eq (list (prod (Ordered.sort K) V)) (if negb (@eq_op (Ordered.eqType K) k3 x) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) t) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) t) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) t) *) rewrite inE negb_or; case/andP=>T1 T2. (* Goal: forall (k1 : Ordered.sort K) (k2 : Equality.sort (Ordered.eqType K)) (v : V) (s : finMap K V), @eq (finMap K V) (@ins K V k1 v (@rem K V k2 s)) (if @eq_op (Ordered.eqType K) k1 k2 then @ins K V k1 v s else @rem K V k2 (@ins K V k1 v s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if negb (@eq_op (Ordered.eqType K) k3 x) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) t) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) t) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) t) *) by rewrite eq_sym T1 IH. (* Goal: forall (k1 : Ordered.sort K) (k2 : Equality.sort (Ordered.eqType K)) (v : V) (s : finMap K V), @eq (finMap K V) (@ins K V k1 v (@rem K V k2 s)) (if @eq_op (Ordered.eqType K) k1 k2 then @ins K V k1 v s else @rem K V k2 (@ins K V k1 v s)) *) have L5: forall (x : K) (v : V) s, sorted ord (map key s) -> ins' x v (filter (predCk V x) s) = ins' x v s. (* Goal: forall (k1 : Ordered.sort K) (k2 : Equality.sort (Ordered.eqType K)) (v : V) (s : finMap K V), @eq (finMap K V) (@ins K V k1 v (@rem K V k2 s)) (if @eq_op (Ordered.eqType K) k1 k2 then @ins K V k1 v s else @rem K V k2 (@ins K V k1 v s)) *) (* Goal: forall (x : Ordered.sort K) (v : V) (s : list (prod (Ordered.sort K) V)) (_ : is_true (@sorted (Ordered.eqType K) (@ord K) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s))), @eq (list (prod (Ordered.sort K) V)) (@ins' K V x v (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s)) (@ins' K V x v s) *) - (* Goal: forall (k1 : Ordered.sort K) (k2 : Equality.sort (Ordered.eqType K)) (v : V) (s : finMap K V), @eq (finMap K V) (@ins K V k1 v (@rem K V k2 s)) (if @eq_op (Ordered.eqType K) k1 k2 then @ins K V k1 v s else @rem K V k2 (@ins K V k1 v s)) *) (* Goal: forall (x : Ordered.sort K) (v : V) (s : list (prod (Ordered.sort K) V)) (_ : is_true (@sorted (Ordered.eqType K) (@ord K) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s))), @eq (list (prod (Ordered.sort K) V)) (@ins' K V x v (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s)) (@ins' K V x v s) *) move=>x v s; elim: s x v=>[|[k' v'] s IH] x v //= H. (* Goal: forall (k1 : Ordered.sort K) (k2 : Equality.sort (Ordered.eqType K)) (v : V) (s : finMap K V), @eq (finMap K V) (@ins K V k1 v (@rem K V k2 s)) (if @eq_op (Ordered.eqType K) k1 k2 then @ins K V k1 v s else @rem K V k2 (@ins K V k1 v s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@ins' K V x v (if negb (@eq_op (Ordered.eqType K) k' x) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s)) (if @ord K x k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') s) else if @eq_op (Ordered.eqType K) x k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@ins' K V x v s)) *) case H1: (ord x k'). (* Goal: forall (k1 : Ordered.sort K) (k2 : Equality.sort (Ordered.eqType K)) (v : V) (s : finMap K V), @eq (finMap K V) (@ins K V k1 v (@rem K V k2 s)) (if @eq_op (Ordered.eqType K) k1 k2 then @ins K V k1 v s else @rem K V k2 (@ins K V k1 v s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@ins' K V x v (if negb (@eq_op (Ordered.eqType K) k' x) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s)) (if @eq_op (Ordered.eqType K) x k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@ins' K V x v s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@ins' K V x v (if negb (@eq_op (Ordered.eqType K) k' x) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') s)) *) - (* Goal: forall (k1 : Ordered.sort K) (k2 : Equality.sort (Ordered.eqType K)) (v : V) (s : finMap K V), @eq (finMap K V) (@ins K V k1 v (@rem K V k2 s)) (if @eq_op (Ordered.eqType K) k1 k2 then @ins K V k1 v s else @rem K V k2 (@ins K V k1 v s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@ins' K V x v (if negb (@eq_op (Ordered.eqType K) k' x) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s)) (if @eq_op (Ordered.eqType K) x k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@ins' K V x v s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@ins' K V x v (if negb (@eq_op (Ordered.eqType K) k' x) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') s)) *) case H2: (k' == x)=>/=; first by rewrite (eqP H2) irr in H1. (* Goal: forall (k1 : Ordered.sort K) (k2 : Equality.sort (Ordered.eqType K)) (v : V) (s : finMap K V), @eq (finMap K V) (@ins K V k1 v (@rem K V k2 s)) (if @eq_op (Ordered.eqType K) k1 k2 then @ins K V k1 v s else @rem K V k2 (@ins K V k1 v s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@ins' K V x v (if negb (@eq_op (Ordered.eqType K) k' x) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s)) (if @eq_op (Ordered.eqType K) x k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@ins' K V x v s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K x k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s)) else if @eq_op (Ordered.eqType K) x k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@ins' K V x v (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s))) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') s)) *) by rewrite H1 L3 //; apply: ord_path H1 H. (* Goal: forall (k1 : Ordered.sort K) (k2 : Equality.sort (Ordered.eqType K)) (v : V) (s : finMap K V), @eq (finMap K V) (@ins K V k1 v (@rem K V k2 s)) (if @eq_op (Ordered.eqType K) k1 k2 then @ins K V k1 v s else @rem K V k2 (@ins K V k1 v s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@ins' K V x v (if negb (@eq_op (Ordered.eqType K) k' x) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s)) (if @eq_op (Ordered.eqType K) x k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@ins' K V x v s)) *) case H2: (k' == x)=>/=. (* Goal: forall (k1 : Ordered.sort K) (k2 : Equality.sort (Ordered.eqType K)) (v : V) (s : finMap K V), @eq (finMap K V) (@ins K V k1 v (@rem K V k2 s)) (if @eq_op (Ordered.eqType K) k1 k2 then @ins K V k1 v s else @rem K V k2 (@ins K V k1 v s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K x k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s)) else if @eq_op (Ordered.eqType K) x k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@ins' K V x v (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s))) (if @eq_op (Ordered.eqType K) x k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@ins' K V x v s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@ins' K V x v (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s)) (if @eq_op (Ordered.eqType K) x k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@ins' K V x v s)) *) - (* Goal: forall (k1 : Ordered.sort K) (k2 : Equality.sort (Ordered.eqType K)) (v : V) (s : finMap K V), @eq (finMap K V) (@ins K V k1 v (@rem K V k2 s)) (if @eq_op (Ordered.eqType K) k1 k2 then @ins K V k1 v s else @rem K V k2 (@ins K V k1 v s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K x k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s)) else if @eq_op (Ordered.eqType K) x k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@ins' K V x v (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s))) (if @eq_op (Ordered.eqType K) x k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@ins' K V x v s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@ins' K V x v (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s)) (if @eq_op (Ordered.eqType K) x k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@ins' K V x v s)) *) rewrite (eqP H2) eq_refl in H *. by rewrite L3 //; apply: last_ins' H. rewrite eq_sym H2 H1 IH //. by apply: path_sorted H. move=>k1 k2 v [s H]. case: ifP=>H1; rewrite /ins /rem fmapE /=. - (* Goal: forall (k1 : Ordered.sort K) (k2 : Equality.sort (Ordered.eqType K)) (v : V) (s : finMap K V), @eq (finMap K V) (@ins K V k1 v (@rem K V k2 s)) (if @eq_op (Ordered.eqType K) k1 k2 then @ins K V k1 v s else @rem K V k2 (@ins K V k1 v s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K x k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s)) else if @eq_op (Ordered.eqType K) x k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@ins' K V x v (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s))) (if @eq_op (Ordered.eqType K) x k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@ins' K V x v s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@ins' K V x v (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s)) (if @eq_op (Ordered.eqType K) x k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@ins' K V x v s)) *) rewrite {k1 H1}(eqP H1). elim: s k2 v H=>[|[k' v'] s IH] //= k2 v H. case H1: (k' == k2)=>/=. - (* Goal: forall (k1 : Ordered.sort K) (k2 : Equality.sort (Ordered.eqType K)) (v : V) (s : finMap K V), @eq (finMap K V) (@ins K V k1 v (@rem K V k2 s)) (if @eq_op (Ordered.eqType K) k1 k2 then @ins K V k1 v s else @rem K V k2 (@ins K V k1 v s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K x k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s)) else if @eq_op (Ordered.eqType K) x k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@ins' K V x v (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s))) (if @eq_op (Ordered.eqType K) x k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@ins' K V x v s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@ins' K V x v (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s)) (if @eq_op (Ordered.eqType K) x k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@ins' K V x v s)) *) rewrite eq_sym H1 (eqP H1) irr in H *. by rewrite L3 // last_ins'. rewrite eq_sym H1; case: ifP=>H3. - (* Goal: forall (k1 : Ordered.sort K) (k2 : Equality.sort (Ordered.eqType K)) (v : V) (s : finMap K V), @eq (finMap K V) (@ins K V k1 v (@rem K V k2 s)) (if @eq_op (Ordered.eqType K) k1 k2 then @ins K V k1 v s else @rem K V k2 (@ins K V k1 v s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K x k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s)) else if @eq_op (Ordered.eqType K) x k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@ins' K V x v (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s))) (if @eq_op (Ordered.eqType K) x k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@ins' K V x v s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@ins' K V x v (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s)) (if @eq_op (Ordered.eqType K) x k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@ins' K V x v s)) *) by rewrite L3 //; apply: ord_path H3 H. by rewrite L5 //; apply: path_sorted H. elim: s k1 k2 H1 H=>[|[k' v'] s IH] //= k1 k2 H1 H; first by rewrite H1. case H2: (k' == k2)=>/=. - (* Goal: forall (k1 : Ordered.sort K) (k2 : Equality.sort (Ordered.eqType K)) (v : V) (s : finMap K V), @eq (finMap K V) (@ins K V k1 v (@rem K V k2 s)) (if @eq_op (Ordered.eqType K) k1 k2 then @ins K V k1 v s else @rem K V k2 (@ins K V k1 v s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K x k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s)) else if @eq_op (Ordered.eqType K) x k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@ins' K V x v (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s))) (if @eq_op (Ordered.eqType K) x k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@ins' K V x v s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@ins' K V x v (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s)) (if @eq_op (Ordered.eqType K) x k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@ins' K V x v s)) *) rewrite (eqP H2) in H *; rewrite H1. case H3: (ord k1 k2)=>/=. - (* Goal: forall (k1 : Ordered.sort K) (k2 : Equality.sort (Ordered.eqType K)) (v : V) (s : finMap K V), @eq (finMap K V) (@ins K V k1 v (@rem K V k2 s)) (if @eq_op (Ordered.eqType K) k1 k2 then @ins K V k1 v s else @rem K V k2 (@ins K V k1 v s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K x k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s)) else if @eq_op (Ordered.eqType K) x k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@ins' K V x v (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s))) (if @eq_op (Ordered.eqType K) x k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@ins' K V x v s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@ins' K V x v (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V x)) s)) (if @eq_op (Ordered.eqType K) x k' then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V x v) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k' v') (@ins' K V x v s)) *) by rewrite H1 eq_refl /= last_ins' // L3 //; apply: ord_path H. by rewrite eq_refl /= IH //; apply: path_sorted H. case H3: (ord k1 k')=>/=; first by rewrite H1 H2. case H4: (k1 == k')=>/=; first by rewrite H1. by rewrite H2 IH //; apply: path_sorted H. Qed. Qed. Lemma ins_ins k1 k2 v1 v2 (s : fmap) : ins k1 v1 (ins k2 v2 s) = if k1 == k2 then ins k1 v1 s else ins k2 v2 (ins k1 v1 s). Proof. (* Goal: @eq (finMap K V) (@ins K V k1 v1 (@ins K V k2 v2 s)) (if @eq_op (Ordered.eqType K) k1 k2 then @ins K V k1 v1 s else @ins K V k2 v2 (@ins K V k1 v1 s)) *) rewrite /ins; case: s => s H; case H1: (k1 == k2); rewrite fmapE /=. (* Goal: @eq (list (prod (Ordered.sort K) V)) (@ins' K V k1 v1 (@ins' K V k2 v2 s)) (@ins' K V k2 v2 (@ins' K V k1 v1 s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@ins' K V k1 v1 (@ins' K V k2 v2 s)) (@ins' K V k1 v1 s) *) - (* Goal: @eq (list (prod (Ordered.sort K) V)) (@ins' K V k1 v1 (@ins' K V k2 v2 s)) (@ins' K V k2 v2 (@ins' K V k1 v1 s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@ins' K V k1 v1 (@ins' K V k2 v2 s)) (@ins' K V k1 v1 s) *) rewrite (eqP H1) {H1}. (* Goal: @eq (list (prod (Ordered.sort K) V)) (@ins' K V k1 v1 (@ins' K V k2 v2 s)) (@ins' K V k2 v2 (@ins' K V k1 v1 s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@ins' K V k2 v1 (@ins' K V k2 v2 s)) (@ins' K V k2 v1 s) *) elim: s H k2 v1 v2=>[|[k3 v3] s IH] /= H k2 v1 v2; first by rewrite irr eq_refl. (* Goal: @eq (list (prod (Ordered.sort K) V)) (@ins' K V k1 v1 (@ins' K V k2 v2 s)) (@ins' K V k2 v2 (@ins' K V k1 v1 s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@ins' K V k2 v1 (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 s))) (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v1 s)) *) case: (totalP k2 k3)=>H1 /=; rewrite ?irr ?eq_refl //. (* Goal: @eq (list (prod (Ordered.sort K) V)) (@ins' K V k1 v1 (@ins' K V k2 v2 s)) (@ins' K V k2 v2 (@ins' K V k1 v1 s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 s)) else if @eq_op (Ordered.eqType K) k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v1) (@ins' K V k2 v2 s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v1 (@ins' K V k2 v2 s))) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v1 s)) *) case: (totalP k2 k3) H1=>H2 _ //. (* Goal: @eq (list (prod (Ordered.sort K) V)) (@ins' K V k1 v1 (@ins' K V k2 v2 s)) (@ins' K V k2 v2 (@ins' K V k1 v1 s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v1 (@ins' K V k2 v2 s))) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v1 s)) *) by rewrite IH //; apply: path_sorted H. (* Goal: @eq (list (prod (Ordered.sort K) V)) (@ins' K V k1 v1 (@ins' K V k2 v2 s)) (@ins' K V k2 v2 (@ins' K V k1 v1 s)) *) elim: s H k1 k2 H1 v1 v2=>[|[k3 v3] s IH] H k1 k2 H1 v1 v2 /=. (* Goal: @eq (list (prod (Ordered.sort K) V)) (@ins' K V k1 v1 (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 s))) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k1 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@Datatypes.nil (prod (Ordered.sort K) V))) else if @eq_op (Ordered.eqType K) k1 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@Datatypes.nil (prod (Ordered.sort K) V)) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@Datatypes.nil (prod (Ordered.sort K) V)))) (if @ord K k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@Datatypes.nil (prod (Ordered.sort K) V))) else if @eq_op (Ordered.eqType K) k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@Datatypes.nil (prod (Ordered.sort K) V)) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@Datatypes.nil (prod (Ordered.sort K) V)))) *) - (* Goal: @eq (list (prod (Ordered.sort K) V)) (@ins' K V k1 v1 (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 s))) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k1 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@Datatypes.nil (prod (Ordered.sort K) V))) else if @eq_op (Ordered.eqType K) k1 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@Datatypes.nil (prod (Ordered.sort K) V)) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@Datatypes.nil (prod (Ordered.sort K) V)))) (if @ord K k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@Datatypes.nil (prod (Ordered.sort K) V))) else if @eq_op (Ordered.eqType K) k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@Datatypes.nil (prod (Ordered.sort K) V)) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@Datatypes.nil (prod (Ordered.sort K) V)))) *) rewrite H1 eq_sym H1. (* Goal: @eq (list (prod (Ordered.sort K) V)) (@ins' K V k1 v1 (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 s))) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k1 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@Datatypes.nil (prod (Ordered.sort K) V))) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@Datatypes.nil (prod (Ordered.sort K) V)))) (if @ord K k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@Datatypes.nil (prod (Ordered.sort K) V))) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@Datatypes.nil (prod (Ordered.sort K) V)))) *) by case: (totalP k1 k2) H1=>H2 H1. (* Goal: @eq (list (prod (Ordered.sort K) V)) (@ins' K V k1 v1 (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 s))) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) case: (totalP k2 k3)=>H2 /=. (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 s)) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k2 v2 s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 (@ins' K V k2 v2 s))) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k1 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s) else if @eq_op (Ordered.eqType K) k1 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k1 v1 s)) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k1 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s)) else if @eq_op (Ordered.eqType K) k1 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) - (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 s)) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k2 v2 s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 (@ins' K V k2 v2 s))) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k1 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s) else if @eq_op (Ordered.eqType K) k1 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k1 v1 s)) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k1 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s)) else if @eq_op (Ordered.eqType K) k1 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) case: (totalP k1 k2) (H1)=>H3 _ //=; last first. (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 s)) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k2 v2 s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 (@ins' K V k2 v2 s))) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k1 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s) else if @eq_op (Ordered.eqType K) k1 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k1 v1 s)) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s))) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) - (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 s)) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k2 v2 s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 (@ins' K V k2 v2 s))) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k1 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s) else if @eq_op (Ordered.eqType K) k1 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k1 v1 s)) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s))) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) by case: (totalP k1 k3)=>//= H4; rewrite ?H2 ?H3. (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 s)) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k2 v2 s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 (@ins' K V k2 v2 s))) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k1 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s) else if @eq_op (Ordered.eqType K) k1 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k1 v1 s)) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s))) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) case: (totalP k1 k3)=>H4 /=. (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 s)) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k2 v2 s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 (@ins' K V k2 v2 s))) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k1 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s) else if @eq_op (Ordered.eqType K) k1 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k1 v1 s)) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s))) (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s)) else if @eq_op (Ordered.eqType K) k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k1 v1 s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s))) (if @ord K k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s) else if @eq_op (Ordered.eqType K) k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k2 v2 s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s))) (if @ord K k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s)) else if @eq_op (Ordered.eqType K) k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 s))) *) - (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 s)) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k2 v2 s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 (@ins' K V k2 v2 s))) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k1 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s) else if @eq_op (Ordered.eqType K) k1 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k1 v1 s)) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s))) (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s)) else if @eq_op (Ordered.eqType K) k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k1 v1 s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s))) (if @ord K k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s) else if @eq_op (Ordered.eqType K) k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k2 v2 s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s))) (if @ord K k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s)) else if @eq_op (Ordered.eqType K) k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 s))) *) case: (totalP k2 k1) H3=>//= H3. (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 s)) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k2 v2 s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 (@ins' K V k2 v2 s))) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k1 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s) else if @eq_op (Ordered.eqType K) k1 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k1 v1 s)) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s))) (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s)) else if @eq_op (Ordered.eqType K) k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k1 v1 s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s))) (if @ord K k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s) else if @eq_op (Ordered.eqType K) k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k2 v2 s)) *) (* Goal: forall _ : is_true true, @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s))) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 s))) *) by case: (totalP k2 k3) H2=>//=. (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 s)) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k2 v2 s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 (@ins' K V k2 v2 s))) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k1 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s) else if @eq_op (Ordered.eqType K) k1 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k1 v1 s)) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s))) (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s)) else if @eq_op (Ordered.eqType K) k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k1 v1 s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s))) (if @ord K k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s) else if @eq_op (Ordered.eqType K) k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k2 v2 s)) *) - (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 s)) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k2 v2 s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 (@ins' K V k2 v2 s))) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k1 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s) else if @eq_op (Ordered.eqType K) k1 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k1 v1 s)) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s))) (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s)) else if @eq_op (Ordered.eqType K) k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k1 v1 s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s))) (if @ord K k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s) else if @eq_op (Ordered.eqType K) k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k2 v2 s)) *) rewrite (eqP H4) in H3. (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 s)) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k2 v2 s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 (@ins' K V k2 v2 s))) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k1 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s) else if @eq_op (Ordered.eqType K) k1 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k1 v1 s)) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s))) (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s)) else if @eq_op (Ordered.eqType K) k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k1 v1 s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s))) (if @ord K k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s) else if @eq_op (Ordered.eqType K) k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k2 v2 s)) *) by case: (totalP k2 k3) H2 H3. (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 s)) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k2 v2 s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 (@ins' K V k2 v2 s))) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k1 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s) else if @eq_op (Ordered.eqType K) k1 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k1 v1 s)) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s))) (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s)) else if @eq_op (Ordered.eqType K) k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k1 v1 s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 (@ins' K V k1 v1 s))) *) by case: (totalP k1 k3) (trans H3 H2) H4. (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 s)) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k2 v2 s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 (@ins' K V k2 v2 s))) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k1 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s) else if @eq_op (Ordered.eqType K) k1 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k1 v1 s)) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) - (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 s)) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k2 v2 s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 (@ins' K V k2 v2 s))) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k1 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s) else if @eq_op (Ordered.eqType K) k1 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k1 v1 s)) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) rewrite -(eqP H2) {H2} (H1). (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 s)) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k2 v2 s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 (@ins' K V k2 v2 s))) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k1 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k1 v1 s)) (@ins' K V k2 v2 (if @ord K k1 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v3) s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v3) (@ins' K V k1 v1 s))) *) case: (totalP k1 k2) (H1)=>//= H2 _; rewrite ?irr ?eq_refl //. (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 s)) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k2 v2 s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 (@ins' K V k2 v2 s))) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s)) (if @ord K k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v3) s)) else if @eq_op (Ordered.eqType K) k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v3) s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s)) *) rewrite eq_sym H1. (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 s)) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k2 v2 s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 (@ins' K V k2 v2 s))) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s)) (if @ord K k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v3) s)) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s)) *) by case: (totalP k2 k1) H1 H2. (* Goal: @eq (list (prod (Ordered.sort K) V)) (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 s)) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k2 v2 s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 (@ins' K V k2 v2 s))) (@ins' K V k2 v2 (if @ord K k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k1 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) case: (totalP k1 k3)=>H3 /=. (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 (@ins' K V k2 v2 s))) (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s)) else if @eq_op (Ordered.eqType K) k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k1 v1 s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k2 v2 s)) (if @ord K k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s) else if @eq_op (Ordered.eqType K) k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k2 v2 s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 s))) (if @ord K k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s)) else if @eq_op (Ordered.eqType K) k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 s))) *) - (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 (@ins' K V k2 v2 s))) (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s)) else if @eq_op (Ordered.eqType K) k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k1 v1 s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k2 v2 s)) (if @ord K k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s) else if @eq_op (Ordered.eqType K) k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k2 v2 s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 s))) (if @ord K k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s)) else if @eq_op (Ordered.eqType K) k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 s))) *) rewrite eq_sym H1. (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 (@ins' K V k2 v2 s))) (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s)) else if @eq_op (Ordered.eqType K) k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k1 v1 s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k2 v2 s)) (if @ord K k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s) else if @eq_op (Ordered.eqType K) k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k2 v2 s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 s))) (if @ord K k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s)) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 s))) *) case: (totalP k2 k1) H1 (trans H3 H2)=>//. (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 (@ins' K V k2 v2 s))) (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s)) else if @eq_op (Ordered.eqType K) k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k1 v1 s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k2 v2 s)) (if @ord K k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s) else if @eq_op (Ordered.eqType K) k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k2 v2 s)) *) (* Goal: forall (_ : is_true (@ord K k1 k2)) (_ : @eq bool (@eq_op (Ordered.eqType K) k1 k2) false) (_ : is_true true), @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 s))) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 s))) *) by case: (totalP k2 k3) H2=>//=. (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 (@ins' K V k2 v2 s))) (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s)) else if @eq_op (Ordered.eqType K) k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k1 v1 s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k2 v2 s)) (if @ord K k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s) else if @eq_op (Ordered.eqType K) k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k2 v2 s)) *) - (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 (@ins' K V k2 v2 s))) (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s)) else if @eq_op (Ordered.eqType K) k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k1 v1 s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k2 v2 s)) (if @ord K k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s) else if @eq_op (Ordered.eqType K) k2 k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k2 v2 s)) *) rewrite (eqP H3). (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 (@ins' K V k2 v2 s))) (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s)) else if @eq_op (Ordered.eqType K) k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k1 v1 s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v1) (@ins' K V k2 v2 s)) (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v1) s) else if @eq_op (Ordered.eqType K) k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v1) (@ins' K V k2 v2 s)) *) by case: (totalP k2 k3) H2. (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 (@ins' K V k2 v2 s))) (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s)) else if @eq_op (Ordered.eqType K) k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k1 v1 s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 (@ins' K V k1 v1 s))) *) case: (totalP k2 k3)=>H4 /=. (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 (@ins' K V k2 v2 s))) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 (@ins' K V k2 v2 s))) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k1 v1 s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 (@ins' K V k2 v2 s))) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) - (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 (@ins' K V k2 v2 s))) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 (@ins' K V k2 v2 s))) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k1 v1 s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 (@ins' K V k2 v2 s))) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 s))) *) by move: (trans H4 H2); rewrite irr. (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 (@ins' K V k2 v2 s))) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 (@ins' K V k2 v2 s))) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k1 v1 s)) *) - (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 (@ins' K V k2 v2 s))) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 (@ins' K V k1 v1 s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 (@ins' K V k2 v2 s))) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k1 v1 s)) *) by rewrite (eqP H4) irr in H2. (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k1 v1 (@ins' K V k2 v2 s))) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v2 (@ins' K V k1 v1 s))) *) by rewrite IH //; apply: path_sorted H. Qed. Lemma rem_empty k : rem k nil = nil. Proof. (* Goal: @eq (finMap K V) (@rem K V k (SerTop.nil K V)) (SerTop.nil K V) *) by rewrite fmapE. Qed. Lemma rem_rem k1 k2 (s : fmap) : rem k1 (rem k2 s) = if k1 == k2 then rem k1 s else rem k2 (rem k1 s). Proof. (* Goal: @eq (finMap K V) (@rem K V k1 (@rem K V k2 s)) (if @eq_op (Ordered.eqType K) k1 k2 then @rem K V k1 s else @rem K V k2 (@rem K V k1 s)) *) rewrite /rem; case: s => s H /=. (* Goal: @eq (finMap K V) (@FinMap K V (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k2)) s)) (@sorted_filter K V k1 (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k2)) s) (@sorted_filter K V k2 s H))) (if @eq_op (Ordered.eqType K) k1 k2 then @FinMap K V (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) (@sorted_filter K V k1 s H) else @FinMap K V (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k2)) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) (@sorted_filter K V k2 (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) (@sorted_filter K V k1 s H))) *) case H1: (k1 == k2); rewrite fmapE /= -!filter_predI; apply: eq_filter=>x /=. (* Goal: @eq bool (andb (negb (@eq_op (Ordered.eqType K) (@key K V x) k1)) (negb (@eq_op (Ordered.eqType K) (@key K V x) k2))) (andb (negb (@eq_op (Ordered.eqType K) (@key K V x) k2)) (negb (@eq_op (Ordered.eqType K) (@key K V x) k1))) *) (* Goal: @eq bool (andb (negb (@eq_op (Ordered.eqType K) (@key K V x) k1)) (negb (@eq_op (Ordered.eqType K) (@key K V x) k2))) (negb (@eq_op (Ordered.eqType K) (@key K V x) k1)) *) - (* Goal: @eq bool (andb (negb (@eq_op (Ordered.eqType K) (@key K V x) k1)) (negb (@eq_op (Ordered.eqType K) (@key K V x) k2))) (andb (negb (@eq_op (Ordered.eqType K) (@key K V x) k2)) (negb (@eq_op (Ordered.eqType K) (@key K V x) k1))) *) (* Goal: @eq bool (andb (negb (@eq_op (Ordered.eqType K) (@key K V x) k1)) (negb (@eq_op (Ordered.eqType K) (@key K V x) k2))) (negb (@eq_op (Ordered.eqType K) (@key K V x) k1)) *) by rewrite (eqP H1) andbb. (* Goal: @eq bool (andb (negb (@eq_op (Ordered.eqType K) (@key K V x) k1)) (negb (@eq_op (Ordered.eqType K) (@key K V x) k2))) (andb (negb (@eq_op (Ordered.eqType K) (@key K V x) k2)) (negb (@eq_op (Ordered.eqType K) (@key K V x) k1))) *) by rewrite andbC. Qed. Lemma rem_ins k1 k2 v (s : fmap) : rem k1 (ins k2 v s) = if k1 == k2 then rem k1 s else ins k2 v (rem k1 s). Proof. (* Goal: @eq (finMap K V) (@rem K V k1 (@ins K V k2 v s)) (if @eq_op (Ordered.eqType K) k1 k2 then @rem K V k1 s else @ins K V k2 v (@rem K V k1 s)) *) rewrite /rem; case: s => s H /=; case H1: (k1 == k2); rewrite /= fmapE /=. (* Goal: @eq (list (prod (Ordered.sort K) V)) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s)) (@ins' K V k2 v (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s)) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) *) - (* Goal: @eq (list (prod (Ordered.sort K) V)) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s)) (@ins' K V k2 v (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s)) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) *) rewrite (eqP H1) {H1}. (* Goal: @eq (list (prod (Ordered.sort K) V)) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s)) (@ins' K V k2 v (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k2)) (@ins' K V k2 v s)) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k2)) s) *) elim: s k2 H=>[|[k3 v3] s IH] k2 /= H; rewrite ?eq_refl 1?eq_sym //. (* Goal: @eq (list (prod (Ordered.sort K) V)) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s)) (@ins' K V k2 v (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k2)) (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k3 k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v s))) (if negb (@eq_op (Ordered.eqType K) k3 k2) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k2)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k2)) s) *) case: (totalP k3 k2)=>H1 /=; rewrite ?eq_refl //=; case: (totalP k3 k2) H1=>//= H1 _. (* Goal: @eq (list (prod (Ordered.sort K) V)) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s)) (@ins' K V k2 v (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k2)) (@ins' K V k2 v s))) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k2)) s)) *) by rewrite IH //; apply: path_sorted H. (* Goal: @eq (list (prod (Ordered.sort K) V)) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s)) (@ins' K V k2 v (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) *) elim: s k1 k2 H1 H=>[|[k3 v3] s IH] k1 k2 H1 /= H; first by rewrite eq_sym H1. (* Goal: @eq (list (prod (Ordered.sort K) V)) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) s) else if @eq_op (Ordered.eqType K) k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v s))) (@ins' K V k2 v (if negb (@eq_op (Ordered.eqType K) k3 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) *) case: (totalP k2 k3)=>H2 /=. (* Goal: @eq (list (prod (Ordered.sort K) V)) (if negb (@eq_op (Ordered.eqType K) k3 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s)) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s)) (@ins' K V k2 v (if negb (@eq_op (Ordered.eqType K) k3 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if negb (@eq_op (Ordered.eqType K) k2 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) (@ins' K V k2 v (if negb (@eq_op (Ordered.eqType K) k3 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if negb (@eq_op (Ordered.eqType K) k2 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (if negb (@eq_op (Ordered.eqType K) k3 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else if negb (@eq_op (Ordered.eqType K) k3 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) (@ins' K V k2 v (if negb (@eq_op (Ordered.eqType K) k3 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) *) - (* Goal: @eq (list (prod (Ordered.sort K) V)) (if negb (@eq_op (Ordered.eqType K) k3 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s)) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s)) (@ins' K V k2 v (if negb (@eq_op (Ordered.eqType K) k3 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if negb (@eq_op (Ordered.eqType K) k2 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) (@ins' K V k2 v (if negb (@eq_op (Ordered.eqType K) k3 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if negb (@eq_op (Ordered.eqType K) k2 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (if negb (@eq_op (Ordered.eqType K) k3 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else if negb (@eq_op (Ordered.eqType K) k3 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) (@ins' K V k2 v (if negb (@eq_op (Ordered.eqType K) k3 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) *) rewrite eq_sym H1 /=. (* Goal: @eq (list (prod (Ordered.sort K) V)) (if negb (@eq_op (Ordered.eqType K) k3 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s)) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s)) (@ins' K V k2 v (if negb (@eq_op (Ordered.eqType K) k3 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if negb (@eq_op (Ordered.eqType K) k2 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) (@ins' K V k2 v (if negb (@eq_op (Ordered.eqType K) k3 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (if negb (@eq_op (Ordered.eqType K) k3 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) (@ins' K V k2 v (if negb (@eq_op (Ordered.eqType K) k3 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) *) case: (totalP k3 k1)=>H3 /=; case: (totalP k2 k3) (H2)=>//=. (* Goal: @eq (list (prod (Ordered.sort K) V)) (if negb (@eq_op (Ordered.eqType K) k3 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s)) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s)) (@ins' K V k2 v (if negb (@eq_op (Ordered.eqType K) k3 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if negb (@eq_op (Ordered.eqType K) k2 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) (@ins' K V k2 v (if negb (@eq_op (Ordered.eqType K) k3 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) *) (* Goal: forall (_ : is_true (@ord K k2 k3)) (_ : is_true true), @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) (@ins' K V k2 v (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) *) rewrite -(eqP H3) in H1 *. rewrite -IH //; last by apply: path_sorted H. (* Goal: @eq (list (prod (Ordered.sort K) V)) (if negb (@eq_op (Ordered.eqType K) k3 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s)) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s)) (@ins' K V k2 v (if negb (@eq_op (Ordered.eqType K) k3 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if negb (@eq_op (Ordered.eqType K) k2 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) (@ins' K V k2 v (if negb (@eq_op (Ordered.eqType K) k3 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) *) (* Goal: forall (_ : is_true (@ord K k2 k3)) (_ : is_true true), @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s)) *) rewrite last_ins' /= 1?eq_sym ?H1 //. (* Goal: @eq (list (prod (Ordered.sort K) V)) (if negb (@eq_op (Ordered.eqType K) k3 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s)) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s)) (@ins' K V k2 v (if negb (@eq_op (Ordered.eqType K) k3 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if negb (@eq_op (Ordered.eqType K) k2 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) (@ins' K V k2 v (if negb (@eq_op (Ordered.eqType K) k3 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) *) (* Goal: is_true (@path (Ordered.sort K) (@ord K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s)) *) by apply: ord_path H. (* Goal: @eq (list (prod (Ordered.sort K) V)) (if negb (@eq_op (Ordered.eqType K) k3 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s)) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s)) (@ins' K V k2 v (if negb (@eq_op (Ordered.eqType K) k3 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if negb (@eq_op (Ordered.eqType K) k2 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) (@ins' K V k2 v (if negb (@eq_op (Ordered.eqType K) k3 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) *) - (* Goal: @eq (list (prod (Ordered.sort K) V)) (if negb (@eq_op (Ordered.eqType K) k3 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s)) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s)) (@ins' K V k2 v (if negb (@eq_op (Ordered.eqType K) k3 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (if negb (@eq_op (Ordered.eqType K) k2 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) (@ins' K V k2 v (if negb (@eq_op (Ordered.eqType K) k3 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) *) by move: H1; rewrite (eqP H2) /= eq_sym => -> /=; rewrite irr eq_refl. (* Goal: @eq (list (prod (Ordered.sort K) V)) (if negb (@eq_op (Ordered.eqType K) k3 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s)) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s)) (@ins' K V k2 v (if negb (@eq_op (Ordered.eqType K) k3 k1) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) *) case: (totalP k3 k1)=>H3 /=. (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s))) (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) else if @eq_op (Ordered.eqType K) k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s)) (@ins' K V k2 v (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s))) (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) else if @eq_op (Ordered.eqType K) k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s))) *) - (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s))) (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) else if @eq_op (Ordered.eqType K) k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s)) (@ins' K V k2 v (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s))) (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) else if @eq_op (Ordered.eqType K) k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s))) *) case: (totalP k2 k3) H2=>//= H2 _. (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s))) (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) else if @eq_op (Ordered.eqType K) k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s)) (@ins' K V k2 v (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s))) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s))) *) by rewrite IH //; apply: path_sorted H. (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s))) (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) else if @eq_op (Ordered.eqType K) k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s)) (@ins' K V k2 v (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) *) - (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s))) (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) else if @eq_op (Ordered.eqType K) k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s))) *) (* Goal: @eq (list (prod (Ordered.sort K) V)) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s)) (@ins' K V k2 v (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) *) rewrite -(eqP H3) in H1 *. by rewrite IH //; apply: path_sorted H. (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s))) (if @ord K k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s)) else if @eq_op (Ordered.eqType K) k2 k3 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s) else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s))) *) case: (totalP k2 k3) H2=>//= H2 _. (* Goal: @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) (@ins' K V k2 v s))) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k3 v3) (@ins' K V k2 v (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k1)) s))) *) by rewrite IH //; apply: path_sorted H. Qed. Lemma rem_supp k (s : fmap) : k \notin supp s -> rem k s = s. Proof. (* Goal: forall _ : is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) k (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s)))), @eq (finMap K V) (@rem K V k s) s *) case: s => s H1; rewrite /supp !fmapE /= => H2. (* Goal: @eq (list (prod (Ordered.sort K) V)) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k)) s) s *) elim: s H1 H2=>[|[k1 v1] s1 IH] //=; move/path_sorted=>H1. (* Goal: forall _ : is_true (negb (@in_mem (Ordered.sort K) k (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1))))), @eq (list (prod (Ordered.sort K) V)) (if negb (@eq_op (Ordered.eqType K) k1 k) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k)) s1) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k)) s1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s1) *) rewrite inE negb_or; case/andP=>H2; move/(IH H1)=>H3. (* Goal: @eq (list (prod (Ordered.sort K) V)) (if negb (@eq_op (Ordered.eqType K) k1 k) then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k)) s1) else @filter (prod (Ordered.sort K) V) (@pred_of_simpl (prod (Ordered.sort K) V) (@predCk K V k)) s1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s1) *) by rewrite eq_sym H2 H3. Qed. Lemma fnd_supp k (s : fmap) : k \notin supp s -> fnd k s = None. Proof. (* Goal: forall _ : is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) k (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s)))), @eq (option V) (@fnd K V k s) (@None V) *) by case: suppP. Qed. Lemma fnd_supp_in k (s : fmap) : k \in supp s -> exists v, fnd k s = Some v. Proof. (* Goal: forall _ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) k (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s))), @ex V (fun v : V => @eq (option V) (@fnd K V k s) (@Some V v)) *) by case: suppP=>[v|]; [exists v|]. Qed. Lemma cancel_ins k v (s1 s2 : fmap) : k \notin (supp s1) -> k \notin (supp s2) -> ins k v s1 = ins k v s2 -> s1 = s2. Proof. (* Goal: forall (_ : is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) k (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1))))) (_ : is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) k (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s2))))) (_ : @eq (finMap K V) (@ins K V k v s1) (@ins K V k v s2)), @eq (finMap K V) s1 s2 *) move: s1 s2=>[s1 p1][s2 p2]; rewrite !fmapE /supp /= {p1 p2}. (* Goal: forall (_ : is_true (negb (@in_mem (Ordered.sort K) k (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1))))) (_ : is_true (negb (@in_mem (Ordered.sort K) k (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2))))) (_ : @eq (list (prod (Ordered.sort K) V)) (@ins' K V k v s1) (@ins' K V k v s2)), @eq (list (prod (Ordered.sort K) V)) s1 s2 *) elim: s1 k v s2=>[k v s2| [k1 v1] s1 IH1 k v s2] /=. (* Goal: forall (_ : is_true (negb (@in_mem (Ordered.sort K) k (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1)))))) (_ : is_true (negb (@in_mem (Ordered.sort K) k (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2))))) (_ : @eq (list (prod (Ordered.sort K) V)) (if @ord K k k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s1) else if @eq_op (Ordered.eqType K) k k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s1 else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k v s1)) (@ins' K V k v s2)), @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s1) s2 *) (* Goal: forall (_ : is_true true) (_ : is_true (negb (@in_mem (Ordered.sort K) k (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2))))) (_ : @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) (@Datatypes.nil (prod (Ordered.sort K) V))) (@ins' K V k v s2)), @eq (list (prod (Ordered.sort K) V)) (@Datatypes.nil (prod (Ordered.sort K) V)) s2 *) - (* Goal: forall (_ : is_true (negb (@in_mem (Ordered.sort K) k (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1)))))) (_ : is_true (negb (@in_mem (Ordered.sort K) k (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2))))) (_ : @eq (list (prod (Ordered.sort K) V)) (if @ord K k k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s1) else if @eq_op (Ordered.eqType K) k k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s1 else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k v s1)) (@ins' K V k v s2)), @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s1) s2 *) (* Goal: forall (_ : is_true true) (_ : is_true (negb (@in_mem (Ordered.sort K) k (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2))))) (_ : @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) (@Datatypes.nil (prod (Ordered.sort K) V))) (@ins' K V k v s2)), @eq (list (prod (Ordered.sort K) V)) (@Datatypes.nil (prod (Ordered.sort K) V)) s2 *) case: s2=>[| [k2 v2] s2] //= _. (* Goal: forall (_ : is_true (negb (@in_mem (Ordered.sort K) k (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1)))))) (_ : is_true (negb (@in_mem (Ordered.sort K) k (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2))))) (_ : @eq (list (prod (Ordered.sort K) V)) (if @ord K k k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s1) else if @eq_op (Ordered.eqType K) k k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s1 else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k v s1)) (@ins' K V k v s2)), @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s1) s2 *) (* Goal: forall (_ : is_true (negb (@in_mem (Ordered.sort K) k (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2)))))) (_ : @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) (@Datatypes.nil (prod (Ordered.sort K) V))) (if @ord K k k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s2) else if @eq_op (Ordered.eqType K) k k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s2 else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k v s2))), @eq (list (prod (Ordered.sort K) V)) (@Datatypes.nil (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s2) *) rewrite inE negb_or; case/andP=>H1 _; case: ifP=>// _. (* Goal: forall (_ : is_true (negb (@in_mem (Ordered.sort K) k (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1)))))) (_ : is_true (negb (@in_mem (Ordered.sort K) k (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2))))) (_ : @eq (list (prod (Ordered.sort K) V)) (if @ord K k k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s1) else if @eq_op (Ordered.eqType K) k k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s1 else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k v s1)) (@ins' K V k v s2)), @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s1) s2 *) (* Goal: forall _ : @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) (@Datatypes.nil (prod (Ordered.sort K) V))) (if @eq_op (Ordered.eqType K) k k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s2 else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k v s2)), @eq (list (prod (Ordered.sort K) V)) (@Datatypes.nil (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s2) *) by rewrite (negbTE H1); case=>E; rewrite E eq_refl in H1. (* Goal: forall (_ : is_true (negb (@in_mem (Ordered.sort K) k (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s1)))))) (_ : is_true (negb (@in_mem (Ordered.sort K) k (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2))))) (_ : @eq (list (prod (Ordered.sort K) V)) (if @ord K k k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s1) else if @eq_op (Ordered.eqType K) k k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s1 else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k v s1)) (@ins' K V k v s2)), @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s1) s2 *) rewrite inE negb_or; case/andP=>H1 H2 H3. (* Goal: forall _ : @eq (list (prod (Ordered.sort K) V)) (if @ord K k k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s1) else if @eq_op (Ordered.eqType K) k k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s1 else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k v s1)) (@ins' K V k v s2), @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s1) s2 *) case: ifP=>H4; case: s2 H3=>[| [k2 v2] s2] //=. (* Goal: forall (_ : is_true (negb (@in_mem (Ordered.sort K) k (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2)))))) (_ : @eq (list (prod (Ordered.sort K) V)) (if @eq_op (Ordered.eqType K) k k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s1 else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k v s1)) (if @ord K k k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s2) else if @eq_op (Ordered.eqType K) k k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s2 else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k v s2))), @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s2) *) (* Goal: forall (_ : is_true true) (_ : @eq (list (prod (Ordered.sort K) V)) (if @eq_op (Ordered.eqType K) k k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s1 else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k v s1)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) (@Datatypes.nil (prod (Ordered.sort K) V)))), @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s1) (@Datatypes.nil (prod (Ordered.sort K) V)) *) (* Goal: forall (_ : is_true (negb (@in_mem (Ordered.sort K) k (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2)))))) (_ : @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s1)) (if @ord K k k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s2) else if @eq_op (Ordered.eqType K) k k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s2 else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k v s2))), @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s2) *) - (* Goal: forall (_ : is_true (negb (@in_mem (Ordered.sort K) k (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2)))))) (_ : @eq (list (prod (Ordered.sort K) V)) (if @eq_op (Ordered.eqType K) k k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s1 else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k v s1)) (if @ord K k k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s2) else if @eq_op (Ordered.eqType K) k k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s2 else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k v s2))), @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s2) *) (* Goal: forall (_ : is_true true) (_ : @eq (list (prod (Ordered.sort K) V)) (if @eq_op (Ordered.eqType K) k k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s1 else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k v s1)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) (@Datatypes.nil (prod (Ordered.sort K) V)))), @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s1) (@Datatypes.nil (prod (Ordered.sort K) V)) *) (* Goal: forall (_ : is_true (negb (@in_mem (Ordered.sort K) k (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2)))))) (_ : @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s1)) (if @ord K k k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s2) else if @eq_op (Ordered.eqType K) k k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s2 else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k v s2))), @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s2) *) rewrite inE negb_or; case/andP=>H5 H6. (* Goal: forall (_ : is_true (negb (@in_mem (Ordered.sort K) k (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2)))))) (_ : @eq (list (prod (Ordered.sort K) V)) (if @eq_op (Ordered.eqType K) k k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s1 else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k v s1)) (if @ord K k k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s2) else if @eq_op (Ordered.eqType K) k k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s2 else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k v s2))), @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s2) *) (* Goal: forall (_ : is_true true) (_ : @eq (list (prod (Ordered.sort K) V)) (if @eq_op (Ordered.eqType K) k k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s1 else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k v s1)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) (@Datatypes.nil (prod (Ordered.sort K) V)))), @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s1) (@Datatypes.nil (prod (Ordered.sort K) V)) *) (* Goal: forall _ : @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s1)) (if @ord K k k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s2) else if @eq_op (Ordered.eqType K) k k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s2 else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k v s2)), @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s2) *) case: ifP=>H7; first by case=>->->->. (* Goal: forall (_ : is_true (negb (@in_mem (Ordered.sort K) k (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2)))))) (_ : @eq (list (prod (Ordered.sort K) V)) (if @eq_op (Ordered.eqType K) k k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s1 else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k v s1)) (if @ord K k k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s2) else if @eq_op (Ordered.eqType K) k k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s2 else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k v s2))), @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s2) *) (* Goal: forall (_ : is_true true) (_ : @eq (list (prod (Ordered.sort K) V)) (if @eq_op (Ordered.eqType K) k k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s1 else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k v s1)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) (@Datatypes.nil (prod (Ordered.sort K) V)))), @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s1) (@Datatypes.nil (prod (Ordered.sort K) V)) *) (* Goal: forall _ : @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s1)) (if @eq_op (Ordered.eqType K) k k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s2 else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k v s2)), @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s2) *) by rewrite (negbTE H5); case=>E; rewrite E eq_refl in H5. (* Goal: forall (_ : is_true (negb (@in_mem (Ordered.sort K) k (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2)))))) (_ : @eq (list (prod (Ordered.sort K) V)) (if @eq_op (Ordered.eqType K) k k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s1 else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k v s1)) (if @ord K k k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s2) else if @eq_op (Ordered.eqType K) k k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s2 else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k v s2))), @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s2) *) (* Goal: forall (_ : is_true true) (_ : @eq (list (prod (Ordered.sort K) V)) (if @eq_op (Ordered.eqType K) k k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s1 else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k v s1)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) (@Datatypes.nil (prod (Ordered.sort K) V)))), @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s1) (@Datatypes.nil (prod (Ordered.sort K) V)) *) - (* Goal: forall (_ : is_true (negb (@in_mem (Ordered.sort K) k (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2)))))) (_ : @eq (list (prod (Ordered.sort K) V)) (if @eq_op (Ordered.eqType K) k k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s1 else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k v s1)) (if @ord K k k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s2) else if @eq_op (Ordered.eqType K) k k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s2 else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k v s2))), @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s2) *) (* Goal: forall (_ : is_true true) (_ : @eq (list (prod (Ordered.sort K) V)) (if @eq_op (Ordered.eqType K) k k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s1 else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k v s1)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) (@Datatypes.nil (prod (Ordered.sort K) V)))), @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s1) (@Datatypes.nil (prod (Ordered.sort K) V)) *) by rewrite (negbTE H1)=>_; case=>E; rewrite E eq_refl in H1. (* Goal: forall (_ : is_true (negb (@in_mem (Ordered.sort K) k (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2)))))) (_ : @eq (list (prod (Ordered.sort K) V)) (if @eq_op (Ordered.eqType K) k k1 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s1 else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k v s1)) (if @ord K k k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s2) else if @eq_op (Ordered.eqType K) k k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s2 else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k v s2))), @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s2) *) rewrite inE negb_or (negbTE H1); case/andP=>H5 H6. (* Goal: forall _ : @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k v s1)) (if @ord K k k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s2) else if @eq_op (Ordered.eqType K) k k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s2 else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k v s2)), @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s2) *) rewrite (negbTE H5); case: ifP=>H7 /=. (* Goal: forall _ : @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k v s1)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k v s2)), @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s2) *) (* Goal: forall _ : @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k v s1)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s2)), @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s2) *) - (* Goal: forall _ : @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k v s1)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k v s2)), @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s2) *) (* Goal: forall _ : @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k v s1)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s2)), @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s2) *) by case=>E; rewrite E eq_refl in H1. (* Goal: forall _ : @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) (@ins' K V k v s1)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k v s2)), @eq (list (prod (Ordered.sort K) V)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k1 v1) s1) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s2) *) by case=>->-> H; congr (_ :: _); apply: IH1 H. Qed. End Laws. Section Append. Variable (K : ordType) (V : Type). Notation fmap := (finMap K V). Notation nil := (nil K V). Lemma seqof_ins k v (s : fmap) : path ord k (supp s) -> seq_of (ins k v s) = (k, v) :: seq_of s. Proof. (* Goal: forall _ : is_true (@path (Ordered.sort K) (@ord K) k (@supp K V s)), @eq (list (prod (Ordered.sort K) V)) (@seq_of K V (@ins K V k v s)) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) (@seq_of K V s)) *) by case: s; elim=>[|[k1 v1] s IH] //= _; case/andP=>->. Qed. Lemma path_supp_ins k1 k v (s : fmap) : ord k1 k -> path ord k1 (supp s) -> path ord k1 (supp (ins k v s)). Proof. (* Goal: forall (_ : is_true (@ord K k1 k)) (_ : is_true (@path (Ordered.sort K) (@ord K) k1 (@supp K V s))), is_true (@path (Ordered.sort K) (@ord K) k1 (@supp K V (@ins K V k v s))) *) case: s=>s p. (* Goal: forall (_ : is_true (@ord K k1 k)) (_ : is_true (@path (Ordered.sort K) (@ord K) k1 (@supp K V (@FinMap K V s p)))), is_true (@path (Ordered.sort K) (@ord K) k1 (@supp K V (@ins K V k v (@FinMap K V s p)))) *) elim: s p k1 k v=>[| [k2 v2] s IH] //= p k1 k v H2; first by rewrite H2. (* Goal: forall _ : is_true (andb (@ord K k1 k2) (@path (Ordered.sort K) (@ord K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s))), is_true (@path (Ordered.sort K) (@ord K) k1 (@supp K V (@FinMap K V (if @ord K k k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s) else if @eq_op (Ordered.eqType K) k k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k v s)) (@sorted_ins' K V (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s) k v p)))) *) case/andP=>H3 H4. (* Goal: is_true (@path (Ordered.sort K) (@ord K) k1 (@supp K V (@FinMap K V (if @ord K k k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s) else if @eq_op (Ordered.eqType K) k k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k v s)) (@sorted_ins' K V (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s) k v p)))) *) have H5: path ord k1 (map key s) by apply: ord_path H4. (* Goal: is_true (@path (Ordered.sort K) (@ord K) k1 (@supp K V (@FinMap K V (if @ord K k k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s) else if @eq_op (Ordered.eqType K) k k2 then @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s else @cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) (@ins' K V k v s)) (@sorted_ins' K V (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k2 v2) s) k v p)))) *) rewrite /supp /=; case: (totalP k k2)=>H /=. (* Goal: is_true (andb (@ord K k1 k2) (@path (Ordered.sort K) (@ord K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) (@ins' K V k v s)))) *) (* Goal: is_true (andb (@ord K k1 k) (@path (Ordered.sort K) (@ord K) k (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s))) *) (* Goal: is_true (andb (@ord K k1 k) (andb (@ord K k k2) (@path (Ordered.sort K) (@ord K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s)))) *) - (* Goal: is_true (andb (@ord K k1 k2) (@path (Ordered.sort K) (@ord K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) (@ins' K V k v s)))) *) (* Goal: is_true (andb (@ord K k1 k) (@path (Ordered.sort K) (@ord K) k (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s))) *) (* Goal: is_true (andb (@ord K k1 k) (andb (@ord K k k2) (@path (Ordered.sort K) (@ord K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s)))) *) by rewrite H2 H H4. (* Goal: is_true (andb (@ord K k1 k2) (@path (Ordered.sort K) (@ord K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) (@ins' K V k v s)))) *) (* Goal: is_true (andb (@ord K k1 k) (@path (Ordered.sort K) (@ord K) k (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s))) *) - (* Goal: is_true (andb (@ord K k1 k2) (@path (Ordered.sort K) (@ord K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) (@ins' K V k v s)))) *) (* Goal: is_true (andb (@ord K k1 k) (@path (Ordered.sort K) (@ord K) k (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s))) *) by rewrite H2 (eqP H) H4. (* Goal: is_true (andb (@ord K k1 k2) (@path (Ordered.sort K) (@ord K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) (@ins' K V k v s)))) *) rewrite H3 /=. (* Goal: is_true (@path (Ordered.sort K) (@ord K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) (@ins' K V k v s))) *) have H6: sorted ord (map key s) by apply: path_sorted H5. (* Goal: is_true (@path (Ordered.sort K) (@ord K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) (@ins' K V k v s))) *) by move: (IH H6 k2 k v H H4); case: s {IH p H4 H5} H6. Qed. Lemma path_supp_ins_inv k1 k v (s : fmap) : path ord k (supp s) -> path ord k1 (supp (ins k v s)) -> ord k1 k && path ord k1 (supp s). Proof. (* Goal: forall (_ : is_true (@path (Ordered.sort K) (@ord K) k (@supp K V s))) (_ : is_true (@path (Ordered.sort K) (@ord K) k1 (@supp K V (@ins K V k v s)))), is_true (andb (@ord K k1 k) (@path (Ordered.sort K) (@ord K) k1 (@supp K V s))) *) case: s=>s p; rewrite /supp /= => H1; rewrite last_ins' //=. (* Goal: forall _ : is_true (andb (@ord K k1 k) (@path (Ordered.sort K) (@ord K) k (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s))), is_true (andb (@ord K k1 k) (@path (Ordered.sort K) (@ord K) k1 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s))) *) by case/andP=>H2 H3; rewrite H2; apply: ord_path H3. Qed. Lemma fmap_ind' (P : fmap -> Prop) : P nil -> (forall k v s, path ord k (supp s) -> P s -> P (ins k v s)) -> forall s, P s. Proof. (* Goal: forall (_ : P (SerTop.nil K V)) (_ : forall (k : Ordered.sort K) (v : V) (s : finMap K V) (_ : is_true (@path (Ordered.sort K) (@ord K) k (@supp K V s))) (_ : P s), P (@ins K V k v s)) (s : finMap K V), P s *) move=>H1 H2; case; elim=>[|[k v] s IH] /= H. (* Goal: P (@FinMap K V (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s) H) *) (* Goal: P (@FinMap K V (@Datatypes.nil (prod (Ordered.sort K) V)) H) *) - (* Goal: P (@FinMap K V (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s) H) *) (* Goal: P (@FinMap K V (@Datatypes.nil (prod (Ordered.sort K) V)) H) *) by rewrite (_ : FinMap _ = nil); last by rewrite fmapE. (* Goal: P (@FinMap K V (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s) H) *) have S: sorted ord (map key s) by apply: path_sorted H. (* Goal: P (@FinMap K V (@cons (prod (Ordered.sort K) V) (@pair (Ordered.sort K) V k v) s) H) *) rewrite (_ : FinMap _ = ins k v (FinMap S)); last by rewrite fmapE /= last_ins'. (* Goal: P (@ins K V k v (@FinMap K V s S)) *) by apply: H2. Qed. Fixpoint fcat' (s1 : fmap) (s2 : seq (K * V)) {struct s2} : fmap := if s2 is (k, v)::t then fcat' (ins k v s1) t else s1. Definition fcat s1 s2 := fcat' s1 (seq_of s2). Lemma fcat_ins' k v s1 s2 : k \notin (map key s2) -> fcat' (ins k v s1) s2 = ins k v (fcat' s1 s2). Proof. (* Goal: forall _ : is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) k (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2)))), @eq (finMap K V) (fcat' (@ins K V k v s1) s2) (@ins K V k v (fcat' s1 s2)) *) move=>H; elim: s2 k v s1 H=>[|[k2 v2] s2 IH] k1 v1 s1 //=. (* Goal: forall _ : is_true (negb (@in_mem (Ordered.sort K) k1 (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@cons (Ordered.sort K) k2 (@map (prod (Ordered.sort K) V) (Ordered.sort K) (@key K V) s2))))), @eq (finMap K V) (fcat' (@ins K V k2 v2 (@ins K V k1 v1 s1)) s2) (@ins K V k1 v1 (fcat' (@ins K V k2 v2 s1) s2)) *) rewrite inE negb_or; case/andP=>H1 H2. (* Goal: @eq (finMap K V) (fcat' (@ins K V k2 v2 (@ins K V k1 v1 s1)) s2) (@ins K V k1 v1 (fcat' (@ins K V k2 v2 s1) s2)) *) by rewrite -IH // ins_ins eq_sym (negbTE H1). Qed. Lemma fcat_nil' s : fcat' nil (seq_of s) = s. Proof. (* Goal: @eq (finMap K V) (fcat' (SerTop.nil K V) (@seq_of K V s)) s *) elim/fmap_ind': s=>[|k v s L IH] //=. (* Goal: @eq (finMap K V) (fcat' (SerTop.nil K V) (@seq_of K V (@ins K V k v s))) (@ins K V k v s) *) by rewrite seqof_ins //= (_ : FinMap _ = ins k v nil) // fcat_ins' ?notin_path // IH. Qed. Lemma fcat0s s : fcat nil s = s. Proof. by apply: fcat_nil'. Qed. Proof. (* Goal: @eq (finMap K V) (fcat (SerTop.nil K V) s) s *) by apply: fcat_nil'. Qed. Lemma fcat_inss k v s1 s2 : k \notin supp s2 -> fcat (ins k v s1) s2 = ins k v (fcat s1 s2). Proof. (* Goal: forall _ : is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) k (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s2)))), @eq (finMap K V) (fcat (@ins K V k v s1) s2) (@ins K V k v (fcat s1 s2)) *) by case: s2=>s2 p2 H /=; apply: fcat_ins'. Qed. Lemma fcat_sins k v s1 s2 : fcat s1 (ins k v s2) = ins k v (fcat s1 s2). Lemma fcat_rems k s1 s2 : k \notin supp s2 -> fcat (rem k s1) s2 = rem k (fcat s1 s2). Proof. (* Goal: forall _ : is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) k (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s2)))), @eq (finMap K V) (fcat (@rem K V k s1) s2) (@rem K V k (fcat s1 s2)) *) elim/fmap_ind': s2 k s1=>[|k2 v2 s2 H IH] k1 v1. (* Goal: forall _ : is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) k1 (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k2 v2 s2))))), @eq (finMap K V) (fcat (@rem K V k1 v1) (@ins K V k2 v2 s2)) (@rem K V k1 (fcat v1 (@ins K V k2 v2 s2))) *) (* Goal: forall _ : is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) k1 (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (SerTop.nil K V))))), @eq (finMap K V) (fcat (@rem K V k1 v1) (SerTop.nil K V)) (@rem K V k1 (fcat v1 (SerTop.nil K V))) *) - (* Goal: forall _ : is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) k1 (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k2 v2 s2))))), @eq (finMap K V) (fcat (@rem K V k1 v1) (@ins K V k2 v2 s2)) (@rem K V k1 (fcat v1 (@ins K V k2 v2 s2))) *) (* Goal: forall _ : is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) k1 (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (SerTop.nil K V))))), @eq (finMap K V) (fcat (@rem K V k1 v1) (SerTop.nil K V)) (@rem K V k1 (fcat v1 (SerTop.nil K V))) *) by rewrite !fcats0. (* Goal: forall _ : is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) k1 (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k2 v2 s2))))), @eq (finMap K V) (fcat (@rem K V k1 v1) (@ins K V k2 v2 s2)) (@rem K V k1 (fcat v1 (@ins K V k2 v2 s2))) *) rewrite supp_ins inE /= negb_or; case/andP=>H1 H2. (* Goal: @eq (finMap K V) (fcat (@rem K V k1 v1) (@ins K V k2 v2 s2)) (@rem K V k1 (fcat v1 (@ins K V k2 v2 s2))) *) by rewrite fcat_sins IH // ins_rem eq_sym (negbTE H1) -fcat_sins. Qed. Lemma fcat_srem k s1 s2 : k \notin supp s1 -> fcat s1 (rem k s2) = rem k (fcat s1 s2). Proof. (* Goal: forall _ : is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) k (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))), @eq (finMap K V) (fcat s1 (@rem K V k s2)) (@rem K V k (fcat s1 s2)) *) elim/fmap_ind': s2 k s1=>[|k2 v2 s2 H IH] k1 s1. (* Goal: forall _ : is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) k1 (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))), @eq (finMap K V) (fcat s1 (@rem K V k1 (@ins K V k2 v2 s2))) (@rem K V k1 (fcat s1 (@ins K V k2 v2 s2))) *) (* Goal: forall _ : is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) k1 (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))), @eq (finMap K V) (fcat s1 (@rem K V k1 (SerTop.nil K V))) (@rem K V k1 (fcat s1 (SerTop.nil K V))) *) - (* Goal: forall _ : is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) k1 (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))), @eq (finMap K V) (fcat s1 (@rem K V k1 (@ins K V k2 v2 s2))) (@rem K V k1 (fcat s1 (@ins K V k2 v2 s2))) *) (* Goal: forall _ : is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) k1 (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))), @eq (finMap K V) (fcat s1 (@rem K V k1 (SerTop.nil K V))) (@rem K V k1 (fcat s1 (SerTop.nil K V))) *) rewrite rem_empty fcats0. (* Goal: forall _ : is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) k1 (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))), @eq (finMap K V) (fcat s1 (@rem K V k1 (@ins K V k2 v2 s2))) (@rem K V k1 (fcat s1 (@ins K V k2 v2 s2))) *) (* Goal: forall _ : is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) k1 (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))), @eq (finMap K V) s1 (@rem K V k1 s1) *) elim/fmap_ind': s1=>[|k3 v3 s3 H1 IH]; first by rewrite rem_empty. (* Goal: forall _ : is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) k1 (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))), @eq (finMap K V) (fcat s1 (@rem K V k1 (@ins K V k2 v2 s2))) (@rem K V k1 (fcat s1 (@ins K V k2 v2 s2))) *) (* Goal: forall _ : is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) k1 (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k3 v3 s3))))), @eq (finMap K V) (@ins K V k3 v3 s3) (@rem K V k1 (@ins K V k3 v3 s3)) *) rewrite supp_ins inE /= negb_or. (* Goal: forall _ : is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) k1 (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))), @eq (finMap K V) (fcat s1 (@rem K V k1 (@ins K V k2 v2 s2))) (@rem K V k1 (fcat s1 (@ins K V k2 v2 s2))) *) (* Goal: forall _ : is_true (andb (negb (@eq_op (Ordered.eqType K) k1 k3)) (negb (@in_mem (Ordered.sort K) k1 (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s3))))), @eq (finMap K V) (@ins K V k3 v3 s3) (@rem K V k1 (@ins K V k3 v3 s3)) *) case/andP=>H2; move/IH=>E; rewrite {1}E . (* Goal: forall _ : is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) k1 (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))), @eq (finMap K V) (fcat s1 (@rem K V k1 (@ins K V k2 v2 s2))) (@rem K V k1 (fcat s1 (@ins K V k2 v2 s2))) *) (* Goal: @eq (finMap K V) (@ins K V k3 v3 (@rem K V k1 s3)) (@rem K V k1 (@ins K V k3 v3 s3)) *) by rewrite ins_rem eq_sym (negbTE H2). (* Goal: forall _ : is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) k1 (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))), @eq (finMap K V) (fcat s1 (@rem K V k1 (@ins K V k2 v2 s2))) (@rem K V k1 (fcat s1 (@ins K V k2 v2 s2))) *) move=>H1; rewrite fcat_sins rem_ins; case: ifP=>E. (* Goal: @eq (finMap K V) (fcat s1 (@ins K V k2 v2 (@rem K V k1 s2))) (@rem K V k1 (@ins K V k2 v2 (fcat s1 s2))) *) (* Goal: @eq (finMap K V) (fcat s1 (@rem K V k1 s2)) (@rem K V k1 (@ins K V k2 v2 (fcat s1 s2))) *) - (* Goal: @eq (finMap K V) (fcat s1 (@ins K V k2 v2 (@rem K V k1 s2))) (@rem K V k1 (@ins K V k2 v2 (fcat s1 s2))) *) (* Goal: @eq (finMap K V) (fcat s1 (@rem K V k1 s2)) (@rem K V k1 (@ins K V k2 v2 (fcat s1 s2))) *) by rewrite rem_ins E IH. (* Goal: @eq (finMap K V) (fcat s1 (@ins K V k2 v2 (@rem K V k1 s2))) (@rem K V k1 (@ins K V k2 v2 (fcat s1 s2))) *) by rewrite rem_ins E -IH // -fcat_sins. Qed. Lemma fnd_fcat k s1 s2 : fnd k (fcat s1 s2) = if k \in supp s2 then fnd k s2 else fnd k s1. Proof. (* Goal: @eq (option V) (@fnd K V k (fcat s1 s2)) (if @in_mem (Equality.sort (Ordered.eqType K)) k (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s2)) then @fnd K V k s2 else @fnd K V k s1) *) elim/fmap_ind': s2 k s1=>[|k2 v2 s2 H IH] k1 s1. (* Goal: @eq (option V) (@fnd K V k1 (fcat s1 (@ins K V k2 v2 s2))) (if @in_mem (Equality.sort (Ordered.eqType K)) k1 (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k2 v2 s2))) then @fnd K V k1 (@ins K V k2 v2 s2) else @fnd K V k1 s1) *) (* Goal: @eq (option V) (@fnd K V k1 (fcat s1 (SerTop.nil K V))) (if @in_mem (Equality.sort (Ordered.eqType K)) k1 (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (SerTop.nil K V))) then @fnd K V k1 (SerTop.nil K V) else @fnd K V k1 s1) *) - (* Goal: @eq (option V) (@fnd K V k1 (fcat s1 (@ins K V k2 v2 s2))) (if @in_mem (Equality.sort (Ordered.eqType K)) k1 (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k2 v2 s2))) then @fnd K V k1 (@ins K V k2 v2 s2) else @fnd K V k1 s1) *) (* Goal: @eq (option V) (@fnd K V k1 (fcat s1 (SerTop.nil K V))) (if @in_mem (Equality.sort (Ordered.eqType K)) k1 (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (SerTop.nil K V))) then @fnd K V k1 (SerTop.nil K V) else @fnd K V k1 s1) *) by rewrite fcats0. (* Goal: @eq (option V) (@fnd K V k1 (fcat s1 (@ins K V k2 v2 s2))) (if @in_mem (Equality.sort (Ordered.eqType K)) k1 (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k2 v2 s2))) then @fnd K V k1 (@ins K V k2 v2 s2) else @fnd K V k1 s1) *) rewrite supp_ins inE /=; case: ifP; last first. (* Goal: forall _ : is_true (orb (@eq_op (Ordered.eqType K) k1 k2) (@in_mem (Ordered.sort K) k1 (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s2)))), @eq (option V) (@fnd K V k1 (fcat s1 (@ins K V k2 v2 s2))) (@fnd K V k1 (@ins K V k2 v2 s2)) *) (* Goal: forall _ : @eq bool (orb (@eq_op (Ordered.eqType K) k1 k2) (@in_mem (Ordered.sort K) k1 (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s2)))) false, @eq (option V) (@fnd K V k1 (fcat s1 (@ins K V k2 v2 s2))) (@fnd K V k1 s1) *) - (* Goal: forall _ : is_true (orb (@eq_op (Ordered.eqType K) k1 k2) (@in_mem (Ordered.sort K) k1 (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s2)))), @eq (option V) (@fnd K V k1 (fcat s1 (@ins K V k2 v2 s2))) (@fnd K V k1 (@ins K V k2 v2 s2)) *) (* Goal: forall _ : @eq bool (orb (@eq_op (Ordered.eqType K) k1 k2) (@in_mem (Ordered.sort K) k1 (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s2)))) false, @eq (option V) (@fnd K V k1 (fcat s1 (@ins K V k2 v2 s2))) (@fnd K V k1 s1) *) move/negbT; rewrite negb_or; case/andP=>H1 H2. (* Goal: forall _ : is_true (orb (@eq_op (Ordered.eqType K) k1 k2) (@in_mem (Ordered.sort K) k1 (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s2)))), @eq (option V) (@fnd K V k1 (fcat s1 (@ins K V k2 v2 s2))) (@fnd K V k1 (@ins K V k2 v2 s2)) *) (* Goal: @eq (option V) (@fnd K V k1 (fcat s1 (@ins K V k2 v2 s2))) (@fnd K V k1 s1) *) by rewrite fcat_sins fnd_ins (negbTE H1) IH (negbTE H2). (* Goal: forall _ : is_true (orb (@eq_op (Ordered.eqType K) k1 k2) (@in_mem (Ordered.sort K) k1 (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s2)))), @eq (option V) (@fnd K V k1 (fcat s1 (@ins K V k2 v2 s2))) (@fnd K V k1 (@ins K V k2 v2 s2)) *) case/orP; first by move/eqP=><-; rewrite fcat_sins !fnd_ins eq_refl. (* Goal: forall _ : is_true (@in_mem (Ordered.sort K) k1 (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s2))), @eq (option V) (@fnd K V k1 (fcat s1 (@ins K V k2 v2 s2))) (@fnd K V k1 (@ins K V k2 v2 s2)) *) move=>H1; rewrite fcat_sins !fnd_ins. (* Goal: @eq (option V) (if @eq_op (Ordered.eqType K) k1 k2 then @Some V v2 else @fnd K V k1 (fcat s1 s2)) (if @eq_op (Ordered.eqType K) k1 k2 then @Some V v2 else @fnd K V k1 s2) *) by case: ifP=>//; rewrite IH H1. Qed. Lemma supp_fcat s1 s2 : supp (fcat s1 s2) =i [predU supp s1 & supp s2]. Proof. (* Goal: @eq_mem (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (fcat s1 s2))) (@mem (Equality.sort (Ordered.eqType K)) (simplPredType (Equality.sort (Ordered.eqType K))) (@predU (Equality.sort (Ordered.eqType K)) (@pred_of_simpl (Equality.sort (Ordered.eqType K)) (@pred_of_mem_pred (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) (@pred_of_simpl (Equality.sort (Ordered.eqType K)) (@pred_of_mem_pred (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s2)))))) *) elim/fmap_ind': s2 s1=>[|k v s L IH] s1. (* Goal: @eq_mem (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (fcat s1 (@ins K V k v s)))) (@mem (Equality.sort (Ordered.eqType K)) (simplPredType (Equality.sort (Ordered.eqType K))) (@predU (Equality.sort (Ordered.eqType K)) (@pred_of_simpl (Equality.sort (Ordered.eqType K)) (@pred_of_mem_pred (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) (@pred_of_simpl (Equality.sort (Ordered.eqType K)) (@pred_of_mem_pred (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k v s))))))) *) (* Goal: @eq_mem (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (fcat s1 (SerTop.nil K V)))) (@mem (Equality.sort (Ordered.eqType K)) (simplPredType (Equality.sort (Ordered.eqType K))) (@predU (Equality.sort (Ordered.eqType K)) (@pred_of_simpl (Equality.sort (Ordered.eqType K)) (@pred_of_mem_pred (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) (@pred_of_simpl (Equality.sort (Ordered.eqType K)) (@pred_of_mem_pred (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (SerTop.nil K V))))))) *) - (* Goal: @eq_mem (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (fcat s1 (@ins K V k v s)))) (@mem (Equality.sort (Ordered.eqType K)) (simplPredType (Equality.sort (Ordered.eqType K))) (@predU (Equality.sort (Ordered.eqType K)) (@pred_of_simpl (Equality.sort (Ordered.eqType K)) (@pred_of_mem_pred (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) (@pred_of_simpl (Equality.sort (Ordered.eqType K)) (@pred_of_mem_pred (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k v s))))))) *) (* Goal: @eq_mem (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (fcat s1 (SerTop.nil K V)))) (@mem (Equality.sort (Ordered.eqType K)) (simplPredType (Equality.sort (Ordered.eqType K))) (@predU (Equality.sort (Ordered.eqType K)) (@pred_of_simpl (Equality.sort (Ordered.eqType K)) (@pred_of_mem_pred (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) (@pred_of_simpl (Equality.sort (Ordered.eqType K)) (@pred_of_mem_pred (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (SerTop.nil K V))))))) *) by rewrite supp_nil fcats0 => x; rewrite inE /= orbF. (* Goal: @eq_mem (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (fcat s1 (@ins K V k v s)))) (@mem (Equality.sort (Ordered.eqType K)) (simplPredType (Equality.sort (Ordered.eqType K))) (@predU (Equality.sort (Ordered.eqType K)) (@pred_of_simpl (Equality.sort (Ordered.eqType K)) (@pred_of_mem_pred (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) (@pred_of_simpl (Equality.sort (Ordered.eqType K)) (@pred_of_mem_pred (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k v s))))))) *) rewrite fcat_sins ?notin_path // => x. (* Goal: @eq bool (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k v (fcat s1 s))))) (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (simplPredType (Equality.sort (Ordered.eqType K))) (@predU (Equality.sort (Ordered.eqType K)) (@pred_of_simpl (Equality.sort (Ordered.eqType K)) (@pred_of_mem_pred (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) (@pred_of_simpl (Equality.sort (Ordered.eqType K)) (@pred_of_mem_pred (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k v s)))))))) *) rewrite supp_ins !inE /=. (* Goal: @eq bool (orb (@eq_op (Ordered.eqType K) x k) (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V (fcat s1 s))))) (orb (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1))) (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k v s))))) *) case E: (x == k)=>/=. (* Goal: @eq bool (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V (fcat s1 s)))) (orb (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1))) (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k v s))))) *) (* Goal: @eq bool true (orb (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1))) (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k v s))))) *) - (* Goal: @eq bool (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V (fcat s1 s)))) (orb (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1))) (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k v s))))) *) (* Goal: @eq bool true (orb (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1))) (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k v s))))) *) rewrite ?inE !supp_ins ?inE E orbT. (* Goal: @eq bool (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V (fcat s1 s)))) (orb (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1))) (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k v s))))) *) (* Goal: @eq bool true true *) reflexivity. (* Goal: @eq bool (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V (fcat s1 s)))) (orb (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1))) (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k v s))))) *) rewrite ?inE. (* Goal: @eq bool (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V (fcat s1 s)))) (orb (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1))) (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k v s))))) *) rewrite ?supp_ins. (* Goal: @eq bool (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V (fcat s1 s)))) (orb (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1))) (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (simplPredType (Equality.sort (Ordered.eqType K))) (@predU (Equality.sort (Ordered.eqType K)) (@pred_of_simpl (Equality.sort (Ordered.eqType K)) (@pred1 (Ordered.eqType K) k)) (@pred_of_simpl (Equality.sort (Ordered.eqType K)) (@pred_of_mem_pred (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s)))))))) *) rewrite ?inE /=. (* Goal: @eq bool (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V (fcat s1 s)))) (orb (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1))) (orb (@eq_op (Ordered.eqType K) x k) (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s))))) *) rewrite IH. (* Goal: @eq bool (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (simplPredType (Equality.sort (Ordered.eqType K))) (@predU (Equality.sort (Ordered.eqType K)) (@pred_of_simpl (Equality.sort (Ordered.eqType K)) (@pred_of_mem_pred (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) (@pred_of_simpl (Equality.sort (Ordered.eqType K)) (@pred_of_mem_pred (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s))))))) (orb (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1))) (orb (@eq_op (Ordered.eqType K) x k) (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s))))) *) rewrite ?inE /=. (* Goal: @eq bool (orb (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1))) (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s)))) (orb (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1))) (orb (@eq_op (Ordered.eqType K) x k) (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s))))) *) rewrite E /=. (* Goal: @eq bool (orb (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1))) (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s)))) (orb (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1))) (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s)))) *) reflexivity. Qed. End Append. Section FMapInd. Variables (K : ordType) (V : Type). Notation fmap := (finMap K V). Notation nil := (@nil K V). Lemma supp_eq_ins (s1 s2 : fmap) k1 k2 v1 v2 : path ord k1 (supp s1) -> path ord k2 (supp s2) -> supp (ins k1 v1 s1) =i supp (ins k2 v2 s2) -> k1 = k2 /\ supp s1 =i supp s2. Proof. (* Goal: forall (_ : is_true (@path (Ordered.sort K) (@ord K) k1 (@supp K V s1))) (_ : is_true (@path (Ordered.sort K) (@ord K) k2 (@supp K V s2))) (_ : @eq_mem (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k1 v1 s1))) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k2 v2 s2)))), and (@eq (Ordered.sort K) k1 k2) (@eq_mem (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s2))) *) move=>H1 H2 H; move: (H k1) (H k2). (* Goal: forall (_ : @eq bool (@in_mem (Equality.sort (Ordered.eqType K)) k1 (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k1 v1 s1)))) (@in_mem (Equality.sort (Ordered.eqType K)) k1 (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k2 v2 s2))))) (_ : @eq bool (@in_mem (Equality.sort (Ordered.eqType K)) k2 (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k1 v1 s1)))) (@in_mem (Equality.sort (Ordered.eqType K)) k2 (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k2 v2 s2))))), and (@eq (Ordered.sort K) k1 k2) (@eq_mem (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s2))) *) rewrite !supp_ins !inE /= !eq_refl (eq_sym k2). (* Goal: forall (_ : @eq bool (orb true (@in_mem (Ordered.sort K) k1 (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) (orb (@eq_op (Ordered.eqType K) k1 k2) (@in_mem (Ordered.sort K) k1 (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s2))))) (_ : @eq bool (orb (@eq_op (Ordered.eqType K) k1 k2) (@in_mem (Ordered.sort K) k2 (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) (orb true (@in_mem (Ordered.sort K) k2 (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s2))))), and (@eq (Ordered.sort K) k1 k2) (@eq_mem (Ordered.sort K) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1)) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s2))) *) case: totalP=>/= E; last 1 first. (* Goal: forall (_ : @eq bool true true) (_ : @eq bool true true), and (@eq (Ordered.sort K) k1 k2) (@eq_mem (Ordered.sort K) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1)) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s2))) *) (* Goal: forall (_ : @eq bool true (@in_mem (Ordered.sort K) k1 (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s2)))) (_ : @eq bool (@in_mem (Ordered.sort K) k2 (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1))) true), and (@eq (Ordered.sort K) k1 k2) (@eq_mem (Ordered.sort K) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1)) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s2))) *) (* Goal: forall (_ : @eq bool true (@in_mem (Ordered.sort K) k1 (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s2)))) (_ : @eq bool (@in_mem (Ordered.sort K) k2 (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1))) true), and (@eq (Ordered.sort K) k1 k2) (@eq_mem (Ordered.sort K) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1)) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s2))) *) - (* Goal: forall (_ : @eq bool true true) (_ : @eq bool true true), and (@eq (Ordered.sort K) k1 k2) (@eq_mem (Ordered.sort K) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1)) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s2))) *) (* Goal: forall (_ : @eq bool true (@in_mem (Ordered.sort K) k1 (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s2)))) (_ : @eq bool (@in_mem (Ordered.sort K) k2 (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1))) true), and (@eq (Ordered.sort K) k1 k2) (@eq_mem (Ordered.sort K) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1)) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s2))) *) (* Goal: forall (_ : @eq bool true (@in_mem (Ordered.sort K) k1 (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s2)))) (_ : @eq bool (@in_mem (Ordered.sort K) k2 (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1))) true), and (@eq (Ordered.sort K) k1 k2) (@eq_mem (Ordered.sort K) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1)) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s2))) *) by move: H1; move/(ord_path E); move/notin_path; move/negbTE=>->. (* Goal: forall (_ : @eq bool true true) (_ : @eq bool true true), and (@eq (Ordered.sort K) k1 k2) (@eq_mem (Ordered.sort K) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1)) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s2))) *) (* Goal: forall (_ : @eq bool true (@in_mem (Ordered.sort K) k1 (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s2)))) (_ : @eq bool (@in_mem (Ordered.sort K) k2 (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1))) true), and (@eq (Ordered.sort K) k1 k2) (@eq_mem (Ordered.sort K) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1)) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s2))) *) - (* Goal: forall (_ : @eq bool true true) (_ : @eq bool true true), and (@eq (Ordered.sort K) k1 k2) (@eq_mem (Ordered.sort K) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1)) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s2))) *) (* Goal: forall (_ : @eq bool true (@in_mem (Ordered.sort K) k1 (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s2)))) (_ : @eq bool (@in_mem (Ordered.sort K) k2 (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1))) true), and (@eq (Ordered.sort K) k1 k2) (@eq_mem (Ordered.sort K) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1)) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s2))) *) by move: H2; move/(ord_path E); move/notin_path; move/negbTE=>->. (* Goal: forall (_ : @eq bool true true) (_ : @eq bool true true), and (@eq (Ordered.sort K) k1 k2) (@eq_mem (Ordered.sort K) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1)) (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s2))) *) rewrite (eqP E) in H1 H2 H * => _ _; split=>// x; move: (H x). (* Goal: forall _ : @eq bool (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k2 v1 s1)))) (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k2 v2 s2)))), @eq bool (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1))) (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s2))) *) rewrite !supp_ins !inE /=; case: eqP=>//= -> _. (* Goal: @eq bool (@in_mem (Ordered.sort K) k2 (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1))) (@in_mem (Ordered.sort K) k2 (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s2))) *) by rewrite (negbTE (notin_path H1)) (negbTE (notin_path H2)). Qed. Lemma fmap_ind2 (P : fmap -> fmap -> Prop) : P nil nil -> (forall k v1 v2 s1 s2, path ord k (supp s1) -> path ord k (supp s2) -> P s1 s2 -> P (ins k v1 s1) (ins k v2 s2)) -> forall s1 s2, supp s1 =i supp s2 -> P s1 s2. Proof. (* Goal: forall (_ : P (SerTop.nil K V) (SerTop.nil K V)) (_ : forall (k : Ordered.sort K) (v1 v2 : V) (s1 s2 : finMap K V) (_ : is_true (@path (Ordered.sort K) (@ord K) k (@supp K V s1))) (_ : is_true (@path (Ordered.sort K) (@ord K) k (@supp K V s2))) (_ : P s1 s2), P (@ins K V k v1 s1) (@ins K V k v2 s2)) (s1 s2 : finMap K V) (_ : @eq_mem (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s2))), P s1 s2 *) move=>H1 H2; elim/fmap_ind'=>[|k1 v1 s1 T1 IH1]; elim/fmap_ind'=>[|k2 v2 s2 T2 _] //. (* Goal: forall _ : @eq_mem (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k1 v1 s1))) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k2 v2 s2))), P (@ins K V k1 v1 s1) (@ins K V k2 v2 s2) *) (* Goal: forall _ : @eq_mem (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k1 v1 s1))) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (SerTop.nil K V))), P (@ins K V k1 v1 s1) (SerTop.nil K V) *) (* Goal: forall _ : @eq_mem (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (SerTop.nil K V))) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k2 v2 s2))), P (SerTop.nil K V) (@ins K V k2 v2 s2) *) - (* Goal: forall _ : @eq_mem (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k1 v1 s1))) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k2 v2 s2))), P (@ins K V k1 v1 s1) (@ins K V k2 v2 s2) *) (* Goal: forall _ : @eq_mem (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k1 v1 s1))) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (SerTop.nil K V))), P (@ins K V k1 v1 s1) (SerTop.nil K V) *) (* Goal: forall _ : @eq_mem (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (SerTop.nil K V))) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k2 v2 s2))), P (SerTop.nil K V) (@ins K V k2 v2 s2) *) by move/(_ k2); rewrite supp_ins inE /= eq_refl supp_nil. (* Goal: forall _ : @eq_mem (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k1 v1 s1))) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k2 v2 s2))), P (@ins K V k1 v1 s1) (@ins K V k2 v2 s2) *) (* Goal: forall _ : @eq_mem (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k1 v1 s1))) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (SerTop.nil K V))), P (@ins K V k1 v1 s1) (SerTop.nil K V) *) - (* Goal: forall _ : @eq_mem (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k1 v1 s1))) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k2 v2 s2))), P (@ins K V k1 v1 s1) (@ins K V k2 v2 s2) *) (* Goal: forall _ : @eq_mem (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k1 v1 s1))) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (SerTop.nil K V))), P (@ins K V k1 v1 s1) (SerTop.nil K V) *) by move/(_ k1); rewrite supp_ins inE /= eq_refl supp_nil. (* Goal: forall _ : @eq_mem (Equality.sort (Ordered.eqType K)) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k1 v1 s1))) (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k2 v2 s2))), P (@ins K V k1 v1 s1) (@ins K V k2 v2 s2) *) by case/supp_eq_ins=>// E; rewrite -{k2}E in T2 *; move/IH1; apply: H2. Qed. End FMapInd. Section DisjointUnion. Variable (K : ordType) (V : Type). Notation fmap := (finMap K V). Notation nil := (nil K V). Definition disj (s1 s2 : fmap) := all (predC (fun x => x \in supp s2)) (supp s1). CoInductive disj_spec (s1 s2 : fmap) : bool -> Type := | disj_true of (forall x, x \in supp s1 -> x \notin supp s2) : disj_spec s1 s2 true | disj_false x of x \in supp s1 & x \in supp s2 : disj_spec s1 s2 false. Lemma disjP s1 s2 : disj_spec s1 s2 (disj s1 s2). Proof. (* Goal: disj_spec s1 s2 (disj s1 s2) *) rewrite /disj; case E: (all _ _). (* Goal: disj_spec s1 s2 false *) (* Goal: disj_spec s1 s2 true *) - (* Goal: disj_spec s1 s2 false *) (* Goal: disj_spec s1 s2 true *) by apply: disj_true; case: allP E. (* Goal: disj_spec s1 s2 false *) move: E; rewrite all_predC; move/negbFE. (* Goal: forall _ : is_true (@has (Equality.sort (Ordered.eqType K)) (fun x : Equality.sort (Ordered.eqType K) => @in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s2))) (@supp K V s1)), disj_spec s1 s2 false *) by case: hasPx=>// x H1 H2 _; apply: disj_false H1 H2. Qed. Lemma disjC s1 s2 : disj s1 s2 = disj s2 s1. Proof. (* Goal: @eq bool (disj s1 s2) (disj s2 s1) *) case: disjP; case: disjP=>//. (* Goal: forall (_ : forall (x : Equality.sort (Ordered.eqType K)) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s2)))), is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1))))) (x : Equality.sort (Ordered.eqType K)) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s2)))), @eq bool false true *) (* Goal: forall (x : Equality.sort (Ordered.eqType K)) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s2)))) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) (_ : forall (x0 : Equality.sort (Ordered.eqType K)) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x0 (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))), is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) x0 (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s2))))), @eq bool true false *) - (* Goal: forall (_ : forall (x : Equality.sort (Ordered.eqType K)) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s2)))), is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1))))) (x : Equality.sort (Ordered.eqType K)) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s2)))), @eq bool false true *) (* Goal: forall (x : Equality.sort (Ordered.eqType K)) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s2)))) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) (_ : forall (x0 : Equality.sort (Ordered.eqType K)) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x0 (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))), is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) x0 (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s2))))), @eq bool true false *) by move=>x H1 H2; move/(_ x H2); rewrite H1. (* Goal: forall (_ : forall (x : Equality.sort (Ordered.eqType K)) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s2)))), is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1))))) (x : Equality.sort (Ordered.eqType K)) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s2)))), @eq bool false true *) by move=>H1 x H2; move/H1; rewrite H2. Qed. Lemma disj_nil (s : fmap) : disj s nil. Proof. (* Goal: is_true (disj s (SerTop.nil K V)) *) by case: disjP. Qed. Lemma disj_ins k v (s1 s2 : fmap) : disj s1 (ins k v s2) = (k \notin supp s1) && (disj s1 s2). Proof. (* Goal: @eq bool (disj s1 (@ins K V k v s2)) (andb (negb (@in_mem (Ordered.sort K) k (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) (disj s1 s2)) *) case: disjP=>[H|x H1]. (* Goal: forall _ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k v s2)))), @eq bool false (andb (negb (@in_mem (Ordered.sort K) k (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) (disj s1 s2)) *) (* Goal: @eq bool true (andb (negb (@in_mem (Ordered.sort K) k (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) (disj s1 s2)) *) - (* Goal: forall _ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k v s2)))), @eq bool false (andb (negb (@in_mem (Ordered.sort K) k (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) (disj s1 s2)) *) (* Goal: @eq bool true (andb (negb (@in_mem (Ordered.sort K) k (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) (disj s1 s2)) *) case E: (k \in supp s1)=>/=. (* Goal: forall _ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k v s2)))), @eq bool false (andb (negb (@in_mem (Ordered.sort K) k (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) (disj s1 s2)) *) (* Goal: @eq bool true (disj s1 s2) *) (* Goal: @eq bool true false *) - (* Goal: forall _ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k v s2)))), @eq bool false (andb (negb (@in_mem (Ordered.sort K) k (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) (disj s1 s2)) *) (* Goal: @eq bool true (disj s1 s2) *) (* Goal: @eq bool true false *) by move: (H _ E); rewrite supp_ins inE /= eq_refl. (* Goal: forall _ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k v s2)))), @eq bool false (andb (negb (@in_mem (Ordered.sort K) k (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) (disj s1 s2)) *) (* Goal: @eq bool true (disj s1 s2) *) case: disjP=>// x H1 H2. (* Goal: forall _ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k v s2)))), @eq bool false (andb (negb (@in_mem (Ordered.sort K) k (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) (disj s1 s2)) *) (* Goal: @eq bool true false *) by move: (H _ H1); rewrite supp_ins inE /= H2 orbT. (* Goal: forall _ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@ins K V k v s2)))), @eq bool false (andb (negb (@in_mem (Ordered.sort K) k (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) (disj s1 s2)) *) rewrite supp_ins inE /=; case/orP=>[|H2]. (* Goal: @eq bool false (andb (negb (@in_mem (Ordered.sort K) k (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) (disj s1 s2)) *) (* Goal: forall _ : is_true (@eq_op (Ordered.eqType K) x k), @eq bool false (andb (negb (@in_mem (Ordered.sort K) k (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) (disj s1 s2)) *) - (* Goal: @eq bool false (andb (negb (@in_mem (Ordered.sort K) k (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) (disj s1 s2)) *) (* Goal: forall _ : is_true (@eq_op (Ordered.eqType K) x k), @eq bool false (andb (negb (@in_mem (Ordered.sort K) k (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) (disj s1 s2)) *) by move/eqP=><-; rewrite H1. (* Goal: @eq bool false (andb (negb (@in_mem (Ordered.sort K) k (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) (disj s1 s2)) *) rewrite andbC; case: disjP=>[H|y H3 H4] //=. (* Goal: @eq bool false (negb (@in_mem (Ordered.sort K) k (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) *) by move: (H _ H1); rewrite H2. Qed. Lemma disj_rem k (s1 s2 : fmap) : disj s1 s2 -> disj s1 (rem k s2). Proof. (* Goal: forall _ : is_true (disj s1 s2), is_true (disj s1 (@rem K V k s2)) *) case: disjP=>// H _; case: disjP=>// x; move/H. (* Goal: forall (_ : is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s2))))) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@rem K V k s2))))), is_true false *) by rewrite supp_rem inE /= andbC; move/negbTE=>->. Qed. Lemma disj_remE k (s1 s2 : fmap) : k \notin supp s1 -> disj s1 (rem k s2) = disj s1 s2. Proof. (* Goal: forall _ : is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) k (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))), @eq bool (disj s1 (@rem K V k s2)) (disj s1 s2) *) move=>H; case: disjP; case: disjP=>//; last first. (* Goal: forall (x : Equality.sort (Ordered.eqType K)) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s2)))) (_ : forall (x0 : Equality.sort (Ordered.eqType K)) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x0 (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))), is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) x0 (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@rem K V k s2)))))), @eq bool true false *) (* Goal: forall (_ : forall (x : Equality.sort (Ordered.eqType K)) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))), is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s2))))) (x : Equality.sort (Ordered.eqType K)) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@rem K V k s2))))), @eq bool false true *) - (* Goal: forall (x : Equality.sort (Ordered.eqType K)) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s2)))) (_ : forall (x0 : Equality.sort (Ordered.eqType K)) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x0 (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))), is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) x0 (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@rem K V k s2)))))), @eq bool true false *) (* Goal: forall (_ : forall (x : Equality.sort (Ordered.eqType K)) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))), is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s2))))) (x : Equality.sort (Ordered.eqType K)) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@rem K V k s2))))), @eq bool false true *) move=>H1 x; move/H1; rewrite supp_rem inE /= => E. (* Goal: forall (x : Equality.sort (Ordered.eqType K)) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s2)))) (_ : forall (x0 : Equality.sort (Ordered.eqType K)) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x0 (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))), is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) x0 (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@rem K V k s2)))))), @eq bool true false *) (* Goal: forall _ : is_true (andb (negb (@eq_op (Ordered.eqType K) x k)) (@in_mem (Ordered.sort K) x (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s2)))), @eq bool false true *) by rewrite (negbTE E) andbF. (* Goal: forall (x : Equality.sort (Ordered.eqType K)) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s2)))) (_ : forall (x0 : Equality.sort (Ordered.eqType K)) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType K)) x0 (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))), is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) x0 (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@rem K V k s2)))))), @eq bool true false *) move=>x H1 H2 H3; move: (H3 x H1) H. (* Goal: forall (_ : is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) x (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V (@rem K V k s2)))))) (_ : is_true (negb (@in_mem (Equality.sort (Ordered.eqType K)) k (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1))))), @eq bool true false *) rewrite supp_rem inE /= negb_and H2 orbF negbK. (* Goal: forall (_ : is_true (@eq_op (Ordered.eqType K) x k)) (_ : is_true (negb (@in_mem (Ordered.sort K) k (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1))))), @eq bool true false *) by move/eqP=><-; rewrite H1. Qed. Lemma disj_fcat (s s1 s2 : fmap) : disj s (fcat s1 s2) = disj s s1 && disj s s2. Proof. (* Goal: @eq bool (disj s (@fcat K V s1 s2)) (andb (disj s s1) (disj s s2)) *) elim/fmap_ind': s s1 s2=>[|k v s L IH] s1 s2. (* Goal: @eq bool (disj (@ins K V k v s) (@fcat K V s1 s2)) (andb (disj (@ins K V k v s) s1) (disj (@ins K V k v s) s2)) *) (* Goal: @eq bool (disj (SerTop.nil K V) (@fcat K V s1 s2)) (andb (disj (SerTop.nil K V) s1) (disj (SerTop.nil K V) s2)) *) - (* Goal: @eq bool (disj (@ins K V k v s) (@fcat K V s1 s2)) (andb (disj (@ins K V k v s) s1) (disj (@ins K V k v s) s2)) *) (* Goal: @eq bool (disj (SerTop.nil K V) (@fcat K V s1 s2)) (andb (disj (SerTop.nil K V) s1) (disj (SerTop.nil K V) s2)) *) by rewrite !(disjC nil) !disj_nil. (* Goal: @eq bool (disj (@ins K V k v s) (@fcat K V s1 s2)) (andb (disj (@ins K V k v s) s1) (disj (@ins K V k v s) s2)) *) rewrite !(disjC (ins _ _ _)) !disj_ins supp_fcat inE /= negb_or. (* Goal: @eq bool (andb (andb (negb (@in_mem (Ordered.sort K) k (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) (negb (@in_mem (Ordered.sort K) k (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s2))))) (disj (@fcat K V s1 s2) s)) (andb (andb (negb (@in_mem (Ordered.sort K) k (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) (disj s1 s)) (andb (negb (@in_mem (Ordered.sort K) k (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s2)))) (disj s2 s))) *) case: (k \in supp s1)=>//=. (* Goal: @eq bool (andb (negb (@in_mem (Ordered.sort K) k (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s2)))) (disj (@fcat K V s1 s2) s)) (andb (disj s1 s) (andb (negb (@in_mem (Ordered.sort K) k (@mem (Ordered.sort K) (seq_predType (Ordered.eqType K)) (@supp K V s2)))) (disj s2 s))) *) case: (k \in supp s2)=>//=; first by rewrite andbF. (* Goal: @eq bool (disj (@fcat K V s1 s2) s) (andb (disj s1 s) (disj s2 s)) *) by rewrite -!(disjC s) IH. Qed. Lemma fcatC (s1 s2 : fmap) : disj s1 s2 -> fcat s1 s2 = fcat s2 s1. Proof. (* Goal: forall _ : is_true (disj s1 s2), @eq (finMap K V) (@fcat K V s1 s2) (@fcat K V s2 s1) *) rewrite /fcat. (* Goal: forall _ : is_true (disj s1 s2), @eq (finMap K V) (@fcat' K V s1 (@seq_of K V s2)) (@fcat' K V s2 (@seq_of K V s1)) *) elim/fmap_ind': s2 s1=>[|k v s2 L IH] s1 /=; first by rewrite fcat_nil'. (* Goal: forall _ : is_true (disj s1 (@ins K V k v s2)), @eq (finMap K V) (@fcat' K V s1 (@seq_of K V (@ins K V k v s2))) (@fcat' K V (@ins K V k v s2) (@seq_of K V s1)) *) rewrite disj_ins; case/andP=>D1 D2. (* Goal: @eq (finMap K V) (@fcat' K V s1 (@seq_of K V (@ins K V k v s2))) (@fcat' K V (@ins K V k v s2) (@seq_of K V s1)) *) by rewrite fcat_ins' // -IH // seqof_ins //= -fcat_ins' ?notin_path. Qed. Lemma fcatA (s1 s2 s3 : fmap) : disj s2 s3 -> fcat (fcat s1 s2) s3 = fcat s1 (fcat s2 s3). Proof. (* Goal: forall _ : is_true (disj s2 s3), @eq (finMap K V) (@fcat K V (@fcat K V s1 s2) s3) (@fcat K V s1 (@fcat K V s2 s3)) *) move=>H. (* Goal: @eq (finMap K V) (@fcat K V (@fcat K V s1 s2) s3) (@fcat K V s1 (@fcat K V s2 s3)) *) elim/fmap_ind': s3 s1 s2 H=>[|k v s3 L IH] s1 s2 /=; first by rewrite !fcats0. (* Goal: forall _ : is_true (disj s2 (@ins K V k v s3)), @eq (finMap K V) (@fcat K V (@fcat K V s1 s2) (@ins K V k v s3)) (@fcat K V s1 (@fcat K V s2 (@ins K V k v s3))) *) rewrite disj_ins; case/andP=>H1 H2. (* Goal: @eq (finMap K V) (@fcat K V (@fcat K V s1 s2) (@ins K V k v s3)) (@fcat K V s1 (@fcat K V s2 (@ins K V k v s3))) *) by rewrite fcat_sins ?notin_path // IH // fcat_sins ?notin_path // fcat_sins. Qed. Lemma fcatAC (s1 s2 s3 : fmap) : [&& disj s1 s2, disj s2 s3 & disj s1 s3] -> fcat s1 (fcat s2 s3) = fcat s2 (fcat s1 s3). Proof. (* Goal: forall _ : is_true (andb (disj s1 s2) (andb (disj s2 s3) (disj s1 s3))), @eq (finMap K V) (@fcat K V s1 (@fcat K V s2 s3)) (@fcat K V s2 (@fcat K V s1 s3)) *) by case/and3P=>H1 H2 H3; rewrite -!fcatA // (@fcatC s1 s2). Qed. Lemma fcatCA (s1 s2 s3 : fmap) : [&& disj s1 s2, disj s2 s3 & disj s1 s3] -> fcat (fcat s1 s2) s3 = fcat (fcat s1 s3) s2. Proof. (* Goal: forall _ : is_true (andb (disj s1 s2) (andb (disj s2 s3) (disj s1 s3))), @eq (finMap K V) (@fcat K V (@fcat K V s1 s2) s3) (@fcat K V (@fcat K V s1 s3) s2) *) by case/and3P=>H1 H2 H3; rewrite !fcatA // ?(@fcatC s2 s3) ?(disjC s3). Qed. Lemma fcatsK (s s1 s2 : fmap) : disj s1 s && disj s2 s -> fcat s1 s = fcat s2 s -> s1 = s2. Proof. (* Goal: forall (_ : is_true (andb (disj s1 s) (disj s2 s))) (_ : @eq (finMap K V) (@fcat K V s1 s) (@fcat K V s2 s)), @eq (finMap K V) s1 s2 *) elim/fmap_ind': s s1 s2=>// k v s. (* Goal: forall (_ : is_true (@path (Ordered.sort K) (@ord K) k (@supp K V s))) (_ : forall (s1 s2 : finMap K V) (_ : is_true (andb (disj s1 s) (disj s2 s))) (_ : @eq (finMap K V) (@fcat K V s1 s) (@fcat K V s2 s)), @eq (finMap K V) s1 s2) (s1 s2 : finMap K V) (_ : is_true (andb (disj s1 (@ins K V k v s)) (disj s2 (@ins K V k v s)))) (_ : @eq (finMap K V) (@fcat K V s1 (@ins K V k v s)) (@fcat K V s2 (@ins K V k v s))), @eq (finMap K V) s1 s2 *) move/notin_path=>H IH s1 s2; rewrite !disj_ins. (* Goal: forall (_ : is_true (andb (andb (negb (@in_mem (Ordered.sort K) k (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s1)))) (disj s1 s)) (andb (negb (@in_mem (Ordered.sort K) k (@mem (Equality.sort (Ordered.eqType K)) (seq_predType (Ordered.eqType K)) (@supp K V s2)))) (disj s2 s)))) (_ : @eq (finMap K V) (@fcat K V s1 (@ins K V k v s)) (@fcat K V s2 (@ins K V k v s))), @eq (finMap K V) s1 s2 *) case/andP; case/andP=>H1 H2; case/andP=>H3 H4. (* Goal: forall _ : @eq (finMap K V) (@fcat K V s1 (@ins K V k v s)) (@fcat K V s2 (@ins K V k v s)), @eq (finMap K V) s1 s2 *) rewrite !fcat_sins // => H5. (* Goal: @eq (finMap K V) s1 s2 *) apply: IH; first by rewrite H2 H4. (* Goal: @eq (finMap K V) (@fcat K V s1 s) (@fcat K V s2 s) *) by apply: cancel_ins H5; rewrite supp_fcat negb_or /= ?H1?H3 H. Qed. Lemma fcatKs (s s1 s2 : fmap) : disj s s1 && disj s s2 -> fcat s s1 = fcat s s2 -> s1 = s2. End DisjointUnion. Section EqType. Variables (K : ordType) (V : eqType). Definition feq (s1 s2 : finMap K V) := seq_of s1 == seq_of s2. Lemma feqP : Equality.axiom feq. Proof. (* Goal: @Equality.axiom (finMap K (Equality.sort V)) feq *) move=>s1 s2; rewrite /feq. (* Goal: Bool.reflect (@eq (finMap K (Equality.sort V)) s1 s2) (@eq_op (seq_eqType (prod_eqType (Ordered.eqType K) V)) (@seq_of K (Equality.sort V) s1) (@seq_of K (Equality.sort V) s2)) *) case: eqP; first by move/fmapE=>->; apply: ReflectT. (* Goal: forall _ : not (@eq (Equality.sort (seq_eqType (prod_eqType (Ordered.eqType K) V))) (@seq_of K (Equality.sort V) s1) (@seq_of K (Equality.sort V) s2)), Bool.reflect (@eq (finMap K (Equality.sort V)) s1 s2) false *) by move=>H; apply: ReflectF; move/fmapE; move/H. Qed. Canonical Structure fmap_eqMixin := EqMixin feqP. Canonical Structure fmap_eqType := EqType (finMap K V) fmap_eqMixin. End EqType.
Require Import mathcomp.ssreflect.ssreflect. From mathcomp Require Import ssrbool ssrfun eqtype ssrnat div seq choice fintype. From mathcomp Require Import finfun bigop. Set Implicit Arguments. Unset Strict Implicit. Unset Printing Implicit Defensive. Section SetType. Variable T : finType. Inductive set_type : predArgType := FinSet of {ffun pred T}. Definition finfun_of_set A := let: FinSet f := A in f. Definition set_of of phant T := set_type. Identity Coercion type_of_set_of : set_of >-> set_type. Canonical set_subType := Eval hnf in [newType for finfun_of_set]. Definition set_eqMixin := Eval hnf in [eqMixin of set_type by <:]. Canonical set_eqType := Eval hnf in EqType set_type set_eqMixin. Definition set_choiceMixin := [choiceMixin of set_type by <:]. Canonical set_choiceType := Eval hnf in ChoiceType set_type set_choiceMixin. Definition set_countMixin := [countMixin of set_type by <:]. Canonical set_countType := Eval hnf in CountType set_type set_countMixin. Canonical set_subCountType := Eval hnf in [subCountType of set_type]. Definition set_finMixin := [finMixin of set_type by <:]. Canonical set_finType := Eval hnf in FinType set_type set_finMixin. Canonical set_subFinType := Eval hnf in [subFinType of set_type]. End SetType. Delimit Scope set_scope with SET. Bind Scope set_scope with set_type. Bind Scope set_scope with set_of. Open Scope set_scope. Arguments finfun_of_set {T} A%SET. Notation "{ 'set' T }" := (set_of (Phant T)) (at level 0, format "{ 'set' T }") : type_scope. Notation "A :=: B" := (A = B :> {set _}) (at level 70, no associativity, only parsing) : set_scope. Notation "A :<>: B" := (A <> B :> {set _}) (at level 70, no associativity, only parsing) : set_scope. Notation "A :==: B" := (A == B :> {set _}) (at level 70, no associativity, only parsing) : set_scope. Notation "A :!=: B" := (A != B :> {set _}) (at level 70, no associativity, only parsing) : set_scope. Notation "A :=P: B" := (A =P B :> {set _}) (at level 70, no associativity, only parsing) : set_scope. Local Notation finset_def := (fun T P => @FinSet T (finfun P)). Local Notation pred_of_set_def := (fun T (A : set_type T) => val A : _ -> _). Module Type SetDefSig. Parameter finset : forall T : finType, pred T -> {set T}. Parameter pred_of_set : forall T, set_type T -> fin_pred_sort (predPredType T). Axiom finsetE : finset = finset_def. Axiom pred_of_setE : pred_of_set = pred_of_set_def. End SetDefSig. Module SetDef : SetDefSig. Definition finset := finset_def. Definition pred_of_set := pred_of_set_def. Lemma finsetE : finset = finset_def. Proof. by []. Qed. Proof. (* Goal: @eq (forall (T : Finite.type) (_ : forall _ : Finite.sort T, bool), set_type T) finset (fun (T : Finite.type) (P : forall _ : Finite.sort T, bool) => @FinSet T (@FunFinfun.finfun T bool P)) *) by []. Qed. End SetDef. Notation finset := SetDef.finset. Notation pred_of_set := SetDef.pred_of_set. Canonical finset_unlock := Unlockable SetDef.finsetE. Canonical pred_of_set_unlock := Unlockable SetDef.pred_of_setE. Notation "[ 'set' x : T | P ]" := (finset (fun x : T => P%B)) (at level 0, x at level 99, only parsing) : set_scope. Notation "[ 'set' x | P ]" := [set x : _ | P] (at level 0, x, P at level 99, format "[ 'set' x | P ]") : set_scope. Notation "[ 'set' x 'in' A ]" := [set x | x \in A] (at level 0, x at level 99, format "[ 'set' x 'in' A ]") : set_scope. Notation "[ 'set' x : T 'in' A ]" := [set x : T | x \in A] (at level 0, x at level 99, only parsing) : set_scope. Notation "[ 'set' x : T | P & Q ]" := [set x : T | P && Q] (at level 0, x at level 99, only parsing) : set_scope. Notation "[ 'set' x | P & Q ]" := [set x | P && Q ] (at level 0, x, P at level 99, format "[ 'set' x | P & Q ]") : set_scope. Notation "[ 'set' x : T 'in' A | P ]" := [set x : T | x \in A & P] (at level 0, x at level 99, only parsing) : set_scope. Notation "[ 'set' x 'in' A | P ]" := [set x | x \in A & P] (at level 0, x at level 99, format "[ 'set' x 'in' A | P ]") : set_scope. Notation "[ 'set' x 'in' A | P & Q ]" := [set x in A | P && Q] (at level 0, x at level 99, format "[ 'set' x 'in' A | P & Q ]") : set_scope. Notation "[ 'set' x : T 'in' A | P & Q ]" := [set x : T in A | P && Q] (at level 0, x at level 99, only parsing) : set_scope. Coercion pred_of_set: set_type >-> fin_pred_sort. Canonical set_predType T := Eval hnf in @mkPredType _ (unkeyed (set_type T)) (@pred_of_set T). Section BasicSetTheory. Variable T : finType. Implicit Types (x : T) (A B : {set T}) (pA : pred T). Canonical set_of_subType := Eval hnf in [subType of {set T}]. Canonical set_of_eqType := Eval hnf in [eqType of {set T}]. Canonical set_of_choiceType := Eval hnf in [choiceType of {set T}]. Canonical set_of_countType := Eval hnf in [countType of {set T}]. Canonical set_of_subCountType := Eval hnf in [subCountType of {set T}]. Canonical set_of_finType := Eval hnf in [finType of {set T}]. Canonical set_of_subFinType := Eval hnf in [subFinType of {set T}]. Lemma in_set pA x : x \in finset pA = pA x. Proof. (* Goal: @eq bool (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@SetDef.finset T pA)))) (pA x) *) by rewrite [@finset]unlock unlock [x \in _]ffunE. Qed. Lemma setP A B : A =i B <-> A = B. Proof. (* Goal: iff (@eq_mem (Finite.sort T) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B))) (@eq (@set_of T (Phant (Finite.sort T))) A B) *) by split=> [eqAB|-> //]; apply/val_inj/ffunP=> x; have:= eqAB x; rewrite unlock. Qed. Definition set0 := [set x : T | false]. Definition setTfor (phT : phant T) := [set x : T | true]. Lemma in_setT x : x \in setTfor (Phant T). Proof. (* Goal: is_true (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (setTfor (Phant (Finite.sort T)))))) *) by rewrite in_set. Qed. Lemma eqsVneq A B : {A = B} + {A != B}. Proof. (* Goal: sumbool (@eq (@set_of T (Phant (Finite.sort T))) A B) (is_true (negb (@eq_op set_of_eqType A B))) *) exact: eqVneq. Qed. End BasicSetTheory. Definition inE := (in_set, inE). Arguments set0 {T}. Hint Resolve in_setT : core. Notation "[ 'set' : T ]" := (setTfor (Phant T)) (at level 0, format "[ 'set' : T ]") : set_scope. Notation setT := [set: _] (only parsing). Section setOpsDefs. Variable T : finType. Implicit Types (a x : T) (A B D : {set T}) (P : {set {set T}}). Definition set1 a := [set x | x == a]. Definition setU A B := [set x | (x \in A) || (x \in B)]. Definition setI A B := [set x in A | x \in B]. Definition setC A := [set x | x \notin A]. Definition setD A B := [set x | x \notin B & x \in A]. Definition ssetI P D := [set A in P | A \subset D]. Definition powerset D := [set A : {set T} | A \subset D]. End setOpsDefs. Notation "[ 'set' a ]" := (set1 a) (at level 0, a at level 99, format "[ 'set' a ]") : set_scope. Notation "[ 'set' a : T ]" := [set (a : T)] (at level 0, a at level 99, format "[ 'set' a : T ]") : set_scope. Notation "A :|: B" := (setU A B) : set_scope. Notation "a |: A" := ([set a] :|: A) : set_scope. Notation "[ 'set' a1 ; a2 ; .. ; an ]" := (setU .. (a1 |: [set a2]) .. [set an]) (at level 0, a1 at level 99, format "[ 'set' a1 ; a2 ; .. ; an ]") : set_scope. Notation "A :&: B" := (setI A B) : set_scope. Notation "~: A" := (setC A) (at level 35, right associativity) : set_scope. Notation "[ 'set' ~ a ]" := (~: [set a]) (at level 0, format "[ 'set' ~ a ]") : set_scope. Notation "A :\: B" := (setD A B) : set_scope. Notation "A :\ a" := (A :\: [set a]) : set_scope. Notation "P ::&: D" := (ssetI P D) (at level 48) : set_scope. Section setOps. Variable T : finType. Implicit Types (a x : T) (A B C D : {set T}) (pA pB pC : pred T). Lemma eqEsubset A B : (A == B) = (A \subset B) && (B \subset A). Proof. (* Goal: @eq bool (@eq_op (set_of_eqType T) A B) (andb (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B))) (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)))) *) by apply/eqP/subset_eqP=> /setP. Qed. Lemma subEproper A B : A \subset B = (A == B) || (A \proper B). Proof. (* Goal: @eq bool (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B))) (orb (@eq_op (set_of_eqType T) A B) (@proper T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)))) *) by rewrite eqEsubset -andb_orr orbN andbT. Qed. Lemma eqVproper A B : A \subset B -> A = B \/ A \proper B. Proof. (* Goal: forall _ : is_true (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B))), or (@eq (@set_of T (Phant (Finite.sort T))) A B) (is_true (@proper T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)))) *) by rewrite subEproper => /predU1P. Qed. Lemma properEneq A B : A \proper B = (A != B) && (A \subset B). Proof. (* Goal: @eq bool (@proper T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B))) (andb (negb (@eq_op (set_of_eqType T) A B)) (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)))) *) by rewrite andbC eqEsubset negb_and andb_orr andbN. Qed. Lemma proper_neq A B : A \proper B -> A != B. Proof. (* Goal: forall _ : is_true (@proper T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B))), is_true (negb (@eq_op (set_of_eqType T) A B)) *) by rewrite properEneq; case/andP. Qed. Lemma eqEproper A B : (A == B) = (A \subset B) && ~~ (A \proper B). Proof. (* Goal: @eq bool (@eq_op (set_of_eqType T) A B) (andb (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B))) (negb (@proper T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B))))) *) by rewrite negb_and negbK andb_orr andbN eqEsubset. Qed. Lemma eqEcard A B : (A == B) = (A \subset B) && (#|B| <= #|A|). Proof. (* Goal: @eq bool (@eq_op (set_of_eqType T) A B) (andb (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B))) (leq (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B))) (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A))))) *) rewrite eqEsubset; apply: andb_id2l => sAB. (* Goal: @eq bool (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A))) (leq (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B))) (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)))) *) by rewrite (geq_leqif (subset_leqif_card sAB)). Qed. Lemma properEcard A B : (A \proper B) = (A \subset B) && (#|A| < #|B|). Proof. (* Goal: @eq bool (@proper T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B))) (andb (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B))) (leq (S (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)))) (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B))))) *) by rewrite properEneq ltnNge andbC eqEcard; case: (A \subset B). Qed. Lemma subset_leqif_cards A B : A \subset B -> (#|A| <= #|B| ?= iff (A == B)). Proof. (* Goal: forall _ : is_true (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B))), leqif (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A))) (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B))) (@eq_op (set_of_eqType T) A B) *) by move=> sAB; rewrite eqEsubset sAB; apply: subset_leqif_card. Qed. Lemma in_set0 x : x \in set0 = false. Proof. (* Goal: @eq bool (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@set0 T)))) false *) by rewrite inE. Qed. Lemma sub0set A : set0 \subset A. Proof. (* Goal: is_true (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@set0 T))) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A))) *) by apply/subsetP=> x; rewrite inE. Qed. Lemma subset0 A : (A \subset set0) = (A == set0). Proof. (* Goal: @eq bool (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@set0 T)))) (@eq_op (set_of_eqType T) A (@set0 T)) *) by rewrite eqEsubset sub0set andbT. Qed. Lemma proper0 A : (set0 \proper A) = (A != set0). Proof. (* Goal: @eq bool (@proper T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@set0 T))) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A))) (negb (@eq_op (set_of_eqType T) A (@set0 T))) *) by rewrite properE sub0set subset0. Qed. Lemma subset_neq0 A B : A \subset B -> A != set0 -> B != set0. Proof. (* Goal: forall (_ : is_true (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)))) (_ : is_true (negb (@eq_op (set_of_eqType T) A (@set0 T)))), is_true (negb (@eq_op (set_of_eqType T) B (@set0 T))) *) by rewrite -!proper0 => sAB /proper_sub_trans->. Qed. Lemma set_0Vmem A : (A = set0) + {x : T | x \in A}. Proof. (* Goal: sum (@eq (@set_of T (Phant (Finite.sort T))) A (@set0 T)) (@sig (Finite.sort T) (fun x : Finite.sort T => is_true (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A))))) *) case: (pickP (mem A)) => [x Ax | A0]; [by right; exists x | left]. (* Goal: @eq (@set_of T (Phant (Finite.sort T))) A (@set0 T) *) by apply/setP=> x; rewrite inE; apply: A0. Qed. Lemma enum_set0 : enum set0 = [::] :> seq T. Proof. (* Goal: @eq (list (Finite.sort T)) (@enum_mem T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@set0 T)))) (@nil (Finite.sort T)) *) by rewrite (eq_enum (in_set _)) enum0. Qed. Lemma subsetT A : A \subset setT. Proof. (* Goal: is_true (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setTfor T (Phant (Finite.sort T)))))) *) by apply/subsetP=> x; rewrite inE. Qed. Lemma subsetT_hint mA : subset mA (mem [set: T]). Proof. (* Goal: is_true (@subset T mA (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setTfor T (Phant (Finite.sort T)))))) *) by rewrite unlock; apply/pred0P=> x; rewrite !inE. Qed. Hint Resolve subsetT_hint : core. Lemma subTset A : (setT \subset A) = (A == setT). Proof. (* Goal: @eq bool (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setTfor T (Phant (Finite.sort T))))) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A))) (@eq_op (set_of_eqType T) A (@setTfor T (Phant (Finite.sort T)))) *) by rewrite eqEsubset subsetT. Qed. Lemma properT A : (A \proper setT) = (A != setT). Proof. (* Goal: @eq bool (@proper T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setTfor T (Phant (Finite.sort T)))))) (negb (@eq_op (set_of_eqType T) A (@setTfor T (Phant (Finite.sort T))))) *) by rewrite properEneq subsetT andbT. Qed. Lemma set1P x a : reflect (x = a) (x \in [set a]). Proof. (* Goal: Bool.reflect (@eq (Finite.sort T) x a) (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@set1 T a)))) *) by rewrite inE; apply: eqP. Qed. Lemma enum_setT : enum [set: T] = Finite.enum T. Proof. (* Goal: @eq (list (Finite.sort T)) (@enum_mem T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setTfor T (Phant (Finite.sort T)))))) (Finite.EnumDef.enum T) *) by rewrite (eq_enum (in_set _)) enumT. Qed. Lemma in_set1 x a : (x \in [set a]) = (x == a). Proof. (* Goal: @eq bool (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@set1 T a)))) (@eq_op (Finite.eqType T) x a) *) exact: in_set. Qed. Lemma set11 x : x \in [set x]. Proof. (* Goal: is_true (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@set1 T x)))) *) by rewrite inE. Qed. Lemma set1_inj : injective (@set1 T). Proof. (* Goal: @injective (@set_of T (Phant (Finite.sort T))) (Finite.sort T) (@set1 T) *) by move=> a b eqsab; apply/set1P; rewrite -eqsab set11. Qed. Lemma enum_set1 a : enum [set a] = [:: a]. Proof. (* Goal: @eq (list (Finite.sort T)) (@enum_mem T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@set1 T a)))) (@cons (Finite.sort T) a (@nil (Finite.sort T))) *) by rewrite (eq_enum (in_set _)) enum1. Qed. Lemma setU1P x a B : reflect (x = a \/ x \in B) (x \in a |: B). Proof. (* Goal: Bool.reflect (or (@eq (Finite.sort T) x a) (is_true (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B))))) (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setU T (@set1 T a) B)))) *) by rewrite !inE; apply: predU1P. Qed. Lemma in_setU1 x a B : (x \in a |: B) = (x == a) || (x \in B). Proof. (* Goal: @eq bool (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setU T (@set1 T a) B)))) (orb (@eq_op (Finite.eqType T) x a) (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)))) *) by rewrite !inE. Qed. Lemma set_cons a s : [set x in a :: s] = a |: [set x in s]. Proof. (* Goal: @eq (@set_of T (Phant (Finite.sort T))) (@SetDef.finset T (fun x : Finite.sort T => @in_mem (Finite.sort T) x (@mem (Equality.sort (Finite.eqType T)) (seq_predType (Finite.eqType T)) (@cons (Finite.sort T) a s)))) (@setU T (@set1 T a) (@SetDef.finset T (fun x : Finite.sort T => @in_mem (Finite.sort T) x (@mem (Equality.sort (Finite.eqType T)) (seq_predType (Finite.eqType T)) s)))) *) by apply/setP=> x; rewrite !inE. Qed. Lemma setU11 x B : x \in x |: B. Proof. (* Goal: is_true (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setU T (@set1 T x) B)))) *) by rewrite !inE eqxx. Qed. Lemma setU1r x a B : x \in B -> x \in a |: B. Proof. (* Goal: forall _ : is_true (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B))), is_true (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setU T (@set1 T a) B)))) *) by move=> Bx; rewrite !inE predU1r. Qed. Lemma set1Ul x A b : x \in A -> x \in A :|: [set b]. Proof. (* Goal: forall _ : is_true (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A))), is_true (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setU T A (@set1 T b))))) *) by move=> Ax; rewrite !inE Ax. Qed. Lemma set1Ur A b : b \in A :|: [set b]. Proof. (* Goal: is_true (@in_mem (Finite.sort T) b (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setU T A (@set1 T b))))) *) by rewrite !inE eqxx orbT. Qed. Lemma in_setC1 x a : (x \in [set~ a]) = (x != a). Proof. (* Goal: @eq bool (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setC T (@set1 T a))))) (negb (@eq_op (Finite.eqType T) x a)) *) by rewrite !inE. Qed. Lemma setC11 x : (x \in [set~ x]) = false. Proof. (* Goal: @eq bool (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setC T (@set1 T x))))) false *) by rewrite !inE eqxx. Qed. Lemma setD1P x A b : reflect (x != b /\ x \in A) (x \in A :\ b). Proof. (* Goal: Bool.reflect (and (is_true (negb (@eq_op (Finite.eqType T) x b))) (is_true (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A))))) (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setD T A (@set1 T b))))) *) by rewrite !inE; apply: andP. Qed. Lemma in_setD1 x A b : (x \in A :\ b) = (x != b) && (x \in A) . Proof. (* Goal: @eq bool (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setD T A (@set1 T b))))) (andb (negb (@eq_op (Finite.eqType T) x b)) (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)))) *) by rewrite !inE. Qed. Lemma setD11 b A : (b \in A :\ b) = false. Proof. (* Goal: @eq bool (@in_mem (Finite.sort T) b (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setD T A (@set1 T b))))) false *) by rewrite !inE eqxx. Qed. Lemma setD1K a A : a \in A -> a |: (A :\ a) = A. Proof. (* Goal: forall _ : is_true (@in_mem (Finite.sort T) a (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A))), @eq (@set_of T (Phant (Finite.sort T))) (@setU T (@set1 T a) (@setD T A (@set1 T a))) A *) by move=> Aa; apply/setP=> x; rewrite !inE; case: eqP => // ->. Qed. Lemma setU1K a B : a \notin B -> (a |: B) :\ a = B. Proof. (* Goal: forall _ : is_true (negb (@in_mem (Finite.sort T) a (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)))), @eq (@set_of T (Phant (Finite.sort T))) (@setD T (@setU T (@set1 T a) B) (@set1 T a)) B *) by move/negPf=> nBa; apply/setP=> x; rewrite !inE; case: eqP => // ->. Qed. Lemma set2P x a b : reflect (x = a \/ x = b) (x \in [set a; b]). Proof. (* Goal: Bool.reflect (or (@eq (Finite.sort T) x a) (@eq (Finite.sort T) x b)) (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setU T (@set1 T a) (@set1 T b))))) *) by rewrite !inE; apply: pred2P. Qed. Lemma in_set2 x a b : (x \in [set a; b]) = (x == a) || (x == b). Proof. (* Goal: @eq bool (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setU T (@set1 T a) (@set1 T b))))) (orb (@eq_op (Finite.eqType T) x a) (@eq_op (Finite.eqType T) x b)) *) by rewrite !inE. Qed. Lemma set21 a b : a \in [set a; b]. Proof. (* Goal: is_true (@in_mem (Finite.sort T) a (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setU T (@set1 T a) (@set1 T b))))) *) by rewrite !inE eqxx. Qed. Lemma set22 a b : b \in [set a; b]. Proof. (* Goal: is_true (@in_mem (Finite.sort T) b (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setU T (@set1 T a) (@set1 T b))))) *) by rewrite !inE eqxx orbT. Qed. Lemma setUP x A B : reflect (x \in A \/ x \in B) (x \in A :|: B). Proof. (* Goal: Bool.reflect (or (is_true (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)))) (is_true (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B))))) (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setU T A B)))) *) by rewrite !inE; apply: orP. Qed. Lemma in_setU x A B : (x \in A :|: B) = (x \in A) || (x \in B). Proof. (* Goal: @eq bool (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setU T A B)))) (orb (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A))) (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)))) *) exact: in_set. Qed. Lemma setUC A B : A :|: B = B :|: A. Proof. (* Goal: @eq (@set_of T (Phant (Finite.sort T))) (@setU T A B) (@setU T B A) *) by apply/setP => x; rewrite !inE orbC. Qed. Lemma setUS A B C : A \subset B -> C :|: A \subset C :|: B. Proof. (* Goal: forall _ : is_true (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B))), is_true (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setU T C A))) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setU T C B)))) *) move=> sAB; apply/subsetP=> x; rewrite !inE. (* Goal: forall _ : is_true (orb (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T C))) (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)))), is_true (orb (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T C))) (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)))) *) by case: (x \in C) => //; apply: (subsetP sAB). Qed. Lemma setSU A B C : A \subset B -> A :|: C \subset B :|: C. Proof. (* Goal: forall _ : is_true (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B))), is_true (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setU T A C))) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setU T B C)))) *) by move=> sAB; rewrite -!(setUC C) setUS. Qed. Lemma setUSS A B C D : A \subset C -> B \subset D -> A :|: B \subset C :|: D. Proof. (* Goal: forall (_ : is_true (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T C)))) (_ : is_true (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T D)))), is_true (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setU T A B))) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setU T C D)))) *) by move=> /(setSU B) /subset_trans sAC /(setUS C)/sAC. Qed. Lemma set0U A : set0 :|: A = A. Proof. (* Goal: @eq (@set_of T (Phant (Finite.sort T))) (@setU T (@set0 T) A) A *) by apply/setP => x; rewrite !inE orFb. Qed. Lemma setU0 A : A :|: set0 = A. Proof. (* Goal: @eq (@set_of T (Phant (Finite.sort T))) (@setU T A (@set0 T)) A *) by rewrite setUC set0U. Qed. Lemma setUA A B C : A :|: (B :|: C) = A :|: B :|: C. Proof. (* Goal: @eq (@set_of T (Phant (Finite.sort T))) (@setU T A (@setU T B C)) (@setU T (@setU T A B) C) *) by apply/setP => x; rewrite !inE orbA. Qed. Lemma setUCA A B C : A :|: (B :|: C) = B :|: (A :|: C). Proof. (* Goal: @eq (@set_of T (Phant (Finite.sort T))) (@setU T A (@setU T B C)) (@setU T B (@setU T A C)) *) by rewrite !setUA (setUC B). Qed. Lemma setUAC A B C : A :|: B :|: C = A :|: C :|: B. Proof. (* Goal: @eq (@set_of T (Phant (Finite.sort T))) (@setU T (@setU T A B) C) (@setU T (@setU T A C) B) *) by rewrite -!setUA (setUC B). Qed. Lemma setUACA A B C D : (A :|: B) :|: (C :|: D) = (A :|: C) :|: (B :|: D). Proof. (* Goal: @eq (@set_of T (Phant (Finite.sort T))) (@setU T (@setU T A B) (@setU T C D)) (@setU T (@setU T A C) (@setU T B D)) *) by rewrite -!setUA (setUCA B). Qed. Lemma setTU A : setT :|: A = setT. Proof. (* Goal: @eq (@set_of T (Phant (Finite.sort T))) (@setU T (@setTfor T (Phant (Finite.sort T))) A) (@setTfor T (Phant (Finite.sort T))) *) by apply/setP => x; rewrite !inE orTb. Qed. Lemma setUT A : A :|: setT = setT. Proof. (* Goal: @eq (@set_of T (Phant (Finite.sort T))) (@setU T A (@setTfor T (Phant (Finite.sort T)))) (@setTfor T (Phant (Finite.sort T))) *) by rewrite setUC setTU. Qed. Lemma setUid A : A :|: A = A. Proof. (* Goal: @eq (@set_of T (Phant (Finite.sort T))) (@setU T A A) A *) by apply/setP=> x; rewrite inE orbb. Qed. Lemma setUUl A B C : A :|: B :|: C = (A :|: C) :|: (B :|: C). Proof. (* Goal: @eq (@set_of T (Phant (Finite.sort T))) (@setU T (@setU T A B) C) (@setU T (@setU T A C) (@setU T B C)) *) by rewrite setUA !(setUAC _ C) -(setUA _ C) setUid. Qed. Lemma setUUr A B C : A :|: (B :|: C) = (A :|: B) :|: (A :|: C). Proof. (* Goal: @eq (@set_of T (Phant (Finite.sort T))) (@setU T A (@setU T B C)) (@setU T (@setU T A B) (@setU T A C)) *) by rewrite !(setUC A) setUUl. Qed. Lemma setIdP x pA pB : reflect (pA x /\ pB x) (x \in [set y | pA y & pB y]). Proof. (* Goal: Bool.reflect (and (is_true (pA x)) (is_true (pB x))) (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@SetDef.finset T (fun y : Finite.sort T => andb (pA y) (pB y)))))) *) by rewrite !inE; apply: andP. Qed. Lemma setId2P x pA pB pC : reflect [/\ pA x, pB x & pC x] (x \in [set y | pA y & pB y && pC y]). Proof. (* Goal: Bool.reflect (and3 (is_true (pA x)) (is_true (pB x)) (is_true (pC x))) (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@SetDef.finset T (fun y : Finite.sort T => andb (pA y) (andb (pB y) (pC y))))))) *) by rewrite !inE; apply: and3P. Qed. Lemma setIdE A pB : [set x in A | pB x] = A :&: [set x | pB x]. Proof. (* Goal: @eq (@set_of T (Phant (Finite.sort T))) (@SetDef.finset T (fun x : Finite.sort T => andb (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A))) (pB x))) (@setI T A (@SetDef.finset T (fun x : Finite.sort T => pB x))) *) by apply/setP=> x; rewrite !inE. Qed. Lemma setIP x A B : reflect (x \in A /\ x \in B) (x \in A :&: B). Proof. (* Goal: Bool.reflect (and (is_true (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)))) (is_true (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B))))) (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setI T A B)))) *) exact: (iffP (@setIdP _ _ _)). Qed. Lemma in_setI x A B : (x \in A :&: B) = (x \in A) && (x \in B). Proof. (* Goal: @eq bool (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setI T A B)))) (andb (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A))) (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)))) *) exact: in_set. Qed. Lemma setIC A B : A :&: B = B :&: A. Proof. (* Goal: @eq (@set_of T (Phant (Finite.sort T))) (@setI T A B) (@setI T B A) *) by apply/setP => x; rewrite !inE andbC. Qed. Lemma setIS A B C : A \subset B -> C :&: A \subset C :&: B. Proof. (* Goal: forall _ : is_true (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B))), is_true (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setI T C A))) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setI T C B)))) *) move=> sAB; apply/subsetP=> x; rewrite !inE. (* Goal: forall _ : is_true (andb (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T C))) (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)))), is_true (andb (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T C))) (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)))) *) by case: (x \in C) => //; apply: (subsetP sAB). Qed. Lemma setSI A B C : A \subset B -> A :&: C \subset B :&: C. Proof. (* Goal: forall _ : is_true (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B))), is_true (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setI T A C))) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setI T B C)))) *) by move=> sAB; rewrite -!(setIC C) setIS. Qed. Lemma setISS A B C D : A \subset C -> B \subset D -> A :&: B \subset C :&: D. Proof. (* Goal: forall (_ : is_true (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T C)))) (_ : is_true (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T D)))), is_true (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setI T A B))) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setI T C D)))) *) by move=> /(setSI B) /subset_trans sAC /(setIS C) /sAC. Qed. Lemma setTI A : setT :&: A = A. Proof. (* Goal: @eq (@set_of T (Phant (Finite.sort T))) (@setI T (@setTfor T (Phant (Finite.sort T))) A) A *) by apply/setP => x; rewrite !inE andTb. Qed. Lemma setIT A : A :&: setT = A. Proof. (* Goal: @eq (@set_of T (Phant (Finite.sort T))) (@setI T A (@setTfor T (Phant (Finite.sort T)))) A *) by rewrite setIC setTI. Qed. Lemma set0I A : set0 :&: A = set0. Proof. (* Goal: @eq (@set_of T (Phant (Finite.sort T))) (@setI T (@set0 T) A) (@set0 T) *) by apply/setP => x; rewrite !inE andFb. Qed. Lemma setI0 A : A :&: set0 = set0. Proof. (* Goal: @eq (@set_of T (Phant (Finite.sort T))) (@setI T A (@set0 T)) (@set0 T) *) by rewrite setIC set0I. Qed. Lemma setIA A B C : A :&: (B :&: C) = A :&: B :&: C. Proof. (* Goal: @eq (@set_of T (Phant (Finite.sort T))) (@setI T A (@setI T B C)) (@setI T (@setI T A B) C) *) by apply/setP=> x; rewrite !inE andbA. Qed. Lemma setICA A B C : A :&: (B :&: C) = B :&: (A :&: C). Proof. (* Goal: @eq (@set_of T (Phant (Finite.sort T))) (@setI T A (@setI T B C)) (@setI T B (@setI T A C)) *) by rewrite !setIA (setIC A). Qed. Lemma setIAC A B C : A :&: B :&: C = A :&: C :&: B. Proof. (* Goal: @eq (@set_of T (Phant (Finite.sort T))) (@setI T (@setI T A B) C) (@setI T (@setI T A C) B) *) by rewrite -!setIA (setIC B). Qed. Lemma setIACA A B C D : (A :&: B) :&: (C :&: D) = (A :&: C) :&: (B :&: D). Proof. (* Goal: @eq (@set_of T (Phant (Finite.sort T))) (@setI T (@setI T A B) (@setI T C D)) (@setI T (@setI T A C) (@setI T B D)) *) by rewrite -!setIA (setICA B). Qed. Lemma setIid A : A :&: A = A. Proof. (* Goal: @eq (@set_of T (Phant (Finite.sort T))) (@setI T A A) A *) by apply/setP=> x; rewrite inE andbb. Qed. Lemma setIIl A B C : A :&: B :&: C = (A :&: C) :&: (B :&: C). Proof. (* Goal: @eq (@set_of T (Phant (Finite.sort T))) (@setI T (@setI T A B) C) (@setI T (@setI T A C) (@setI T B C)) *) by rewrite setIA !(setIAC _ C) -(setIA _ C) setIid. Qed. Lemma setIIr A B C : A :&: (B :&: C) = (A :&: B) :&: (A :&: C). Proof. (* Goal: @eq (@set_of T (Phant (Finite.sort T))) (@setI T A (@setI T B C)) (@setI T (@setI T A B) (@setI T A C)) *) by rewrite !(setIC A) setIIl. Qed. Lemma setIUr A B C : A :&: (B :|: C) = (A :&: B) :|: (A :&: C). Proof. (* Goal: @eq (@set_of T (Phant (Finite.sort T))) (@setI T A (@setU T B C)) (@setU T (@setI T A B) (@setI T A C)) *) by apply/setP=> x; rewrite !inE andb_orr. Qed. Lemma setIUl A B C : (A :|: B) :&: C = (A :&: C) :|: (B :&: C). Proof. (* Goal: @eq (@set_of T (Phant (Finite.sort T))) (@setI T (@setU T A B) C) (@setU T (@setI T A C) (@setI T B C)) *) by apply/setP=> x; rewrite !inE andb_orl. Qed. Lemma setUIr A B C : A :|: (B :&: C) = (A :|: B) :&: (A :|: C). Proof. (* Goal: @eq (@set_of T (Phant (Finite.sort T))) (@setU T A (@setI T B C)) (@setI T (@setU T A B) (@setU T A C)) *) by apply/setP=> x; rewrite !inE orb_andr. Qed. Lemma setUIl A B C : (A :&: B) :|: C = (A :|: C) :&: (B :|: C). Proof. (* Goal: @eq (@set_of T (Phant (Finite.sort T))) (@setU T (@setI T A B) C) (@setI T (@setU T A C) (@setU T B C)) *) by apply/setP=> x; rewrite !inE orb_andl. Qed. Lemma setUK A B : (A :|: B) :&: A = A. Proof. (* Goal: @eq (@set_of T (Phant (Finite.sort T))) (@setI T (@setU T A B) A) A *) by apply/setP=> x; rewrite !inE orbK. Qed. Lemma setKU A B : A :&: (B :|: A) = A. Proof. (* Goal: @eq (@set_of T (Phant (Finite.sort T))) (@setI T A (@setU T B A)) A *) by apply/setP=> x; rewrite !inE orKb. Qed. Lemma setIK A B : (A :&: B) :|: A = A. Proof. (* Goal: @eq (@set_of T (Phant (Finite.sort T))) (@setU T (@setI T A B) A) A *) by apply/setP=> x; rewrite !inE andbK. Qed. Lemma setKI A B : A :|: (B :&: A) = A. Proof. (* Goal: @eq (@set_of T (Phant (Finite.sort T))) (@setU T A (@setI T B A)) A *) by apply/setP=> x; rewrite !inE andKb. Qed. Lemma setCP x A : reflect (~ x \in A) (x \in ~: A). Proof. (* Goal: Bool.reflect (not (is_true (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A))))) (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setC T A)))) *) by rewrite !inE; apply: negP. Qed. Lemma in_setC x A : (x \in ~: A) = (x \notin A). Proof. (* Goal: @eq bool (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setC T A)))) (negb (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)))) *) exact: in_set. Qed. Lemma setCK : involutive (@setC T). Proof. (* Goal: @involutive (@set_of T (Phant (Finite.sort T))) (@setC T) *) by move=> A; apply/setP=> x; rewrite !inE negbK. Qed. Lemma setC_inj : injective (@setC T). Proof. (* Goal: @injective (@set_of T (Phant (Finite.sort T))) (@set_of T (Phant (Finite.sort T))) (@setC T) *) exact: can_inj setCK. Qed. Lemma subsets_disjoint A B : (A \subset B) = [disjoint A & ~: B]. Proof. (* Goal: @eq bool (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B))) (@disjoint T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setC T B)))) *) by rewrite subset_disjoint; apply: eq_disjoint_r => x; rewrite !inE. Qed. Lemma disjoints_subset A B : [disjoint A & B] = (A \subset ~: B). Proof. (* Goal: @eq bool (@disjoint T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B))) (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setC T B)))) *) by rewrite subsets_disjoint setCK. Qed. Lemma powersetCE A B : (A \in powerset (~: B)) = [disjoint A & B]. Proof. (* Goal: @eq bool (@in_mem (@set_of T (Phant (Finite.sort T))) A (@mem (Finite.sort (set_of_finType T)) (predPredType (Finite.sort (set_of_finType T))) (@SetDef.pred_of_set (set_of_finType T) (@powerset T (@setC T B))))) (@disjoint T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B))) *) by rewrite inE disjoints_subset. Qed. Lemma setCS A B : (~: A \subset ~: B) = (B \subset A). Proof. (* Goal: @eq bool (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setC T A))) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setC T B)))) (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A))) *) by rewrite !subsets_disjoint setCK disjoint_sym. Qed. Lemma setCU A B : ~: (A :|: B) = ~: A :&: ~: B. Proof. (* Goal: @eq (@set_of T (Phant (Finite.sort T))) (@setC T (@setU T A B)) (@setI T (@setC T A) (@setC T B)) *) by apply/setP=> x; rewrite !inE negb_or. Qed. Lemma setCI A B : ~: (A :&: B) = ~: A :|: ~: B. Proof. (* Goal: @eq (@set_of T (Phant (Finite.sort T))) (@setC T (@setI T A B)) (@setU T (@setC T A) (@setC T B)) *) by apply/setP=> x; rewrite !inE negb_and. Qed. Lemma setUCr A : A :|: ~: A = setT. Proof. (* Goal: @eq (@set_of T (Phant (Finite.sort T))) (@setU T A (@setC T A)) (@setTfor T (Phant (Finite.sort T))) *) by apply/setP=> x; rewrite !inE orbN. Qed. Lemma setICr A : A :&: ~: A = set0. Proof. (* Goal: @eq (@set_of T (Phant (Finite.sort T))) (@setI T A (@setC T A)) (@set0 T) *) by apply/setP=> x; rewrite !inE andbN. Qed. Lemma setC0 : ~: set0 = [set: T]. Proof. (* Goal: @eq (@set_of T (Phant (Finite.sort T))) (@setC T (@set0 T)) (@setTfor T (Phant (Finite.sort T))) *) by apply/setP=> x; rewrite !inE. Qed. Lemma setCT : ~: [set: T] = set0. Proof. (* Goal: @eq (@set_of T (Phant (Finite.sort T))) (@setC T (@setTfor T (Phant (Finite.sort T)))) (@set0 T) *) by rewrite -setC0 setCK. Qed. Lemma setDP A B x : reflect (x \in A /\ x \notin B) (x \in A :\: B). Proof. (* Goal: Bool.reflect (and (is_true (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)))) (is_true (negb (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)))))) (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setD T A B)))) *) by rewrite inE andbC; apply: andP. Qed. Lemma in_setD A B x : (x \in A :\: B) = (x \notin B) && (x \in A). Proof. (* Goal: @eq bool (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setD T A B)))) (andb (negb (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)))) (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)))) *) exact: in_set. Qed. Lemma setDE A B : A :\: B = A :&: ~: B. Proof. (* Goal: @eq (@set_of T (Phant (Finite.sort T))) (@setD T A B) (@setI T A (@setC T B)) *) by apply/setP => x; rewrite !inE andbC. Qed. Lemma setSD A B C : A \subset B -> A :\: C \subset B :\: C. Proof. (* Goal: forall _ : is_true (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B))), is_true (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setD T A C))) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setD T B C)))) *) by rewrite !setDE; apply: setSI. Qed. Lemma setDS A B C : A \subset B -> C :\: B \subset C :\: A. Proof. (* Goal: forall _ : is_true (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B))), is_true (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setD T C B))) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setD T C A)))) *) by rewrite !setDE -setCS; apply: setIS. Qed. Lemma setDSS A B C D : A \subset C -> D \subset B -> A :\: B \subset C :\: D. Proof. (* Goal: forall (_ : is_true (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T C)))) (_ : is_true (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T D)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)))), is_true (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setD T A B))) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setD T C D)))) *) by move=> /(setSD B) /subset_trans sAC /(setDS C) /sAC. Qed. Lemma setD0 A : A :\: set0 = A. Proof. (* Goal: @eq (@set_of T (Phant (Finite.sort T))) (@setD T A (@set0 T)) A *) by apply/setP=> x; rewrite !inE. Qed. Lemma set0D A : set0 :\: A = set0. Proof. (* Goal: @eq (@set_of T (Phant (Finite.sort T))) (@setD T (@set0 T) A) (@set0 T) *) by apply/setP=> x; rewrite !inE andbF. Qed. Lemma setDT A : A :\: setT = set0. Proof. (* Goal: @eq (@set_of T (Phant (Finite.sort T))) (@setD T A (@setTfor T (Phant (Finite.sort T)))) (@set0 T) *) by apply/setP=> x; rewrite !inE. Qed. Lemma setTD A : setT :\: A = ~: A. Proof. (* Goal: @eq (@set_of T (Phant (Finite.sort T))) (@setD T (@setTfor T (Phant (Finite.sort T))) A) (@setC T A) *) by apply/setP=> x; rewrite !inE andbT. Qed. Lemma setDv A : A :\: A = set0. Proof. (* Goal: @eq (@set_of T (Phant (Finite.sort T))) (@setD T A A) (@set0 T) *) by apply/setP=> x; rewrite !inE andNb. Qed. Lemma setCD A B : ~: (A :\: B) = ~: A :|: B. Proof. (* Goal: @eq (@set_of T (Phant (Finite.sort T))) (@setC T (@setD T A B)) (@setU T (@setC T A) B) *) by rewrite !setDE setCI setCK. Qed. Lemma setID A B : A :&: B :|: A :\: B = A. Proof. (* Goal: @eq (@set_of T (Phant (Finite.sort T))) (@setU T (@setI T A B) (@setD T A B)) A *) by rewrite setDE -setIUr setUCr setIT. Qed. Lemma setDUl A B C : (A :|: B) :\: C = (A :\: C) :|: (B :\: C). Proof. (* Goal: @eq (@set_of T (Phant (Finite.sort T))) (@setD T (@setU T A B) C) (@setU T (@setD T A C) (@setD T B C)) *) by rewrite !setDE setIUl. Qed. Lemma setDUr A B C : A :\: (B :|: C) = (A :\: B) :&: (A :\: C). Proof. (* Goal: @eq (@set_of T (Phant (Finite.sort T))) (@setD T A (@setU T B C)) (@setI T (@setD T A B) (@setD T A C)) *) by rewrite !setDE setCU setIIr. Qed. Lemma setDIl A B C : (A :&: B) :\: C = (A :\: C) :&: (B :\: C). Proof. (* Goal: @eq (@set_of T (Phant (Finite.sort T))) (@setD T (@setI T A B) C) (@setI T (@setD T A C) (@setD T B C)) *) by rewrite !setDE setIIl. Qed. Lemma setIDA A B C : A :&: (B :\: C) = (A :&: B) :\: C. Proof. (* Goal: @eq (@set_of T (Phant (Finite.sort T))) (@setI T A (@setD T B C)) (@setD T (@setI T A B) C) *) by rewrite !setDE setIA. Qed. Lemma setIDAC A B C : (A :\: B) :&: C = (A :&: C) :\: B. Proof. (* Goal: @eq (@set_of T (Phant (Finite.sort T))) (@setI T (@setD T A B) C) (@setD T (@setI T A C) B) *) by rewrite !setDE setIAC. Qed. Lemma setDIr A B C : A :\: (B :&: C) = (A :\: B) :|: (A :\: C). Proof. (* Goal: @eq (@set_of T (Phant (Finite.sort T))) (@setD T A (@setI T B C)) (@setU T (@setD T A B) (@setD T A C)) *) by rewrite !setDE setCI setIUr. Qed. Lemma setDDl A B C : (A :\: B) :\: C = A :\: (B :|: C). Proof. (* Goal: @eq (@set_of T (Phant (Finite.sort T))) (@setD T (@setD T A B) C) (@setD T A (@setU T B C)) *) by rewrite !setDE setCU setIA. Qed. Lemma setDDr A B C : A :\: (B :\: C) = (A :\: B) :|: (A :&: C). Proof. (* Goal: @eq (@set_of T (Phant (Finite.sort T))) (@setD T A (@setD T B C)) (@setU T (@setD T A B) (@setI T A C)) *) by rewrite !setDE setCI setIUr setCK. Qed. Lemma powersetE A B : (A \in powerset B) = (A \subset B). Proof. (* Goal: @eq bool (@in_mem (@set_of T (Phant (Finite.sort T))) A (@mem (Finite.sort (set_of_finType T)) (predPredType (Finite.sort (set_of_finType T))) (@SetDef.pred_of_set (set_of_finType T) (@powerset T B)))) (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B))) *) by rewrite inE. Qed. Lemma powersetS A B : (powerset A \subset powerset B) = (A \subset B). Proof. (* Goal: @eq bool (@subset (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) (@powerset T A))) (@mem (Finite.sort (set_of_finType T)) (predPredType (Finite.sort (set_of_finType T))) (@SetDef.pred_of_set (set_of_finType T) (@powerset T B)))) (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B))) *) apply/subsetP/idP=> [sAB | sAB C]; last by rewrite !inE => /subset_trans ->. (* Goal: is_true (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B))) *) by rewrite -powersetE sAB // inE. Qed. Lemma powerset0 : powerset set0 = [set set0] :> {set {set T}}. Proof. (* Goal: @eq (@set_of (set_of_finType T) (Phant (@set_of T (Phant (Finite.sort T))))) (@powerset T (@set0 T)) (@set1 (set_of_finType T) (@set0 T)) *) by apply/setP=> A; rewrite !inE subset0. Qed. Lemma powersetT : powerset [set: T] = [set: {set T}]. Proof. (* Goal: @eq (@set_of (set_of_finType T) (Phant (Finite.sort (set_of_finType T)))) (@powerset T (@setTfor T (Phant (Finite.sort T)))) (@setTfor (set_of_finType T) (Phant (@set_of T (Phant (Finite.sort T))))) *) by apply/setP=> A; rewrite !inE subsetT. Qed. Lemma setI_powerset P A : P :&: powerset A = P ::&: A. Proof. (* Goal: @eq (@set_of (set_of_finType T) (Phant (Finite.sort (set_of_finType T)))) (@setI (set_of_finType T) P (@powerset T A)) (@ssetI T P A) *) by apply/setP=> B; rewrite !inE. Qed. Lemma cardsE pA : #|[set x in pA]| = #|pA|. Proof. (* Goal: @eq nat (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@SetDef.finset T (fun x : Finite.sort T => @in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) pA)))))) (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) pA)) *) exact/eq_card/in_set. Qed. Lemma sum1dep_card pA : \sum_(x | pA x) 1 = #|[set x | pA x]|. Proof. (* Goal: @eq nat (@BigOp.bigop nat (Finite.sort T) O (index_enum T) (fun x : Finite.sort T => @BigBody nat (Finite.sort T) x addn (pA x) (S O))) (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@SetDef.finset T (fun x : Finite.sort T => pA x))))) *) by rewrite sum1_card cardsE. Qed. Lemma sum_nat_dep_const pA n : \sum_(x | pA x) n = #|[set x | pA x]| * n. Proof. (* Goal: @eq nat (@BigOp.bigop nat (Finite.sort T) O (index_enum T) (fun x : Finite.sort T => @BigBody nat (Finite.sort T) x addn (pA x) n)) (muln (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@SetDef.finset T (fun x : Finite.sort T => pA x))))) n) *) by rewrite sum_nat_const cardsE. Qed. Lemma cards0 : #|@set0 T| = 0. Proof. (* Goal: @eq nat (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@set0 T)))) O *) by rewrite cardsE card0. Qed. Lemma cards_eq0 A : (#|A| == 0) = (A == set0). Proof. (* Goal: @eq bool (@eq_op nat_eqType (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A))) O) (@eq_op (set_of_eqType T) A (@set0 T)) *) by rewrite (eq_sym A) eqEcard sub0set cards0 leqn0. Qed. Lemma set0Pn A : reflect (exists x, x \in A) (A != set0). Proof. (* Goal: Bool.reflect (@ex (Finite.sort T) (fun x : Finite.sort T => is_true (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A))))) (negb (@eq_op (set_of_eqType T) A (@set0 T))) *) by rewrite -cards_eq0; apply: existsP. Qed. Lemma card_gt0 A : (0 < #|A|) = (A != set0). Proof. (* Goal: @eq bool (leq (S O) (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)))) (negb (@eq_op (set_of_eqType T) A (@set0 T))) *) by rewrite lt0n cards_eq0. Qed. Lemma cards0_eq A : #|A| = 0 -> A = set0. Proof. (* Goal: forall _ : @eq nat (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A))) O, @eq (@set_of T (Phant (Finite.sort T))) A (@set0 T) *) by move=> A_0; apply/setP=> x; rewrite inE (card0_eq A_0). Qed. Lemma cards1 x : #|[set x]| = 1. Proof. (* Goal: @eq nat (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@set1 T x)))) (S O) *) by rewrite cardsE card1. Qed. Lemma cardsUI A B : #|A :|: B| + #|A :&: B| = #|A| + #|B|. Proof. (* Goal: @eq nat (addn (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setU T A B)))) (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setI T A B))))) (addn (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A))) (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)))) *) by rewrite !cardsE cardUI. Qed. Lemma cardsU A B : #|A :|: B| = (#|A| + #|B| - #|A :&: B|)%N. Proof. (* Goal: @eq nat (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setU T A B)))) (subn (addn (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A))) (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)))) (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setI T A B))))) *) by rewrite -cardsUI addnK. Qed. Lemma cardsI A B : #|A :&: B| = (#|A| + #|B| - #|A :|: B|)%N. Proof. (* Goal: @eq nat (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setI T A B)))) (subn (addn (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A))) (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)))) (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setU T A B))))) *) by rewrite -cardsUI addKn. Qed. Lemma cardsT : #|[set: T]| = #|T|. Proof. (* Goal: @eq nat (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setTfor T (Phant (Finite.sort T)))))) (@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)))))) *) by rewrite cardsE. Qed. Lemma cardsID B A : #|A :&: B| + #|A :\: B| = #|A|. Proof. (* Goal: @eq nat (addn (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setI T A B)))) (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setD T A B))))) (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A))) *) by rewrite !cardsE cardID. Qed. Lemma cardsD A B : #|A :\: B| = (#|A| - #|A :&: B|)%N. Proof. (* Goal: @eq nat (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setD T A B)))) (subn (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A))) (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setI T A B))))) *) by rewrite -(cardsID B A) addKn. Qed. Lemma cardsC A : #|A| + #|~: A| = #|T|. Proof. (* Goal: @eq nat (addn (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A))) (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setC T A))))) (@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)))))) *) by rewrite cardsE cardC. Qed. Lemma cardsCs A : #|A| = #|T| - #|~: A|. Proof. (* Goal: @eq nat (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A))) (subn (@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 T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setC T A))))) *) by rewrite -(cardsC A) addnK. Qed. Lemma cardsU1 a A : #|a |: A| = (a \notin A) + #|A|. Proof. (* Goal: @eq nat (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setU T (@set1 T a) A)))) (addn (nat_of_bool (negb (@in_mem (Finite.sort T) a (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A))))) (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)))) *) by rewrite -cardU1; apply: eq_card=> x; rewrite !inE. Qed. Lemma cards2 a b : #|[set a; b]| = (a != b).+1. Proof. (* Goal: @eq nat (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setU T (@set1 T a) (@set1 T b))))) (S (nat_of_bool (negb (@eq_op (Finite.eqType T) a b)))) *) by rewrite -card2; apply: eq_card=> x; rewrite !inE. Qed. Lemma cardsC1 a : #|[set~ a]| = #|T|.-1. Proof. (* Goal: @eq nat (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setC T (@set1 T a))))) (Nat.pred (@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))))))) *) by rewrite -(cardC1 a); apply: eq_card=> x; rewrite !inE. Qed. Lemma cardsD1 a A : #|A| = (a \in A) + #|A :\ a|. Proof. (* Goal: @eq nat (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A))) (addn (nat_of_bool (@in_mem (Finite.sort T) a (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)))) (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setD T A (@set1 T a)))))) *) by rewrite (cardD1 a); congr (_ + _); apply: eq_card => x; rewrite !inE. Qed. Lemma subsetIl A B : A :&: B \subset A. Proof. (* Goal: is_true (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setI T A B))) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A))) *) by apply/subsetP=> x; rewrite inE; case/andP. Qed. Lemma subsetIr A B : A :&: B \subset B. Proof. (* Goal: is_true (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setI T A B))) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B))) *) by apply/subsetP=> x; rewrite inE; case/andP. Qed. Lemma subsetUl A B : A \subset A :|: B. Proof. (* Goal: is_true (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setU T A B)))) *) by apply/subsetP=> x; rewrite inE => ->. Qed. Lemma subsetUr A B : B \subset A :|: B. Proof. (* Goal: is_true (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setU T A B)))) *) by apply/subsetP=> x; rewrite inE orbC => ->. Qed. Lemma subsetU1 x A : A \subset x |: A. Proof. (* Goal: is_true (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setU T (@set1 T x) A)))) *) exact: subsetUr. Qed. Lemma subsetDl A B : A :\: B \subset A. Proof. (* Goal: is_true (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setD T A B))) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A))) *) by rewrite setDE subsetIl. Qed. Lemma subD1set A x : A :\ x \subset A. Proof. (* Goal: is_true (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setD T A (@set1 T x)))) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A))) *) by rewrite subsetDl. Qed. Lemma subsetDr A B : A :\: B \subset ~: B. Proof. (* Goal: is_true (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setD T A B))) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setC T B)))) *) by rewrite setDE subsetIr. Qed. Lemma sub1set A x : ([set x] \subset A) = (x \in A). Proof. (* Goal: @eq bool (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@set1 T x))) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A))) (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A))) *) by rewrite -subset_pred1; apply: eq_subset=> y; rewrite !inE. Qed. Lemma cards1P A : reflect (exists x, A = [set x]) (#|A| == 1). Lemma subset1 A x : (A \subset [set x]) = (A == [set x]) || (A == set0). Proof. (* Goal: @eq bool (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@set1 T x)))) (orb (@eq_op (set_of_eqType T) A (@set1 T x)) (@eq_op (set_of_eqType T) A (@set0 T))) *) rewrite eqEcard cards1 -cards_eq0 orbC andbC. (* Goal: @eq bool (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@set1 T x)))) (orb (@eq_op nat_eqType (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A))) O) (andb (leq (S O) (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)))) (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@set1 T x)))))) *) by case: posnP => // A0; rewrite (cards0_eq A0) sub0set. Qed. Lemma powerset1 x : powerset [set x] = [set set0; [set x]]. Proof. (* Goal: @eq (@set_of (set_of_finType T) (Phant (Finite.sort (set_of_finType T)))) (@powerset T (@set1 T x)) (@setU (set_of_finType T) (@set1 (set_of_finType T) (@set0 T)) (@set1 (set_of_finType T) (@set1 T x))) *) by apply/setP=> A; rewrite !inE subset1 orbC. Qed. Lemma setIidPl A B : reflect (A :&: B = A) (A \subset B). Proof. (* Goal: Bool.reflect (@eq (@set_of T (Phant (Finite.sort T))) (@setI T A B) A) (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B))) *) apply: (iffP subsetP) => [sAB | <- x /setIP[] //]. (* Goal: @eq (@set_of T (Phant (Finite.sort T))) (@setI T A B) A *) by apply/setP=> x; rewrite inE; apply/andb_idr/sAB. Qed. Arguments setIidPl {A B}. Lemma setIidPr A B : reflect (A :&: B = B) (B \subset A). Proof. (* Goal: Bool.reflect (@eq (@set_of T (Phant (Finite.sort T))) (@setI T A B) B) (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A))) *) by rewrite setIC; apply: setIidPl. Qed. Lemma cardsDS A B : B \subset A -> #|A :\: B| = (#|A| - #|B|)%N. Proof. (* Goal: forall _ : is_true (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A))), @eq nat (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setD T A B)))) (subn (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A))) (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)))) *) by rewrite cardsD => /setIidPr->. Qed. Lemma setUidPl A B : reflect (A :|: B = A) (B \subset A). Proof. (* Goal: Bool.reflect (@eq (@set_of T (Phant (Finite.sort T))) (@setU T A B) A) (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A))) *) by rewrite -setCS (sameP setIidPl eqP) -setCU (inj_eq setC_inj); apply: eqP. Qed. Lemma setUidPr A B : reflect (A :|: B = B) (A \subset B). Proof. (* Goal: Bool.reflect (@eq (@set_of T (Phant (Finite.sort T))) (@setU T A B) B) (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B))) *) by rewrite setUC; apply: setUidPl. Qed. Lemma setDidPl A B : reflect (A :\: B = A) [disjoint A & B]. Proof. (* Goal: Bool.reflect (@eq (@set_of T (Phant (Finite.sort T))) (@setD T A B) A) (@disjoint T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B))) *) by rewrite setDE disjoints_subset; apply: setIidPl. Qed. Lemma subIset A B C : (B \subset A) || (C \subset A) -> (B :&: C \subset A). Proof. (* Goal: forall _ : is_true (orb (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A))) (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T C)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)))), is_true (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setI T B C))) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A))) *) by case/orP; apply: subset_trans; rewrite (subsetIl, subsetIr). Qed. Lemma subsetI A B C : (A \subset B :&: C) = (A \subset B) && (A \subset C). Proof. (* Goal: @eq bool (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setI T B C)))) (andb (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B))) (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T C)))) *) rewrite !(sameP setIidPl eqP) setIA; have [-> //| ] := altP (A :&: B =P A). (* Goal: forall _ : is_true (negb (@eq_op (set_of_eqType T) (@setI T A B) A)), @eq bool (@eq_op (set_of_eqType T) (@setI T (@setI T A B) C) A) (andb false (@eq_op (set_of_eqType T) (@setI T A C) A)) *) by apply: contraNF => /eqP <-; rewrite -setIA -setIIl setIAC. Qed. Lemma subsetIP A B C : reflect (A \subset B /\ A \subset C) (A \subset B :&: C). Proof. (* Goal: Bool.reflect (and (is_true (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)))) (is_true (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T C))))) (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setI T B C)))) *) by rewrite subsetI; apply: andP. Qed. Lemma subsetIidl A B : (A \subset A :&: B) = (A \subset B). Proof. (* Goal: @eq bool (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setI T A B)))) (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B))) *) by rewrite subsetI subxx. Qed. Lemma subsetIidr A B : (B \subset A :&: B) = (B \subset A). Proof. (* Goal: @eq bool (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setI T A B)))) (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A))) *) by rewrite setIC subsetIidl. Qed. Lemma powersetI A B : powerset (A :&: B) = powerset A :&: powerset B. Proof. (* Goal: @eq (@set_of (set_of_finType T) (Phant (Finite.sort (set_of_finType T)))) (@powerset T (@setI T A B)) (@setI (set_of_finType T) (@powerset T A) (@powerset T B)) *) by apply/setP=> C; rewrite !inE subsetI. Qed. Lemma subUset A B C : (B :|: C \subset A) = (B \subset A) && (C \subset A). Proof. (* Goal: @eq bool (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setU T B C))) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A))) (andb (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A))) (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T C)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)))) *) by rewrite -setCS setCU subsetI !setCS. Qed. Lemma subsetU A B C : (A \subset B) || (A \subset C) -> A \subset B :|: C. Proof. (* Goal: forall _ : is_true (orb (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B))) (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T C)))), is_true (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setU T B C)))) *) by rewrite -!(setCS _ A) setCU; apply: subIset. Qed. Lemma subUsetP A B C : reflect (A \subset C /\ B \subset C) (A :|: B \subset C). Proof. (* Goal: Bool.reflect (and (is_true (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T C)))) (is_true (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T C))))) (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setU T A B))) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T C))) *) by rewrite subUset; apply: andP. Qed. Lemma subsetC A B : (A \subset ~: B) = (B \subset ~: A). Proof. (* Goal: @eq bool (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setC T B)))) (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setC T A)))) *) by rewrite -setCS setCK. Qed. Lemma subCset A B : (~: A \subset B) = (~: B \subset A). Proof. (* Goal: @eq bool (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setC T A))) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B))) (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setC T B))) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A))) *) by rewrite -setCS setCK. Qed. Lemma subsetD A B C : (A \subset B :\: C) = (A \subset B) && [disjoint A & C]. Proof. (* Goal: @eq bool (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setD T B C)))) (andb (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B))) (@disjoint T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T C)))) *) by rewrite setDE subsetI -disjoints_subset. Qed. Lemma subDset A B C : (A :\: B \subset C) = (A \subset B :|: C). Proof. (* Goal: @eq bool (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setD T A B))) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T C))) (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setU T B C)))) *) apply/subsetP/subsetP=> sABC x; rewrite !inE. (* Goal: forall _ : is_true (andb (negb (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)))) (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)))), is_true (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T C))) *) (* Goal: forall _ : is_true (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A))), is_true (orb (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B))) (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T C)))) *) by case Bx: (x \in B) => // Ax; rewrite sABC ?inE ?Bx. (* Goal: forall _ : is_true (andb (negb (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)))) (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)))), is_true (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T C))) *) by case Bx: (x \in B) => //; move/sABC; rewrite inE Bx. Qed. Lemma subsetDP A B C : reflect (A \subset B /\ [disjoint A & C]) (A \subset B :\: C). Proof. (* Goal: Bool.reflect (and (is_true (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)))) (is_true (@disjoint T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T C))))) (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setD T B C)))) *) by rewrite subsetD; apply: andP. Qed. Lemma setU_eq0 A B : (A :|: B == set0) = (A == set0) && (B == set0). Proof. (* Goal: @eq bool (@eq_op (set_of_eqType T) (@setU T A B) (@set0 T)) (andb (@eq_op (set_of_eqType T) A (@set0 T)) (@eq_op (set_of_eqType T) B (@set0 T))) *) by rewrite -!subset0 subUset. Qed. Lemma setD_eq0 A B : (A :\: B == set0) = (A \subset B). Proof. (* Goal: @eq bool (@eq_op (set_of_eqType T) (@setD T A B) (@set0 T)) (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B))) *) by rewrite -subset0 subDset setU0. Qed. Lemma setI_eq0 A B : (A :&: B == set0) = [disjoint A & B]. Proof. (* Goal: @eq bool (@eq_op (set_of_eqType T) (@setI T A B) (@set0 T)) (@disjoint T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B))) *) by rewrite disjoints_subset -setD_eq0 setDE setCK. Qed. Lemma disjoint_setI0 A B : [disjoint A & B] -> A :&: B = set0. Proof. (* Goal: forall _ : is_true (@disjoint T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B))), @eq (@set_of T (Phant (Finite.sort T))) (@setI T A B) (@set0 T) *) by rewrite -setI_eq0; move/eqP. Qed. Lemma subsetD1 A B x : (A \subset B :\ x) = (A \subset B) && (x \notin A). Proof. (* Goal: @eq bool (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setD T B (@set1 T x))))) (andb (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B))) (negb (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A))))) *) by rewrite setDE subsetI subsetC sub1set inE. Qed. Lemma subsetD1P A B x : reflect (A \subset B /\ x \notin A) (A \subset B :\ x). Proof. (* Goal: Bool.reflect (and (is_true (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)))) (is_true (negb (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)))))) (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setD T B (@set1 T x))))) *) by rewrite subsetD1; apply: andP. Qed. Lemma properD1 A x : x \in A -> A :\ x \proper A. Proof. (* Goal: forall _ : is_true (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A))), is_true (@proper T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setD T A (@set1 T x)))) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A))) *) move=> Ax; rewrite properE subsetDl; apply/subsetPn; exists x=> //. (* Goal: is_true (negb (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setD T A (@set1 T x)))))) *) by rewrite in_setD1 Ax eqxx. Qed. Lemma properIr A B : ~~ (B \subset A) -> A :&: B \proper B. Proof. (* Goal: forall _ : is_true (negb (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)))), is_true (@proper T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setI T A B))) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B))) *) by move=> nsAB; rewrite properE subsetIr subsetI negb_and nsAB. Qed. Lemma properIl A B : ~~ (A \subset B) -> A :&: B \proper A. Proof. (* Goal: forall _ : is_true (negb (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)))), is_true (@proper T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setI T A B))) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A))) *) by move=> nsBA; rewrite properE subsetIl subsetI negb_and nsBA orbT. Qed. Lemma properUr A B : ~~ (A \subset B) -> B \proper A :|: B. Proof. (* Goal: forall _ : is_true (negb (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)))), is_true (@proper T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setU T A B)))) *) by rewrite properE subsetUr subUset subxx /= andbT. Qed. Lemma properUl A B : ~~ (B \subset A) -> A \proper A :|: B. Proof. (* Goal: forall _ : is_true (negb (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)))), is_true (@proper T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setU T A B)))) *) by move=> not_sBA; rewrite setUC properUr. Qed. Lemma proper1set A x : ([set x] \proper A) -> (x \in A). Proof. (* Goal: forall _ : is_true (@proper T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@set1 T x))) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A))), is_true (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A))) *) by move/proper_sub; rewrite sub1set. Qed. Lemma properIset A B C : (B \proper A) || (C \proper A) -> (B :&: C \proper A). Proof. (* Goal: forall _ : is_true (orb (@proper T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A))) (@proper T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T C)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)))), is_true (@proper T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setI T B C))) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A))) *) by case/orP; apply: sub_proper_trans; rewrite (subsetIl, subsetIr). Qed. Lemma properI A B C : (A \proper B :&: C) -> (A \proper B) && (A \proper C). Lemma properU A B C : (B :|: C \proper A) -> (B \proper A) && (C \proper A). Lemma properD A B C : (A \proper B :\: C) -> (A \proper B) && [disjoint A & C]. Proof. (* Goal: forall _ : is_true (@proper T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setD T B C)))), is_true (andb (@proper T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B))) (@disjoint T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T C)))) *) by rewrite setDE disjoints_subset => /properI/andP[-> /proper_sub]. Qed. End setOps. Arguments set1P {T x a}. Arguments set1_inj {T} [x1 x2]. Arguments set2P {T x a b}. Arguments setIdP {T x pA pB}. Arguments setIP {T x A B}. Arguments setU1P {T x a B}. Arguments setD1P {T x A b}. Arguments setUP {T x A B}. Arguments setDP {T A B x}. Arguments cards1P {T A}. Arguments setCP {T x A}. Arguments setIidPl {T A B}. Arguments setIidPr {T A B}. Arguments setUidPl {T A B}. Arguments setUidPr {T A B}. Arguments setDidPl {T A B}. Arguments subsetIP {T A B C}. Arguments subUsetP {T A B C}. Arguments subsetDP {T A B C}. Arguments subsetD1P {T A B x}. Prenex Implicits set1. Hint Resolve subsetT_hint : core. Section setOpsAlgebra. Import Monoid. Variable T : finType. Canonical setI_monoid := Law (@setIA T) (@setTI T) (@setIT T). Canonical setI_comoid := ComLaw (@setIC T). Canonical setI_muloid := MulLaw (@set0I T) (@setI0 T). Canonical setU_monoid := Law (@setUA T) (@set0U T) (@setU0 T). Canonical setU_comoid := ComLaw (@setUC T). Canonical setU_muloid := MulLaw (@setTU T) (@setUT T). Canonical setI_addoid := AddLaw (@setUIl T) (@setUIr T). Canonical setU_addoid := AddLaw (@setIUl T) (@setIUr T). End setOpsAlgebra. Section CartesianProd. Variables fT1 fT2 : finType. Variables (A1 : {set fT1}) (A2 : {set fT2}). Definition setX := [set u | u.1 \in A1 & u.2 \in A2]. Lemma in_setX x1 x2 : ((x1, x2) \in setX) = (x1 \in A1) && (x2 \in A2). Proof. (* Goal: @eq bool (@in_mem (prod (Finite.sort fT1) (Finite.sort fT2)) (@pair (Finite.sort fT1) (Finite.sort fT2) x1 x2) (@mem (Finite.sort (prod_finType fT1 fT2)) (predPredType (Finite.sort (prod_finType fT1 fT2))) (@SetDef.pred_of_set (prod_finType fT1 fT2) setX))) (andb (@in_mem (Finite.sort fT1) x1 (@mem (Finite.sort fT1) (predPredType (Finite.sort fT1)) (@SetDef.pred_of_set fT1 A1))) (@in_mem (Finite.sort fT2) x2 (@mem (Finite.sort fT2) (predPredType (Finite.sort fT2)) (@SetDef.pred_of_set fT2 A2)))) *) by rewrite inE. Qed. Lemma setXP x1 x2 : reflect (x1 \in A1 /\ x2 \in A2) ((x1, x2) \in setX). Proof. (* Goal: Bool.reflect (and (is_true (@in_mem (Finite.sort fT1) x1 (@mem (Finite.sort fT1) (predPredType (Finite.sort fT1)) (@SetDef.pred_of_set fT1 A1)))) (is_true (@in_mem (Finite.sort fT2) x2 (@mem (Finite.sort fT2) (predPredType (Finite.sort fT2)) (@SetDef.pred_of_set fT2 A2))))) (@in_mem (prod (Finite.sort fT1) (Finite.sort fT2)) (@pair (Finite.sort fT1) (Finite.sort fT2) x1 x2) (@mem (Finite.sort (prod_finType fT1 fT2)) (predPredType (Finite.sort (prod_finType fT1 fT2))) (@SetDef.pred_of_set (prod_finType fT1 fT2) setX))) *) by rewrite inE; apply: andP. Qed. Lemma cardsX : #|setX| = #|A1| * #|A2|. Proof. (* Goal: @eq nat (@card (prod_finType fT1 fT2) (@mem (Finite.sort (prod_finType fT1 fT2)) (predPredType (Finite.sort (prod_finType fT1 fT2))) (@SetDef.pred_of_set (prod_finType fT1 fT2) setX))) (muln (@card fT1 (@mem (Finite.sort fT1) (predPredType (Finite.sort fT1)) (@SetDef.pred_of_set fT1 A1))) (@card fT2 (@mem (Finite.sort fT2) (predPredType (Finite.sort fT2)) (@SetDef.pred_of_set fT2 A2)))) *) by rewrite cardsE cardX. Qed. End CartesianProd. Arguments setXP {fT1 fT2 A1 A2 x1 x2}. Local Notation imset_def := (fun (aT rT : finType) f mD => [set y in @image_mem aT rT f mD]). Local Notation imset2_def := (fun (aT1 aT2 rT : finType) f (D1 : mem_pred aT1) (D2 : _ -> mem_pred aT2) => [set y in @image_mem _ rT (prod_curry f) (mem [pred u | D1 u.1 & D2 u.1 u.2])]). Module Type ImsetSig. Parameter imset : forall aT rT : finType, (aT -> rT) -> mem_pred aT -> {set rT}. Parameter imset2 : forall aT1 aT2 rT : finType, (aT1 -> aT2 -> rT) -> mem_pred aT1 -> (aT1 -> mem_pred aT2) -> {set rT}. Axiom imsetE : imset = imset_def. Axiom imset2E : imset2 = imset2_def. End ImsetSig. Module Imset : ImsetSig. Definition imset := imset_def. Definition imset2 := imset2_def. Lemma imsetE : imset = imset_def. Proof. by []. Qed. Proof. (* Goal: @eq (forall (aT rT : Finite.type) (_ : forall _ : Finite.sort aT, Finite.sort rT) (_ : mem_pred (Finite.sort aT)), @set_of rT (Phant (Finite.sort rT))) imset (fun (aT rT : Finite.type) (f : forall _ : Finite.sort aT, Finite.sort rT) (mD : mem_pred (Finite.sort aT)) => @SetDef.finset rT (fun y : Finite.sort rT => @in_mem (Finite.sort rT) y (@mem (Equality.sort (Finite.eqType rT)) (seq_predType (Finite.eqType rT)) (@image_mem aT (Finite.sort rT) f mD)))) *) by []. Qed. End Imset. Notation imset := Imset.imset. Notation imset2 := Imset.imset2. Canonical imset_unlock := Unlockable Imset.imsetE. Canonical imset2_unlock := Unlockable Imset.imset2E. Definition preimset (aT : finType) rT f (R : mem_pred rT) := [set x : aT | in_mem (f x) R]. Notation "f @^-1: A" := (preimset f (mem A)) (at level 24) : set_scope. Notation "f @: A" := (imset f (mem A)) (at level 24) : set_scope. Notation "f @2: ( A , B )" := (imset2 f (mem A) (fun _ => mem B)) (at level 24, format "f @2: ( A , B )") : set_scope. Notation "[ 'set' E | x 'in' A ]" := ((fun x => E) @: A) (at level 0, E, x at level 99, format "[ '[hv' 'set' E '/ ' | x 'in' A ] ']'") : set_scope. Notation "[ 'set' E | x 'in' A & P ]" := [set E | x in [set x in A | P]] (at level 0, E, x at level 99, format "[ '[hv' 'set' E '/ ' | x 'in' A '/ ' & P ] ']'") : set_scope. Notation "[ 'set' E | x 'in' A , y 'in' B ]" := (imset2 (fun x y => E) (mem A) (fun x => (mem B))) (at level 0, E, x, y at level 99, format "[ '[hv' 'set' E '/ ' | x 'in' A , '/ ' y 'in' B ] ']'" ) : set_scope. Notation "[ 'set' E | x 'in' A , y 'in' B & P ]" := [set E | x in A, y in [set y in B | P]] (at level 0, E, x, y at level 99, format "[ '[hv' 'set' E '/ ' | x 'in' A , '/ ' y 'in' B '/ ' & P ] ']'" ) : set_scope. Notation "[ 'set' E | x : T 'in' A ]" := ((fun x : T => E) @: A) (at level 0, E, x at level 99, only parsing) : set_scope. Notation "[ 'set' E | x : T 'in' A & P ]" := [set E | x : T in [set x : T in A | P]] (at level 0, E, x at level 99, only parsing) : set_scope. Notation "[ 'set' E | x : T 'in' A , y : U 'in' B ]" := (imset2 (fun (x : T) (y : U) => E) (mem A) (fun (x : T) => (mem B))) (at level 0, E, x, y at level 99, only parsing) : set_scope. Notation "[ 'set' E | x : T 'in' A , y : U 'in' B & P ]" := [set E | x : T in A, y : U in [set y : U in B | P]] (at level 0, E, x, y at level 99, only parsing) : set_scope. Local Notation predOfType T := (sort_of_simpl_pred (@pred_of_argType T)). Notation "[ 'set' E | x : T ]" := [set E | x : T in predOfType T] (at level 0, E, x at level 99, format "[ '[hv' 'set' E '/ ' | x : T ] ']'") : set_scope. Notation "[ 'set' E | x : T & P ]" := [set E | x : T in [set x : T | P]] (at level 0, E, x at level 99, format "[ '[hv' 'set' E '/ ' | x : T '/ ' & P ] ']'") : set_scope. Notation "[ 'set' E | x : T , y : U 'in' B ]" := [set E | x : T in predOfType T, y : U in B] (at level 0, E, x, y at level 99, format "[ '[hv' 'set' E '/ ' | x : T , '/ ' y : U 'in' B ] ']'") : set_scope. Notation "[ 'set' E | x : T , y : U 'in' B & P ]" := [set E | x : T, y : U in [set y in B | P]] (at level 0, E, x, y at level 99, format "[ '[hv ' 'set' E '/' | x : T , '/ ' y : U 'in' B '/' & P ] ']'" ) : set_scope. Notation "[ 'set' E | x : T 'in' A , y : U ]" := [set E | x : T in A, y : U in predOfType U] (at level 0, E, x, y at level 99, format "[ '[hv' 'set' E '/ ' | x : T 'in' A , '/ ' y : U ] ']'") : set_scope. Notation "[ 'set' E | x : T 'in' A , y : U & P ]" := [set E | x : T in A, y : U in [set y in P]] (at level 0, E, x, y at level 99, format "[ '[hv' 'set' E '/ ' | x : T 'in' A , '/ ' y : U & P ] ']'") : set_scope. Notation "[ 'set' E | x : T , y : U ]" := [set E | x : T, y : U in predOfType U] (at level 0, E, x, y at level 99, format "[ '[hv' 'set' E '/ ' | x : T , '/ ' y : U ] ']'") : set_scope. Notation "[ 'set' E | x : T , y : U & P ]" := [set E | x : T, y : U in [set y in P]] (at level 0, E, x, y at level 99, format "[ '[hv' 'set' E '/ ' | x : T , '/ ' y : U & P ] ']'") : set_scope. Notation "[ 'set' E | x , y 'in' B ]" := [set E | x : _, y : _ in B] (at level 0, E, x, y at level 99, only parsing) : set_scope. Notation "[ 'set' E | x , y 'in' B & P ]" := [set E | x : _, y : _ in B & P] (at level 0, E, x, y at level 99, only parsing) : set_scope. Notation "[ 'set' E | x 'in' A , y ]" := [set E | x : _ in A, y : _] (at level 0, E, x, y at level 99, only parsing) : set_scope. Notation "[ 'set' E | x 'in' A , y & P ]" := [set E | x : _ in A, y : _ & P] (at level 0, E, x, y at level 99, only parsing) : set_scope. Notation "[ 'set' E | x , y ]" := [set E | x : _, y : _] (at level 0, E, x, y at level 99, only parsing) : set_scope. Notation "[ 'set' E | x , y & P ]" := [set E | x : _, y : _ & P ] (at level 0, E, x, y at level 99, only parsing) : set_scope. Notation "[ 'se' 't' E | x 'in' A , y 'in' B ]" := (imset2 (fun x y => E) (mem A) (fun _ => mem B)) (at level 0, E, x, y at level 99, format "[ '[hv' 'se' 't' E '/ ' | x 'in' A , '/ ' y 'in' B ] ']'") : set_scope. Notation "[ 'se' 't' E | x 'in' A , y 'in' B & P ]" := [se t E | x in A, y in [set y in B | P]] (at level 0, E, x, y at level 99, format "[ '[hv ' 'se' 't' E '/' | x 'in' A , '/ ' y 'in' B '/' & P ] ']'" ) : set_scope. Notation "[ 'se' 't' E | x : T , y : U 'in' B ]" := (imset2 (fun x (y : U) => E) (mem (predOfType T)) (fun _ => mem B)) (at level 0, E, x, y at level 99, format "[ '[hv ' 'se' 't' E '/' | x : T , '/ ' y : U 'in' B ] ']'") : set_scope. Notation "[ 'se' 't' E | x : T , y : U 'in' B & P ]" := [se t E | x : T, y : U in [set y in B | P]] (at level 0, E, x, y at level 99, format "[ '[hv ' 'se' 't' E '/' | x : T , '/ ' y : U 'in' B '/' & P ] ']'" ) : set_scope. Notation "[ 'se' 't' E | x : T 'in' A , y : U ]" := (imset2 (fun x y => E) (mem A) (fun _ : T => mem (predOfType U))) (at level 0, E, x, y at level 99, format "[ '[hv' 'se' 't' E '/ ' | x : T 'in' A , '/ ' y : U ] ']'") : set_scope. Notation "[ 'se' 't' E | x : T 'in' A , y : U & P ]" := (imset2 (fun x (y : U) => E) (mem A) (fun _ : T => mem [set y \in P])) (at level 0, E, x, y at level 99, format "[ '[hv ' 'se' 't' E '/' | x : T 'in' A , '/ ' y : U '/' & P ] ']'" ) : set_scope. Notation "[ 'se' 't' E | x : T , y : U ]" := [se t E | x : T, y : U in predOfType U] (at level 0, E, x, y at level 99, format "[ '[hv' 'se' 't' E '/ ' | x : T , '/ ' y : U ] ']'") : set_scope. Notation "[ 'se' 't' E | x : T , y : U & P ]" := [se t E | x : T, y : U in [set y in P]] (at level 0, E, x, y at level 99, format "[ '[hv' 'se' 't' E '/' | x : T , '/ ' y : U '/' & P ] ']'") : set_scope. Section FunImage. Variables aT aT2 : finType. Section ImsetTheory. Variable rT : finType. Section ImsetProp. Variables (f : aT -> rT) (f2 : aT -> aT2 -> rT). Lemma imsetP D y : reflect (exists2 x, in_mem x D & y = f x) (y \in imset f D). Proof. (* Goal: Bool.reflect (@ex2 (Finite.sort aT) (fun x : Finite.sort aT => is_true (@in_mem (Finite.sort aT) x D)) (fun x : Finite.sort aT => @eq (Finite.sort rT) y (f x))) (@in_mem (Finite.sort rT) y (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@Imset.imset aT rT f D)))) *) by rewrite [@imset]unlock inE; apply: imageP. Qed. Variant imset2_spec D1 D2 y : Prop := Imset2spec x1 x2 of in_mem x1 D1 & in_mem x2 (D2 x1) & y = f2 x1 x2. Lemma imset2P D1 D2 y : reflect (imset2_spec D1 D2 y) (y \in imset2 f2 D1 D2). Proof. (* Goal: Bool.reflect (imset2_spec D1 D2 y) (@in_mem (Finite.sort rT) y (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@Imset.imset2 aT aT2 rT f2 D1 D2)))) *) rewrite [@imset2]unlock inE. (* Goal: Bool.reflect (imset2_spec D1 D2 y) (@in_mem (Finite.sort rT) y (@mem (Equality.sort (Finite.eqType rT)) (seq_predType (Finite.eqType rT)) (@image_mem (prod_finType aT aT2) (Finite.sort rT) (@prod_curry (Finite.sort aT) (Finite.sort aT2) (Finite.sort rT) f2) (@mem (prod (Finite.sort aT) (Finite.sort aT2)) (simplPredType (prod (Finite.sort aT) (Finite.sort aT2))) (@SimplPred (prod (Finite.sort aT) (Finite.sort aT2)) (fun u : prod (Finite.sort aT) (Finite.sort aT2) => andb (@pred_of_simpl (Finite.sort aT) (@pred_of_mem_pred (Finite.sort aT) D1) (@fst (Finite.sort aT) (Finite.sort aT2) u)) (@pred_of_simpl (Finite.sort aT2) (@pred_of_mem_pred (Finite.sort aT2) (D2 (@fst (Finite.sort aT) (Finite.sort aT2) u))) (@snd (Finite.sort aT) (Finite.sort aT2) u)))))))) *) apply: (iffP imageP) => [[[x1 x2] Dx12] | [x1 x2 Dx1 Dx2]] -> {y}. (* Goal: @ex2 (Finite.sort (prod_finType aT aT2)) (fun x : Finite.sort (prod_finType aT aT2) => is_true (@in_mem (Finite.sort (prod_finType aT aT2)) x (@mem (Finite.sort (prod_finType aT aT2)) (predPredType (Finite.sort (prod_finType aT aT2))) (@pred_of_simpl (prod (Finite.sort aT) (Finite.sort aT2)) (@SimplPred (prod (Finite.sort aT) (Finite.sort aT2)) (fun u : prod (Finite.sort aT) (Finite.sort aT2) => andb (@pred_of_simpl (Finite.sort aT) (@pred_of_mem_pred (Finite.sort aT) D1) (@fst (Finite.sort aT) (Finite.sort aT2) u)) (@pred_of_simpl (Finite.sort aT2) (@pred_of_mem_pred (Finite.sort aT2) (D2 (@fst (Finite.sort aT) (Finite.sort aT2) u))) (@snd (Finite.sort aT) (Finite.sort aT2) u)))))))) (fun x : Finite.sort (prod_finType aT aT2) => @eq (Equality.sort (Finite.eqType rT)) (f2 x1 x2) (@prod_curry (Finite.sort aT) (Finite.sort aT2) (Finite.sort rT) f2 x)) *) (* Goal: imset2_spec D1 D2 (@prod_curry (Finite.sort aT) (Finite.sort aT2) (Finite.sort rT) f2 (@pair (Finite.sort aT) (Finite.sort aT2) x1 x2)) *) by case/andP: Dx12; exists x1 x2. (* Goal: @ex2 (Finite.sort (prod_finType aT aT2)) (fun x : Finite.sort (prod_finType aT aT2) => is_true (@in_mem (Finite.sort (prod_finType aT aT2)) x (@mem (Finite.sort (prod_finType aT aT2)) (predPredType (Finite.sort (prod_finType aT aT2))) (@pred_of_simpl (prod (Finite.sort aT) (Finite.sort aT2)) (@SimplPred (prod (Finite.sort aT) (Finite.sort aT2)) (fun u : prod (Finite.sort aT) (Finite.sort aT2) => andb (@pred_of_simpl (Finite.sort aT) (@pred_of_mem_pred (Finite.sort aT) D1) (@fst (Finite.sort aT) (Finite.sort aT2) u)) (@pred_of_simpl (Finite.sort aT2) (@pred_of_mem_pred (Finite.sort aT2) (D2 (@fst (Finite.sort aT) (Finite.sort aT2) u))) (@snd (Finite.sort aT) (Finite.sort aT2) u)))))))) (fun x : Finite.sort (prod_finType aT aT2) => @eq (Equality.sort (Finite.eqType rT)) (f2 x1 x2) (@prod_curry (Finite.sort aT) (Finite.sort aT2) (Finite.sort rT) f2 x)) *) by exists (x1, x2); rewrite //= !inE Dx1. Qed. Lemma mem_imset (D : pred aT) x : x \in D -> f x \in f @: D. Proof. (* Goal: forall _ : is_true (@in_mem (Finite.sort aT) x (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) D)), is_true (@in_mem (Finite.sort rT) (f x) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@Imset.imset aT rT f (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) D))))) *) by move=> Dx; apply/imsetP; exists x. Qed. Lemma imset0 : f @: set0 = set0. Proof. (* Goal: @eq (@set_of rT (Phant (Finite.sort rT))) (@Imset.imset aT rT f (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) (@SetDef.pred_of_set aT (@set0 aT)))) (@set0 rT) *) by apply/setP => y; rewrite inE; apply/imsetP=> [[x]]; rewrite inE. Qed. Lemma imset_eq0 (A : {set aT}) : (f @: A == set0) = (A == set0). Proof. (* Goal: @eq bool (@eq_op (set_of_eqType rT) (@Imset.imset aT rT f (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) (@SetDef.pred_of_set aT A))) (@set0 rT)) (@eq_op (set_of_eqType aT) A (@set0 aT)) *) have [-> | [x Ax]] := set_0Vmem A; first by rewrite imset0 !eqxx. (* Goal: @eq bool (@eq_op (set_of_eqType rT) (@Imset.imset aT rT f (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) (@SetDef.pred_of_set aT A))) (@set0 rT)) (@eq_op (set_of_eqType aT) A (@set0 aT)) *) by rewrite -!cards_eq0 (cardsD1 x) Ax (cardsD1 (f x)) mem_imset. Qed. Lemma imset_set1 x : f @: [set x] = [set f x]. Proof. (* Goal: @eq (@set_of rT (Phant (Finite.sort rT))) (@Imset.imset aT rT f (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) (@SetDef.pred_of_set aT (@set1 aT x)))) (@set1 rT (f x)) *) apply/setP => y. (* Goal: @eq bool (@in_mem (Finite.sort rT) y (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@Imset.imset aT rT f (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) (@SetDef.pred_of_set aT (@set1 aT x))))))) (@in_mem (Finite.sort rT) y (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@set1 rT (f x))))) *) by apply/imsetP/set1P=> [[x' /set1P-> //]| ->]; exists x; rewrite ?set11. Qed. Lemma mem_imset2 (D : pred aT) (D2 : aT -> pred aT2) x x2 : x \in D -> x2 \in D2 x -> f2 x x2 \in imset2 f2 (mem D) (fun x1 => mem (D2 x1)). Proof. (* Goal: forall (_ : is_true (@in_mem (Finite.sort aT) x (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) D))) (_ : is_true (@in_mem (Finite.sort aT2) x2 (@mem (Finite.sort aT2) (predPredType (Finite.sort aT2)) (D2 x)))), is_true (@in_mem (Finite.sort rT) (f2 x x2) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@Imset.imset2 aT aT2 rT f2 (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) D) (fun x1 : Finite.sort aT => @mem (Finite.sort aT2) (predPredType (Finite.sort aT2)) (D2 x1)))))) *) by move=> Dx Dx2; apply/imset2P; exists x x2. Qed. Lemma sub_imset_pre (A : pred aT) (B : pred rT) : (f @: A \subset B) = (A \subset f @^-1: B). Proof. (* Goal: @eq bool (@subset rT (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@Imset.imset aT rT f (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) A)))) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) B)) (@subset aT (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) A) (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) (@SetDef.pred_of_set aT (@preimset aT (Finite.sort rT) f (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) B))))) *) apply/subsetP/subsetP=> [sfAB x Ax | sAf'B fx]. (* Goal: forall _ : is_true (@in_mem (Finite.sort rT) fx (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@Imset.imset aT rT f (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) A))))), is_true (@in_mem (Finite.sort rT) fx (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) B)) *) (* Goal: is_true (@in_mem (Finite.sort aT) x (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) (@SetDef.pred_of_set aT (@preimset aT (Finite.sort rT) f (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) B))))) *) by rewrite inE sfAB ?mem_imset. (* Goal: forall _ : is_true (@in_mem (Finite.sort rT) fx (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@Imset.imset aT rT f (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) A))))), is_true (@in_mem (Finite.sort rT) fx (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) B)) *) by case/imsetP=> x Ax ->; move/sAf'B: Ax; rewrite inE. Qed. Lemma preimsetS (A B : pred rT) : A \subset B -> (f @^-1: A) \subset (f @^-1: B). Proof. (* Goal: forall _ : is_true (@subset rT (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) A) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) B)), is_true (@subset aT (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) (@SetDef.pred_of_set aT (@preimset aT (Finite.sort rT) f (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) A)))) (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) (@SetDef.pred_of_set aT (@preimset aT (Finite.sort rT) f (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) B))))) *) by move=> sAB; apply/subsetP=> y; rewrite !inE; apply: subsetP. Qed. Lemma preimset0 : f @^-1: set0 = set0. Proof. (* Goal: @eq (@set_of aT (Phant (Finite.sort aT))) (@preimset aT (Finite.sort rT) f (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@set0 rT)))) (@set0 aT) *) by apply/setP=> x; rewrite !inE. Qed. Lemma preimsetT : f @^-1: setT = setT. Proof. (* Goal: @eq (@set_of aT (Phant (Finite.sort aT))) (@preimset aT (Finite.sort rT) f (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@setTfor rT (Phant (Finite.sort rT)))))) (@setTfor aT (Phant (Finite.sort aT))) *) by apply/setP=> x; rewrite !inE. Qed. Lemma preimsetI (A B : {set rT}) : f @^-1: (A :&: B) = (f @^-1: A) :&: (f @^-1: B). Proof. (* Goal: @eq (@set_of aT (Phant (Finite.sort aT))) (@preimset aT (Finite.sort rT) f (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@setI rT A B)))) (@setI aT (@preimset aT (Finite.sort rT) f (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT A))) (@preimset aT (Finite.sort rT) f (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT B)))) *) by apply/setP=> y; rewrite !inE. Qed. Lemma preimsetU (A B : {set rT}) : f @^-1: (A :|: B) = (f @^-1: A) :|: (f @^-1: B). Proof. (* Goal: @eq (@set_of aT (Phant (Finite.sort aT))) (@preimset aT (Finite.sort rT) f (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@setU rT A B)))) (@setU aT (@preimset aT (Finite.sort rT) f (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT A))) (@preimset aT (Finite.sort rT) f (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT B)))) *) by apply/setP=> y; rewrite !inE. Qed. Lemma preimsetD (A B : {set rT}) : f @^-1: (A :\: B) = (f @^-1: A) :\: (f @^-1: B). Proof. (* Goal: @eq (@set_of aT (Phant (Finite.sort aT))) (@preimset aT (Finite.sort rT) f (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@setD rT A B)))) (@setD aT (@preimset aT (Finite.sort rT) f (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT A))) (@preimset aT (Finite.sort rT) f (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT B)))) *) by apply/setP=> y; rewrite !inE. Qed. Lemma preimsetC (A : {set rT}) : f @^-1: (~: A) = ~: f @^-1: A. Proof. (* Goal: @eq (@set_of aT (Phant (Finite.sort aT))) (@preimset aT (Finite.sort rT) f (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@setC rT A)))) (@setC aT (@preimset aT (Finite.sort rT) f (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT A)))) *) by apply/setP=> y; rewrite !inE. Qed. Lemma imsetS (A B : pred aT) : A \subset B -> f @: A \subset f @: B. Proof. (* Goal: forall _ : is_true (@subset aT (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) A) (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) B)), is_true (@subset rT (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@Imset.imset aT rT f (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) A)))) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@Imset.imset aT rT f (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) B))))) *) move=> sAB; apply/subsetP=> _ /imsetP[x Ax ->]. (* Goal: is_true (@in_mem (Finite.sort rT) (f x) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@Imset.imset aT rT f (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) B))))) *) by apply/imsetP; exists x; rewrite ?(subsetP sAB). Qed. Lemma imset_proper (A B : {set aT}) : {in B &, injective f} -> A \proper B -> f @: A \proper f @: B. Proof. (* Goal: forall (_ : @prop_in2 (Finite.sort aT) (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) (@SetDef.pred_of_set aT B)) (fun x1 x2 : Finite.sort aT => forall _ : @eq (Finite.sort rT) (f x1) (f x2), @eq (Finite.sort aT) x1 x2) (inPhantom (@injective (Finite.sort rT) (Finite.sort aT) f))) (_ : is_true (@proper aT (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) (@SetDef.pred_of_set aT A)) (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) (@SetDef.pred_of_set aT B)))), is_true (@proper rT (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@Imset.imset aT rT f (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) (@SetDef.pred_of_set aT A))))) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@Imset.imset aT rT f (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) (@SetDef.pred_of_set aT B)))))) *) move=> injf /properP[sAB [x Bx nAx]]; rewrite properE imsetS //=. (* Goal: is_true (negb (@subset rT (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@Imset.imset aT rT f (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) (@SetDef.pred_of_set aT B))))) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@Imset.imset aT rT f (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) (@SetDef.pred_of_set aT A))))))) *) apply: contra nAx => sfBA. (* Goal: is_true (@in_mem (Finite.sort aT) x (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) (@SetDef.pred_of_set aT A))) *) have: f x \in f @: A by rewrite (subsetP sfBA) ?mem_imset. (* Goal: forall _ : is_true (@in_mem (Finite.sort rT) (f x) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@Imset.imset aT rT f (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) (@SetDef.pred_of_set aT A)))))), is_true (@in_mem (Finite.sort aT) x (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) (@SetDef.pred_of_set aT A))) *) by case/imsetP=> y Ay /injf-> //; apply: subsetP sAB y Ay. Qed. Lemma preimset_proper (A B : {set rT}) : B \subset codom f -> A \proper B -> (f @^-1: A) \proper (f @^-1: B). Proof. (* Goal: forall (_ : is_true (@subset rT (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT B)) (@mem (Equality.sort (Finite.eqType rT)) (seq_predType (Finite.eqType rT)) (@codom aT (Finite.sort rT) f)))) (_ : is_true (@proper rT (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT A)) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT B)))), is_true (@proper aT (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) (@SetDef.pred_of_set aT (@preimset aT (Finite.sort rT) f (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT A))))) (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) (@SetDef.pred_of_set aT (@preimset aT (Finite.sort rT) f (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT B)))))) *) move=> sBc /properP[sAB [u Bu nAu]]; rewrite properE preimsetS //=. (* Goal: is_true (negb (@subset aT (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) (@SetDef.pred_of_set aT (@preimset aT (Finite.sort rT) f (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT B))))) (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) (@SetDef.pred_of_set aT (@preimset aT (Finite.sort rT) f (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT A))))))) *) by apply/subsetPn; exists (iinv (subsetP sBc _ Bu)); rewrite inE /= f_iinv. Qed. Lemma imsetU (A B : {set aT}) : f @: (A :|: B) = (f @: A) :|: (f @: B). Lemma imsetU1 a (A : {set aT}) : f @: (a |: A) = f a |: (f @: A). Proof. (* Goal: @eq (@set_of rT (Phant (Finite.sort rT))) (@Imset.imset aT rT f (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) (@SetDef.pred_of_set aT (@setU aT (@set1 aT a) A)))) (@setU rT (@set1 rT (f a)) (@Imset.imset aT rT f (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) (@SetDef.pred_of_set aT A)))) *) by rewrite imsetU imset_set1. Qed. Lemma imsetI (A B : {set aT}) : {in A & B, injective f} -> f @: (A :&: B) = f @: A :&: f @: B. Proof. (* Goal: forall _ : @prop_in11 (Finite.sort aT) (Finite.sort aT) (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) (@SetDef.pred_of_set aT A)) (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) (@SetDef.pred_of_set aT B)) (fun x1 x2 : Finite.sort aT => forall _ : @eq (Finite.sort rT) (f x1) (f x2), @eq (Finite.sort aT) x1 x2) (inPhantom (@injective (Finite.sort rT) (Finite.sort aT) f)), @eq (@set_of rT (Phant (Finite.sort rT))) (@Imset.imset aT rT f (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) (@SetDef.pred_of_set aT (@setI aT A B)))) (@setI rT (@Imset.imset aT rT f (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) (@SetDef.pred_of_set aT A))) (@Imset.imset aT rT f (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) (@SetDef.pred_of_set aT B)))) *) move=> injf; apply/eqP; rewrite eqEsubset subsetI. (* Goal: is_true (andb (andb (@subset rT (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@Imset.imset aT rT f (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) (@SetDef.pred_of_set aT (@setI aT A B)))))) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@Imset.imset aT rT f (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) (@SetDef.pred_of_set aT A)))))) (@subset rT (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@Imset.imset aT rT f (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) (@SetDef.pred_of_set aT (@setI aT A B)))))) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@Imset.imset aT rT f (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) (@SetDef.pred_of_set aT B))))))) (@subset rT (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@setI rT (@Imset.imset aT rT f (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) (@SetDef.pred_of_set aT A))) (@Imset.imset aT rT f (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) (@SetDef.pred_of_set aT B)))))) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@Imset.imset aT rT f (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) (@SetDef.pred_of_set aT (@setI aT A B)))))))) *) rewrite 2?imsetS (andTb, subsetIl, subsetIr) //=. (* Goal: is_true (@subset rT (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@setI rT (@Imset.imset aT rT f (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) (@SetDef.pred_of_set aT A))) (@Imset.imset aT rT f (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) (@SetDef.pred_of_set aT B)))))) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@Imset.imset aT rT f (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) (@SetDef.pred_of_set aT (@setI aT A B))))))) *) apply/subsetP=> _ /setIP[/imsetP[x Ax ->] /imsetP[z Bz /injf eqxz]]. (* Goal: is_true (@in_mem (Finite.sort rT) (f x) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@Imset.imset aT rT f (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) (@SetDef.pred_of_set aT (@setI aT A B))))))) *) by rewrite mem_imset // inE Ax eqxz. Qed. Lemma imset2Sl (A B : pred aT) (C : pred aT2) : A \subset B -> f2 @2: (A, C) \subset f2 @2: (B, C). Proof. (* Goal: forall _ : is_true (@subset aT (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) A) (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) B)), is_true (@subset rT (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@Imset.imset2 aT aT2 rT f2 (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) A) (fun _ : Finite.sort aT => @mem (Finite.sort aT2) (predPredType (Finite.sort aT2)) C)))) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@Imset.imset2 aT aT2 rT f2 (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) B) (fun _ : Finite.sort aT => @mem (Finite.sort aT2) (predPredType (Finite.sort aT2)) C))))) *) move=> sAB; apply/subsetP=> _ /imset2P[x y Ax Cy ->]. (* Goal: is_true (@in_mem (Finite.sort rT) (f2 x y) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@Imset.imset2 aT aT2 rT f2 (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) B) (fun _ : Finite.sort aT => @mem (Finite.sort aT2) (predPredType (Finite.sort aT2)) C))))) *) by apply/imset2P; exists x y; rewrite ?(subsetP sAB). Qed. Lemma imset2Sr (A B : pred aT2) (C : pred aT) : A \subset B -> f2 @2: (C, A) \subset f2 @2: (C, B). Proof. (* Goal: forall _ : is_true (@subset aT2 (@mem (Finite.sort aT2) (predPredType (Finite.sort aT2)) A) (@mem (Finite.sort aT2) (predPredType (Finite.sort aT2)) B)), is_true (@subset rT (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@Imset.imset2 aT aT2 rT f2 (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) C) (fun _ : Finite.sort aT => @mem (Finite.sort aT2) (predPredType (Finite.sort aT2)) A)))) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@Imset.imset2 aT aT2 rT f2 (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) C) (fun _ : Finite.sort aT => @mem (Finite.sort aT2) (predPredType (Finite.sort aT2)) B))))) *) move=> sAB; apply/subsetP=> _ /imset2P[x y Ax Cy ->]. (* Goal: is_true (@in_mem (Finite.sort rT) (f2 x y) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@Imset.imset2 aT aT2 rT f2 (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) C) (fun _ : Finite.sort aT => @mem (Finite.sort aT2) (predPredType (Finite.sort aT2)) B))))) *) by apply/imset2P; exists x y; rewrite ?(subsetP sAB). Qed. Lemma imset2S (A B : pred aT) (A2 B2 : pred aT2) : A \subset B -> A2 \subset B2 -> f2 @2: (A, A2) \subset f2 @2: (B, B2). Proof. (* Goal: forall (_ : is_true (@subset aT (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) A) (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) B))) (_ : is_true (@subset aT2 (@mem (Finite.sort aT2) (predPredType (Finite.sort aT2)) A2) (@mem (Finite.sort aT2) (predPredType (Finite.sort aT2)) B2))), is_true (@subset rT (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@Imset.imset2 aT aT2 rT f2 (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) A) (fun _ : Finite.sort aT => @mem (Finite.sort aT2) (predPredType (Finite.sort aT2)) A2)))) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@Imset.imset2 aT aT2 rT f2 (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) B) (fun _ : Finite.sort aT => @mem (Finite.sort aT2) (predPredType (Finite.sort aT2)) B2))))) *) by move=> /(imset2Sl B2) sBA /(imset2Sr A)/subset_trans->. Qed. End ImsetProp. Implicit Types (f g : aT -> rT) (D : {set aT}) (R : pred rT). Lemma eq_preimset f g R : f =1 g -> f @^-1: R = g @^-1: R. Proof. (* Goal: forall _ : @eqfun (Finite.sort rT) (Finite.sort aT) f g, @eq (@set_of aT (Phant (Finite.sort aT))) (@preimset aT (Finite.sort rT) f (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) R)) (@preimset aT (Finite.sort rT) g (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) R)) *) by move=> eqfg; apply/setP => y; rewrite !inE eqfg. Qed. Lemma eq_imset f g D : f =1 g -> f @: D = g @: D. Proof. (* Goal: forall _ : @eqfun (Finite.sort rT) (Finite.sort aT) f g, @eq (@set_of rT (Phant (Finite.sort rT))) (@Imset.imset aT rT f (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) (@SetDef.pred_of_set aT D))) (@Imset.imset aT rT g (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) (@SetDef.pred_of_set aT D))) *) move=> eqfg; apply/setP=> y. (* Goal: @eq bool (@in_mem (Finite.sort rT) y (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@Imset.imset aT rT f (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) (@SetDef.pred_of_set aT D)))))) (@in_mem (Finite.sort rT) y (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@Imset.imset aT rT g (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) (@SetDef.pred_of_set aT D)))))) *) by apply/imsetP/imsetP=> [] [x Dx ->]; exists x; rewrite ?eqfg. Qed. Lemma eq_in_imset f g D : {in D, f =1 g} -> f @: D = g @: D. Proof. (* Goal: forall _ : @prop_in1 (Finite.sort aT) (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) (@SetDef.pred_of_set aT D)) (fun x : Finite.sort aT => @eq (Finite.sort rT) (f x) (g x)) (inPhantom (@eqfun (Finite.sort rT) (Finite.sort aT) f g)), @eq (@set_of rT (Phant (Finite.sort rT))) (@Imset.imset aT rT f (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) (@SetDef.pred_of_set aT D))) (@Imset.imset aT rT g (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) (@SetDef.pred_of_set aT D))) *) move=> eqfg; apply/setP => y. (* Goal: @eq bool (@in_mem (Finite.sort rT) y (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@Imset.imset aT rT f (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) (@SetDef.pred_of_set aT D)))))) (@in_mem (Finite.sort rT) y (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@Imset.imset aT rT g (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) (@SetDef.pred_of_set aT D)))))) *) by apply/imsetP/imsetP=> [] [x Dx ->]; exists x; rewrite ?eqfg. Qed. Lemma eq_in_imset2 (f g : aT -> aT2 -> rT) (D : pred aT) (D2 : pred aT2) : {in D & D2, f =2 g} -> f @2: (D, D2) = g @2: (D, D2). Proof. (* Goal: forall _ : @prop_in11 (Finite.sort aT) (Finite.sort aT2) (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) D) (@mem (Finite.sort aT2) (predPredType (Finite.sort aT2)) D2) (fun (x : Finite.sort aT) (y : Finite.sort aT2) => @eq (Finite.sort rT) (f x y) (g x y)) (inPhantom (@eqrel (Finite.sort rT) (Finite.sort aT2) (Finite.sort aT) f g)), @eq (@set_of rT (Phant (Finite.sort rT))) (@Imset.imset2 aT aT2 rT f (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) D) (fun _ : Finite.sort aT => @mem (Finite.sort aT2) (predPredType (Finite.sort aT2)) D2)) (@Imset.imset2 aT aT2 rT g (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) D) (fun _ : Finite.sort aT => @mem (Finite.sort aT2) (predPredType (Finite.sort aT2)) D2)) *) move=> eqfg; apply/setP => y. (* Goal: @eq bool (@in_mem (Finite.sort rT) y (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@Imset.imset2 aT aT2 rT f (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) D) (fun _ : Finite.sort aT => @mem (Finite.sort aT2) (predPredType (Finite.sort aT2)) D2))))) (@in_mem (Finite.sort rT) y (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@Imset.imset2 aT aT2 rT g (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) D) (fun _ : Finite.sort aT => @mem (Finite.sort aT2) (predPredType (Finite.sort aT2)) D2))))) *) by apply/imset2P/imset2P=> [] [x x2 Dx Dx2 ->]; exists x x2; rewrite ?eqfg. Qed. End ImsetTheory. Lemma imset2_pair (A : {set aT}) (B : {set aT2}) : [set (x, y) | x in A, y in B] = setX A B. Proof. (* Goal: @eq (@set_of (prod_finType aT aT2) (Phant (Finite.sort (prod_finType aT aT2)))) (@Imset.imset2 aT aT2 (prod_finType aT aT2) (fun (x : Finite.sort aT) (y : Finite.sort aT2) => @pair (Finite.sort aT) (Finite.sort aT2) x y) (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) (@SetDef.pred_of_set aT A)) (fun _ : Finite.sort aT => @mem (Finite.sort aT2) (predPredType (Finite.sort aT2)) (@SetDef.pred_of_set aT2 B))) (@setX aT aT2 A B) *) apply/setP=> [[x y]]; rewrite !inE /=. (* Goal: @eq bool (@in_mem (prod (Finite.sort aT) (Finite.sort aT2)) (@pair (Finite.sort aT) (Finite.sort aT2) x y) (@mem (prod (Finite.sort aT) (Finite.sort aT2)) (predPredType (prod (Finite.sort aT) (Finite.sort aT2))) (@SetDef.pred_of_set (prod_finType aT aT2) (@Imset.imset2 aT aT2 (prod_finType aT aT2) (fun (x : Finite.sort aT) (y : Finite.sort aT2) => @pair (Finite.sort aT) (Finite.sort aT2) x y) (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) (@SetDef.pred_of_set aT A)) (fun _ : Finite.sort aT => @mem (Finite.sort aT2) (predPredType (Finite.sort aT2)) (@SetDef.pred_of_set aT2 B)))))) (andb (@in_mem (Finite.sort aT) x (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) (@SetDef.pred_of_set aT A))) (@in_mem (Finite.sort aT2) y (@mem (Finite.sort aT2) (predPredType (Finite.sort aT2)) (@SetDef.pred_of_set aT2 B)))) *) by apply/imset2P/andP=> [[_ _ _ _ [-> ->]//]| []]; exists x y. Qed. Lemma setXS (A1 B1 : {set aT}) (A2 B2 : {set aT2}) : A1 \subset B1 -> A2 \subset B2 -> setX A1 A2 \subset setX B1 B2. Proof. (* Goal: forall (_ : is_true (@subset aT (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) (@SetDef.pred_of_set aT A1)) (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) (@SetDef.pred_of_set aT B1)))) (_ : is_true (@subset aT2 (@mem (Finite.sort aT2) (predPredType (Finite.sort aT2)) (@SetDef.pred_of_set aT2 A2)) (@mem (Finite.sort aT2) (predPredType (Finite.sort aT2)) (@SetDef.pred_of_set aT2 B2)))), is_true (@subset (prod_finType aT aT2) (@mem (Finite.sort (prod_finType aT aT2)) (predPredType (Finite.sort (prod_finType aT aT2))) (@SetDef.pred_of_set (prod_finType aT aT2) (@setX aT aT2 A1 A2))) (@mem (Finite.sort (prod_finType aT aT2)) (predPredType (Finite.sort (prod_finType aT aT2))) (@SetDef.pred_of_set (prod_finType aT aT2) (@setX aT aT2 B1 B2)))) *) by move=> sAB1 sAB2; rewrite -!imset2_pair imset2S. Qed. End FunImage. Arguments imsetP {aT rT f D y}. Arguments imset2P {aT aT2 rT f2 D1 D2 y}. Section BigOps. Variables (R : Type) (idx : R). Variables (op : Monoid.law idx) (aop : Monoid.com_law idx). Variables I J : finType. Implicit Type A B : {set I}. Implicit Type h : I -> J. Implicit Type P : pred I. Implicit Type F : I -> R. Lemma big_set0 F : \big[op/idx]_(i in set0) F i = idx. Proof. (* Goal: @eq R (@BigOp.bigop R (Finite.sort I) idx (index_enum I) (fun i : Finite.sort I => @BigBody R (Finite.sort I) i (@Monoid.operator R idx op) (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@SetDef.pred_of_set I (@set0 I)))) (F i))) idx *) by apply: big_pred0 => i; rewrite inE. Qed. Lemma big_set1 a F : \big[op/idx]_(i in [set a]) F i = F a. Proof. (* Goal: @eq R (@BigOp.bigop R (Finite.sort I) idx (index_enum I) (fun i : Finite.sort I => @BigBody R (Finite.sort I) i (@Monoid.operator R idx op) (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@SetDef.pred_of_set I (@set1 I a)))) (F i))) (F a) *) by apply: big_pred1 => i; rewrite !inE. Qed. Lemma big_setIDdep A B P F : \big[aop/idx]_(i in A | P i) F i = aop (\big[aop/idx]_(i in A :&: B | P i) F i) (\big[aop/idx]_(i in A :\: B | P i) F i). Proof. (* Goal: @eq R (@BigOp.bigop R (Finite.sort I) idx (index_enum I) (fun i : Finite.sort I => @BigBody R (Finite.sort I) i (@Monoid.operator R idx (@Monoid.com_operator R idx aop)) (andb (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@SetDef.pred_of_set I A))) (P i)) (F i))) (@Monoid.operator R idx (@Monoid.com_operator R idx aop) (@BigOp.bigop R (Finite.sort I) idx (index_enum I) (fun i : Finite.sort I => @BigBody R (Finite.sort I) i (@Monoid.operator R idx (@Monoid.com_operator R idx aop)) (andb (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@SetDef.pred_of_set I (@setI I A B)))) (P i)) (F i))) (@BigOp.bigop R (Finite.sort I) idx (index_enum I) (fun i : Finite.sort I => @BigBody R (Finite.sort I) i (@Monoid.operator R idx (@Monoid.com_operator R idx aop)) (andb (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@SetDef.pred_of_set I (@setD I A B)))) (P i)) (F i)))) *) rewrite (bigID (mem B)) setDE. (* Goal: @eq R (@Monoid.operator R idx (@Monoid.com_operator R idx aop) (@BigOp.bigop R (Finite.sort I) idx (index_enum I) (fun i : Finite.sort I => @BigBody R (Finite.sort I) i (@Monoid.operator R idx (@Monoid.com_operator R idx aop)) (andb (andb (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@SetDef.pred_of_set I A))) (P i)) (@pred_of_simpl (Finite.sort I) (@pred_of_mem_pred (Finite.sort I) (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@SetDef.pred_of_set I B))) i)) (F i))) (@BigOp.bigop R (Finite.sort I) idx (index_enum I) (fun i : Finite.sort I => @BigBody R (Finite.sort I) i (@Monoid.operator R idx (@Monoid.com_operator R idx aop)) (andb (andb (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@SetDef.pred_of_set I A))) (P i)) (negb (@pred_of_simpl (Finite.sort I) (@pred_of_mem_pred (Finite.sort I) (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@SetDef.pred_of_set I B))) i))) (F i)))) (@Monoid.operator R idx (@Monoid.com_operator R idx aop) (@BigOp.bigop R (Finite.sort I) idx (index_enum I) (fun i : Finite.sort I => @BigBody R (Finite.sort I) i (@Monoid.operator R idx (@Monoid.com_operator R idx aop)) (andb (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@SetDef.pred_of_set I (@setI I A B)))) (P i)) (F i))) (@BigOp.bigop R (Finite.sort I) idx (index_enum I) (fun i : Finite.sort I => @BigBody R (Finite.sort I) i (@Monoid.operator R idx (@Monoid.com_operator R idx aop)) (andb (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@SetDef.pred_of_set I (@setI I A (@setC I B))))) (P i)) (F i)))) *) by congr (aop _ _); apply: eq_bigl => i; rewrite !inE andbAC. Qed. Lemma big_setID A B F : \big[aop/idx]_(i in A) F i = aop (\big[aop/idx]_(i in A :&: B) F i) (\big[aop/idx]_(i in A :\: B) F i). Proof. (* Goal: @eq R (@BigOp.bigop R (Finite.sort I) idx (index_enum I) (fun i : Finite.sort I => @BigBody R (Finite.sort I) i (@Monoid.operator R idx (@Monoid.com_operator R idx aop)) (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@SetDef.pred_of_set I A))) (F i))) (@Monoid.operator R idx (@Monoid.com_operator R idx aop) (@BigOp.bigop R (Finite.sort I) idx (index_enum I) (fun i : Finite.sort I => @BigBody R (Finite.sort I) i (@Monoid.operator R idx (@Monoid.com_operator R idx aop)) (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@SetDef.pred_of_set I (@setI I A B)))) (F i))) (@BigOp.bigop R (Finite.sort I) idx (index_enum I) (fun i : Finite.sort I => @BigBody R (Finite.sort I) i (@Monoid.operator R idx (@Monoid.com_operator R idx aop)) (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@SetDef.pred_of_set I (@setD I A B)))) (F i)))) *) rewrite (bigID (mem B)) !(eq_bigl _ _ (in_set _)) //=. (* Goal: @eq R (@Monoid.operator R idx (@Monoid.com_operator R idx aop) (@BigOp.bigop R (Finite.sort I) idx (index_enum I) (fun i : Finite.sort I => @BigBody R (Finite.sort I) i (@Monoid.operator R idx (@Monoid.com_operator R idx aop)) (andb (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@SetDef.pred_of_set I A))) (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@SetDef.pred_of_set I B)))) (F i))) (@BigOp.bigop R (Finite.sort I) idx (index_enum I) (fun i : Finite.sort I => @BigBody R (Finite.sort I) i (@Monoid.operator R idx (@Monoid.com_operator R idx aop)) (andb (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@SetDef.pred_of_set I A))) (negb (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@SetDef.pred_of_set I B))))) (F i)))) (@Monoid.operator R idx (@Monoid.com_operator R idx aop) (@BigOp.bigop R (Finite.sort I) idx (index_enum I) (fun i : Finite.sort I => @BigBody R (Finite.sort I) i (@Monoid.operator R idx (@Monoid.com_operator R idx aop)) (andb (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@SetDef.pred_of_set I A))) (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@SetDef.pred_of_set I B)))) (F i))) (@BigOp.bigop R (Finite.sort I) idx (index_enum I) (fun i : Finite.sort I => @BigBody R (Finite.sort I) i (@Monoid.operator R idx (@Monoid.com_operator R idx aop)) (andb (negb (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@SetDef.pred_of_set I B)))) (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@SetDef.pred_of_set I A)))) (F i)))) *) by congr (aop _); apply: eq_bigl => i; rewrite andbC. Qed. Lemma big_setD1 a A F : a \in A -> \big[aop/idx]_(i in A) F i = aop (F a) (\big[aop/idx]_(i in A :\ a) F i). Lemma big_setU1 a A F : a \notin A -> \big[aop/idx]_(i in a |: A) F i = aop (F a) (\big[aop/idx]_(i in A) F i). Proof. (* Goal: forall _ : is_true (negb (@in_mem (Finite.sort I) a (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@SetDef.pred_of_set I A)))), @eq R (@BigOp.bigop R (Finite.sort I) idx (index_enum I) (fun i : Finite.sort I => @BigBody R (Finite.sort I) i (@Monoid.operator R idx (@Monoid.com_operator R idx aop)) (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@SetDef.pred_of_set I (@setU I (@set1 I a) A)))) (F i))) (@Monoid.operator R idx (@Monoid.com_operator R idx aop) (F a) (@BigOp.bigop R (Finite.sort I) idx (index_enum I) (fun i : Finite.sort I => @BigBody R (Finite.sort I) i (@Monoid.operator R idx (@Monoid.com_operator R idx aop)) (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@SetDef.pred_of_set I A))) (F i)))) *) by move=> notAa; rewrite (@big_setD1 a) ?setU11 //= setU1K. Qed. Lemma big_imset h (A : pred I) G : {in A &, injective h} -> \big[aop/idx]_(j in h @: A) G j = \big[aop/idx]_(i in A) G (h i). Proof. (* Goal: forall _ : @prop_in2 (Finite.sort I) (@mem (Finite.sort I) (predPredType (Finite.sort I)) A) (fun x1 x2 : Finite.sort I => forall _ : @eq (Finite.sort J) (h x1) (h x2), @eq (Finite.sort I) x1 x2) (inPhantom (@injective (Finite.sort J) (Finite.sort I) h)), @eq R (@BigOp.bigop R (Finite.sort J) idx (index_enum J) (fun j : Finite.sort J => @BigBody R (Finite.sort J) j (@Monoid.operator R idx (@Monoid.com_operator R idx aop)) (@in_mem (Finite.sort J) j (@mem (Finite.sort J) (predPredType (Finite.sort J)) (@SetDef.pred_of_set J (@Imset.imset I J h (@mem (Finite.sort I) (predPredType (Finite.sort I)) A))))) (G j))) (@BigOp.bigop R (Finite.sort I) idx (index_enum I) (fun i : Finite.sort I => @BigBody R (Finite.sort I) i (@Monoid.operator R idx (@Monoid.com_operator R idx aop)) (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) A)) (G (h i)))) *) move=> injh; pose hA := mem (image h A). (* Goal: @eq R (@BigOp.bigop R (Finite.sort J) idx (index_enum J) (fun j : Finite.sort J => @BigBody R (Finite.sort J) j (@Monoid.operator R idx (@Monoid.com_operator R idx aop)) (@in_mem (Finite.sort J) j (@mem (Finite.sort J) (predPredType (Finite.sort J)) (@SetDef.pred_of_set J (@Imset.imset I J h (@mem (Finite.sort I) (predPredType (Finite.sort I)) A))))) (G j))) (@BigOp.bigop R (Finite.sort I) idx (index_enum I) (fun i : Finite.sort I => @BigBody R (Finite.sort I) i (@Monoid.operator R idx (@Monoid.com_operator R idx aop)) (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) A)) (G (h i)))) *) have [x0 Ax0 | A0] := pickP A; last first. (* Goal: @eq R (@BigOp.bigop R (Finite.sort J) idx (index_enum J) (fun j : Finite.sort J => @BigBody R (Finite.sort J) j (@Monoid.operator R idx (@Monoid.com_operator R idx aop)) (@in_mem (Finite.sort J) j (@mem (Finite.sort J) (predPredType (Finite.sort J)) (@SetDef.pred_of_set J (@Imset.imset I J h (@mem (Finite.sort I) (predPredType (Finite.sort I)) A))))) (G j))) (@BigOp.bigop R (Finite.sort I) idx (index_enum I) (fun i : Finite.sort I => @BigBody R (Finite.sort I) i (@Monoid.operator R idx (@Monoid.com_operator R idx aop)) (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) A)) (G (h i)))) *) (* Goal: @eq R (@BigOp.bigop R (Finite.sort J) idx (index_enum J) (fun j : Finite.sort J => @BigBody R (Finite.sort J) j (@Monoid.operator R idx (@Monoid.com_operator R idx aop)) (@in_mem (Finite.sort J) j (@mem (Finite.sort J) (predPredType (Finite.sort J)) (@SetDef.pred_of_set J (@Imset.imset I J h (@mem (Finite.sort I) (predPredType (Finite.sort I)) A))))) (G j))) (@BigOp.bigop R (Finite.sort I) idx (index_enum I) (fun i : Finite.sort I => @BigBody R (Finite.sort I) i (@Monoid.operator R idx (@Monoid.com_operator R idx aop)) (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) A)) (G (h i)))) *) by rewrite !big_pred0 // => x; apply/imsetP=> [[i]]; rewrite unfold_in A0. (* Goal: @eq R (@BigOp.bigop R (Finite.sort J) idx (index_enum J) (fun j : Finite.sort J => @BigBody R (Finite.sort J) j (@Monoid.operator R idx (@Monoid.com_operator R idx aop)) (@in_mem (Finite.sort J) j (@mem (Finite.sort J) (predPredType (Finite.sort J)) (@SetDef.pred_of_set J (@Imset.imset I J h (@mem (Finite.sort I) (predPredType (Finite.sort I)) A))))) (G j))) (@BigOp.bigop R (Finite.sort I) idx (index_enum I) (fun i : Finite.sort I => @BigBody R (Finite.sort I) i (@Monoid.operator R idx (@Monoid.com_operator R idx aop)) (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) A)) (G (h i)))) *) rewrite (eq_bigl hA) => [|j]; last by apply/imsetP/imageP. (* Goal: @eq R (@BigOp.bigop R (Equality.sort (Finite.eqType J)) idx (index_enum J) (fun i : Equality.sort (Finite.eqType J) => @BigBody R (Equality.sort (Finite.eqType J)) i (@Monoid.operator R idx (@Monoid.com_operator R idx aop)) (@pred_of_simpl (Equality.sort (Finite.eqType J)) (@pred_of_mem_pred (Equality.sort (Finite.eqType J)) hA) i) (G i))) (@BigOp.bigop R (Finite.sort I) idx (index_enum I) (fun i : Finite.sort I => @BigBody R (Finite.sort I) i (@Monoid.operator R idx (@Monoid.com_operator R idx aop)) (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) A)) (G (h i)))) *) pose h' j := if insub j : {? j | hA j} is Some u then iinv (svalP u) else x0. (* Goal: @eq R (@BigOp.bigop R (Equality.sort (Finite.eqType J)) idx (index_enum J) (fun i : Equality.sort (Finite.eqType J) => @BigBody R (Equality.sort (Finite.eqType J)) i (@Monoid.operator R idx (@Monoid.com_operator R idx aop)) (@pred_of_simpl (Equality.sort (Finite.eqType J)) (@pred_of_mem_pred (Equality.sort (Finite.eqType J)) hA) i) (G i))) (@BigOp.bigop R (Finite.sort I) idx (index_enum I) (fun i : Finite.sort I => @BigBody R (Finite.sort I) i (@Monoid.operator R idx (@Monoid.com_operator R idx aop)) (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) A)) (G (h i)))) *) rewrite (reindex_onto h h') => [|j hAj]; rewrite {}/h'; last first. (* Goal: @eq R (@BigOp.bigop R (Finite.sort I) idx (index_enum I) (fun j : Finite.sort I => @BigBody R (Finite.sort I) j (@Monoid.operator R idx (@Monoid.com_operator R idx aop)) (andb (@pred_of_simpl (Equality.sort (Finite.eqType J)) (@pred_of_mem_pred (Equality.sort (Finite.eqType J)) hA) (h j)) (@eq_op (Finite.eqType I) match @insub (Equality.sort (Finite.eqType J)) (fun x : Equality.sort (Finite.eqType J) => @pred_of_simpl (Equality.sort (Finite.eqType J)) (@pred_of_mem_pred (Equality.sort (Finite.eqType J)) hA) x) (@sig_subType (Equality.sort (Finite.eqType J)) (@pred_of_simpl (Equality.sort (Finite.eqType J)) (@pred_of_mem_pred (Equality.sort (Finite.eqType J)) hA))) (h j) with | Some u => @iinv I (Finite.eqType J) h A (@proj1_sig (Equality.sort (Finite.eqType J)) (fun j0 : Equality.sort (Finite.eqType J) => is_true (@pred_of_simpl (Equality.sort (Finite.eqType J)) (@pred_of_mem_pred (Equality.sort (Finite.eqType J)) hA) j0)) u) (@svalP (Equality.sort (Finite.eqType J)) (fun j0 : Equality.sort (Finite.eqType J) => is_true (@pred_of_simpl (Equality.sort (Finite.eqType J)) (@pred_of_mem_pred (Equality.sort (Finite.eqType J)) hA) j0)) u) | None => x0 end j)) (G (h j)))) (@BigOp.bigop R (Finite.sort I) idx (index_enum I) (fun i : Finite.sort I => @BigBody R (Finite.sort I) i (@Monoid.operator R idx (@Monoid.com_operator R idx aop)) (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) A)) (G (h i)))) *) (* Goal: @eq (Finite.sort J) (h match @insub (Equality.sort (Finite.eqType J)) (fun x : Equality.sort (Finite.eqType J) => @pred_of_simpl (Equality.sort (Finite.eqType J)) (@pred_of_mem_pred (Equality.sort (Finite.eqType J)) hA) x) (@sig_subType (Equality.sort (Finite.eqType J)) (@pred_of_simpl (Equality.sort (Finite.eqType J)) (@pred_of_mem_pred (Equality.sort (Finite.eqType J)) hA))) j with | Some u => @iinv I (Finite.eqType J) h A (@proj1_sig (Equality.sort (Finite.eqType J)) (fun j : Equality.sort (Finite.eqType J) => is_true (@pred_of_simpl (Equality.sort (Finite.eqType J)) (@pred_of_mem_pred (Equality.sort (Finite.eqType J)) hA) j)) u) (@svalP (Equality.sort (Finite.eqType J)) (fun j : Equality.sort (Finite.eqType J) => is_true (@pred_of_simpl (Equality.sort (Finite.eqType J)) (@pred_of_mem_pred (Equality.sort (Finite.eqType J)) hA) j)) u) | None => x0 end) j *) by rewrite (insubT hA hAj) f_iinv. (* Goal: @eq R (@BigOp.bigop R (Finite.sort I) idx (index_enum I) (fun j : Finite.sort I => @BigBody R (Finite.sort I) j (@Monoid.operator R idx (@Monoid.com_operator R idx aop)) (andb (@pred_of_simpl (Equality.sort (Finite.eqType J)) (@pred_of_mem_pred (Equality.sort (Finite.eqType J)) hA) (h j)) (@eq_op (Finite.eqType I) match @insub (Equality.sort (Finite.eqType J)) (fun x : Equality.sort (Finite.eqType J) => @pred_of_simpl (Equality.sort (Finite.eqType J)) (@pred_of_mem_pred (Equality.sort (Finite.eqType J)) hA) x) (@sig_subType (Equality.sort (Finite.eqType J)) (@pred_of_simpl (Equality.sort (Finite.eqType J)) (@pred_of_mem_pred (Equality.sort (Finite.eqType J)) hA))) (h j) with | Some u => @iinv I (Finite.eqType J) h A (@proj1_sig (Equality.sort (Finite.eqType J)) (fun j0 : Equality.sort (Finite.eqType J) => is_true (@pred_of_simpl (Equality.sort (Finite.eqType J)) (@pred_of_mem_pred (Equality.sort (Finite.eqType J)) hA) j0)) u) (@svalP (Equality.sort (Finite.eqType J)) (fun j0 : Equality.sort (Finite.eqType J) => is_true (@pred_of_simpl (Equality.sort (Finite.eqType J)) (@pred_of_mem_pred (Equality.sort (Finite.eqType J)) hA) j0)) u) | None => x0 end j)) (G (h j)))) (@BigOp.bigop R (Finite.sort I) idx (index_enum I) (fun i : Finite.sort I => @BigBody R (Finite.sort I) i (@Monoid.operator R idx (@Monoid.com_operator R idx aop)) (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) A)) (G (h i)))) *) apply: eq_bigl => i; case: insubP => [u -> /= def_u | nhAhi]. (* Goal: @eq bool (andb (@pred_of_simpl (Equality.sort (Finite.eqType J)) (@pred_of_mem_pred (Equality.sort (Finite.eqType J)) hA) (h i)) (@eq_op (Finite.eqType I) x0 i)) (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) A)) *) (* Goal: @eq bool (@eq_op (Finite.eqType I) (@iinv I (Finite.eqType J) h A (@proj1_sig (Finite.sort J) (fun j : Finite.sort J => is_true (@in_mem (Finite.sort J) j hA)) u) (@svalP (Finite.sort J) (fun j : Finite.sort J => is_true (@in_mem (Finite.sort J) j hA)) u)) i) (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) A)) *) set i' := iinv _; have Ai' : i' \in A := mem_iinv (svalP u). (* Goal: @eq bool (andb (@pred_of_simpl (Equality.sort (Finite.eqType J)) (@pred_of_mem_pred (Equality.sort (Finite.eqType J)) hA) (h i)) (@eq_op (Finite.eqType I) x0 i)) (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) A)) *) (* Goal: @eq bool (@eq_op (Finite.eqType I) i' i) (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) A)) *) by apply/eqP/idP=> [<- // | Ai]; apply: injh; rewrite ?f_iinv. (* Goal: @eq bool (andb (@pred_of_simpl (Equality.sort (Finite.eqType J)) (@pred_of_mem_pred (Equality.sort (Finite.eqType J)) hA) (h i)) (@eq_op (Finite.eqType I) x0 i)) (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) A)) *) symmetry; rewrite (negbTE nhAhi); apply/idP=> Ai. (* Goal: False *) by case/imageP: nhAhi; exists i. Qed. Lemma partition_big_imset h (A : pred I) F : \big[aop/idx]_(i in A) F i = \big[aop/idx]_(j in h @: A) \big[aop/idx]_(i in A | h i == j) F i. Proof. (* Goal: @eq R (@BigOp.bigop R (Finite.sort I) idx (index_enum I) (fun i : Finite.sort I => @BigBody R (Finite.sort I) i (@Monoid.operator R idx (@Monoid.com_operator R idx aop)) (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) A)) (F i))) (@BigOp.bigop R (Finite.sort J) idx (index_enum J) (fun j : Finite.sort J => @BigBody R (Finite.sort J) j (@Monoid.operator R idx (@Monoid.com_operator R idx aop)) (@in_mem (Finite.sort J) j (@mem (Finite.sort J) (predPredType (Finite.sort J)) (@SetDef.pred_of_set J (@Imset.imset I J h (@mem (Finite.sort I) (predPredType (Finite.sort I)) A))))) (@BigOp.bigop R (Finite.sort I) idx (index_enum I) (fun i : Finite.sort I => @BigBody R (Finite.sort I) i (@Monoid.operator R idx (@Monoid.com_operator R idx aop)) (andb (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) A)) (@eq_op (Finite.eqType J) (h i) j)) (F i))))) *) by apply: partition_big => i Ai; apply/imsetP; exists i. Qed. End BigOps. Arguments big_setID [R idx aop I A]. Arguments big_setD1 [R idx aop I] a [A F]. Arguments big_setU1 [R idx aop I] a [A F]. Arguments big_imset [R idx aop I J h A]. Arguments partition_big_imset [R idx aop I J]. Section Fun2Set1. Variables aT1 aT2 rT : finType. Variables (f : aT1 -> aT2 -> rT). Lemma imset2_set1l x1 (D2 : pred aT2) : f @2: ([set x1], D2) = f x1 @: D2. Proof. (* Goal: @eq (@set_of rT (Phant (Finite.sort rT))) (@Imset.imset2 aT1 aT2 rT f (@mem (Finite.sort aT1) (predPredType (Finite.sort aT1)) (@SetDef.pred_of_set aT1 (@set1 aT1 x1))) (fun _ : Finite.sort aT1 => @mem (Finite.sort aT2) (predPredType (Finite.sort aT2)) D2)) (@Imset.imset aT2 rT (f x1) (@mem (Finite.sort aT2) (predPredType (Finite.sort aT2)) D2)) *) apply/setP=> y; apply/imset2P/imsetP=> [[x x2 /set1P->]| [x2 Dx2 ->]]. (* Goal: @imset2_spec aT1 aT2 rT f (@mem (Finite.sort aT1) (predPredType (Finite.sort aT1)) (@SetDef.pred_of_set aT1 (@set1 aT1 x1))) (fun _ : Finite.sort aT1 => @mem (Finite.sort aT2) (predPredType (Finite.sort aT2)) D2) (f x1 x2) *) (* Goal: forall (_ : is_true (@in_mem (Finite.sort aT2) x2 (@mem (Finite.sort aT2) (predPredType (Finite.sort aT2)) D2))) (_ : @eq (Finite.sort rT) y (f x1 x2)), @ex2 (Finite.sort aT2) (fun x : Finite.sort aT2 => is_true (@in_mem (Finite.sort aT2) x (@mem (Finite.sort aT2) (predPredType (Finite.sort aT2)) D2))) (fun x : Finite.sort aT2 => @eq (Finite.sort rT) y (f x1 x)) *) by exists x2. (* Goal: @imset2_spec aT1 aT2 rT f (@mem (Finite.sort aT1) (predPredType (Finite.sort aT1)) (@SetDef.pred_of_set aT1 (@set1 aT1 x1))) (fun _ : Finite.sort aT1 => @mem (Finite.sort aT2) (predPredType (Finite.sort aT2)) D2) (f x1 x2) *) by exists x1 x2; rewrite ?set11. Qed. Lemma imset2_set1r x2 (D1 : pred aT1) : f @2: (D1, [set x2]) = f^~ x2 @: D1. Proof. (* Goal: @eq (@set_of rT (Phant (Finite.sort rT))) (@Imset.imset2 aT1 aT2 rT f (@mem (Finite.sort aT1) (predPredType (Finite.sort aT1)) D1) (fun _ : Finite.sort aT1 => @mem (Finite.sort aT2) (predPredType (Finite.sort aT2)) (@SetDef.pred_of_set aT2 (@set1 aT2 x2)))) (@Imset.imset aT1 rT (fun x : Finite.sort aT1 => f x x2) (@mem (Finite.sort aT1) (predPredType (Finite.sort aT1)) D1)) *) apply/setP=> y; apply/imset2P/imsetP=> [[x1 x Dx1 /set1P->]| [x1 Dx1 ->]]. (* Goal: @imset2_spec aT1 aT2 rT f (@mem (Finite.sort aT1) (predPredType (Finite.sort aT1)) D1) (fun _ : Finite.sort aT1 => @mem (Finite.sort aT2) (predPredType (Finite.sort aT2)) (@SetDef.pred_of_set aT2 (@set1 aT2 x2))) (f x1 x2) *) (* Goal: forall _ : @eq (Finite.sort rT) y (f x1 x2), @ex2 (Finite.sort aT1) (fun x : Finite.sort aT1 => is_true (@in_mem (Finite.sort aT1) x (@mem (Finite.sort aT1) (predPredType (Finite.sort aT1)) D1))) (fun x : Finite.sort aT1 => @eq (Finite.sort rT) y (f x x2)) *) by exists x1. (* Goal: @imset2_spec aT1 aT2 rT f (@mem (Finite.sort aT1) (predPredType (Finite.sort aT1)) D1) (fun _ : Finite.sort aT1 => @mem (Finite.sort aT2) (predPredType (Finite.sort aT2)) (@SetDef.pred_of_set aT2 (@set1 aT2 x2))) (f x1 x2) *) by exists x1 x2; rewrite ?set11. Qed. End Fun2Set1. Section CardFunImage. Variables aT aT2 rT : finType. Variables (f : aT -> rT) (g : rT -> aT) (f2 : aT -> aT2 -> rT). Variables (D : pred aT) (D2 : pred aT). Lemma imset_card : #|f @: D| = #|image f D|. Proof. (* Goal: @eq nat (@card rT (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@Imset.imset aT rT f (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) D))))) (@card rT (@mem (Equality.sort (Finite.eqType rT)) (seq_predType (Finite.eqType rT)) (@image_mem aT (Finite.sort rT) f (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) D)))) *) by rewrite [@imset]unlock cardsE. Qed. Lemma leq_imset_card : #|f @: D| <= #|D|. Proof. (* Goal: is_true (leq (@card rT (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@Imset.imset aT rT f (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) D))))) (@card aT (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) D))) *) by rewrite imset_card leq_image_card. Qed. Lemma card_in_imset : {in D &, injective f} -> #|f @: D| = #|D|. Proof. (* Goal: forall _ : @prop_in2 (Finite.sort aT) (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) D) (fun x1 x2 : Finite.sort aT => forall _ : @eq (Finite.sort rT) (f x1) (f x2), @eq (Finite.sort aT) x1 x2) (inPhantom (@injective (Finite.sort rT) (Finite.sort aT) f)), @eq nat (@card rT (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@Imset.imset aT rT f (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) D))))) (@card aT (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) D)) *) by move=> injf; rewrite imset_card card_in_image. Qed. Lemma card_imset : injective f -> #|f @: D| = #|D|. Proof. (* Goal: forall _ : @injective (Finite.sort rT) (Finite.sort aT) f, @eq nat (@card rT (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@Imset.imset aT rT f (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) D))))) (@card aT (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) D)) *) by move=> injf; rewrite imset_card card_image. Qed. Lemma imset_injP : reflect {in D &, injective f} (#|f @: D| == #|D|). Proof. (* Goal: Bool.reflect (@prop_in2 (Finite.sort aT) (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) D) (fun x1 x2 : Finite.sort aT => forall _ : @eq (Finite.sort rT) (f x1) (f x2), @eq (Finite.sort aT) x1 x2) (inPhantom (@injective (Finite.sort rT) (Finite.sort aT) f))) (@eq_op nat_eqType (@card rT (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@Imset.imset aT rT f (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) D))))) (@card aT (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) D))) *) by rewrite [@imset]unlock cardsE; apply: image_injP. Qed. Lemma can2_in_imset_pre : {in D, cancel f g} -> {on D, cancel g & f} -> f @: D = g @^-1: D. Proof. (* Goal: forall (_ : @prop_in1 (Finite.sort aT) (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) D) (fun x : Finite.sort aT => @eq (Finite.sort aT) (g (f x)) x) (inPhantom (@cancel (Finite.sort rT) (Finite.sort aT) f g))) (_ : @prop_on1 (Finite.sort rT) (Finite.sort aT) (forall _ : forall _ : Finite.sort aT, Finite.sort rT, Prop) (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) D) g (@cancel (Finite.sort aT) (Finite.sort rT)) (fun x : Finite.sort rT => @eq (Finite.sort rT) (f (g x)) x) (Phantom (forall _ : forall _ : Finite.sort aT, Finite.sort rT, Prop) (@cancel (Finite.sort aT) (Finite.sort rT) g)) (@onPhantom (forall _ : Finite.sort aT, Finite.sort rT) (@cancel (Finite.sort aT) (Finite.sort rT) g) f)), @eq (@set_of rT (Phant (Finite.sort rT))) (@Imset.imset aT rT f (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) D)) (@preimset rT (Finite.sort aT) g (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) D)) *) move=> fK gK; apply/setP=> y; rewrite inE. (* Goal: @eq bool (@in_mem (Finite.sort rT) y (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@Imset.imset aT rT f (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) D))))) (@in_mem (Finite.sort aT) (g y) (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) D)) *) by apply/imsetP/idP=> [[x Ax ->] | Agy]; last exists (g y); rewrite ?(fK, gK). Qed. Lemma can2_imset_pre : cancel f g -> cancel g f -> f @: D = g @^-1: D. Proof. (* Goal: forall (_ : @cancel (Finite.sort rT) (Finite.sort aT) f g) (_ : @cancel (Finite.sort aT) (Finite.sort rT) g f), @eq (@set_of rT (Phant (Finite.sort rT))) (@Imset.imset aT rT f (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) D)) (@preimset rT (Finite.sort aT) g (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) D)) *) by move=> fK gK; apply: can2_in_imset_pre; apply: in1W. Qed. End CardFunImage. Arguments imset_injP {aT rT f D}. Lemma on_card_preimset (aT rT : finType) (f : aT -> rT) (R : pred rT) : {on R, bijective f} -> #|f @^-1: R| = #|R|. Proof. (* Goal: forall _ : @bijective_on (Finite.sort aT) (Finite.sort rT) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) R) f, @eq nat (@card aT (@mem (Finite.sort aT) (predPredType (Finite.sort aT)) (@SetDef.pred_of_set aT (@preimset aT (Finite.sort rT) f (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) R))))) (@card rT (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) R)) *) case=> g fK gK; rewrite -(can2_in_imset_pre gK) // card_in_imset //. (* Goal: @prop_in2 (Finite.sort rT) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) R) (fun x1 x2 : Finite.sort rT => forall _ : @eq (Finite.sort aT) (g x1) (g x2), @eq (Finite.sort rT) x1 x2) (inPhantom (@injective (Finite.sort aT) (Finite.sort rT) g)) *) exact: can_in_inj gK. Qed. Lemma can_imset_pre (T : finType) f g (A : {set T}) : cancel f g -> f @: A = g @^-1: A :> {set T}. Proof. (* Goal: forall _ : @cancel (Finite.sort T) (Finite.sort T) f g, @eq (@set_of T (Phant (Finite.sort T))) (@Imset.imset T T f (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A))) (@preimset T (Finite.sort T) g (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A))) *) move=> fK; apply: can2_imset_pre => // x. (* Goal: @eq (Finite.sort T) (f (g x)) x *) suffices fx: x \in codom f by rewrite -(f_iinv fx) fK. (* Goal: is_true (@in_mem (Finite.sort T) x (@mem (Equality.sort (Finite.eqType T)) (seq_predType (Finite.eqType T)) (@codom T (Finite.sort T) f))) *) exact/(subset_cardP (card_codom (can_inj fK)))/subsetP. Qed. Lemma imset_id (T : finType) (A : {set T}) : [set x | x in A] = A. Proof. (* Goal: @eq (@set_of T (Phant (Finite.sort T))) (@Imset.imset T T (fun x : Finite.sort T => x) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A))) A *) by apply/setP=> x; rewrite (@can_imset_pre _ _ id) ?inE. Qed. Lemma card_preimset (T : finType) (f : T -> T) (A : {set T}) : injective f -> #|f @^-1: A| = #|A|. Lemma card_powerset (T : finType) (A : {set T}) : #|powerset A| = 2 ^ #|A|. 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) (@powerset T A)))) (expn (S (S O)) (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)))) *) rewrite -card_bool -(card_pffun_on false) -(card_imset _ val_inj). (* Goal: @eq nat (@card (finfun_of_finType T bool_finType) (@mem (Finite.sort (finfun_of_finType T bool_finType)) (predPredType (Finite.sort (finfun_of_finType T bool_finType))) (@SetDef.pred_of_set (finfun_of_finType T bool_finType) (@Imset.imset (@subFinType_finType (Finite.choiceType (finfun_of_finType T bool_finType)) (fun _ : @finfun_of T bool (Phant (pred (Finite.sort T))) => true) (set_of_subFinType T)) (finfun_of_finType T bool_finType) (@val (Finite.sort (finfun_of_finType T bool_finType)) (fun _ : @finfun_of T bool (Phant (pred (Finite.sort T))) => true) (@subFin_sort (Finite.choiceType (finfun_of_finType T bool_finType)) (fun _ : @finfun_of T bool (Phant (pred (Finite.sort T))) => true) (set_of_subFinType T))) (@mem (Finite.sort (@subFinType_finType (Finite.choiceType (finfun_of_finType T bool_finType)) (fun _ : @finfun_of T bool (Phant (pred (Finite.sort T))) => true) (set_of_subFinType T))) (predPredType (Finite.sort (@subFinType_finType (Finite.choiceType (finfun_of_finType T bool_finType)) (fun _ : @finfun_of T bool (Phant (pred (Finite.sort T))) => true) (set_of_subFinType T)))) (@SetDef.pred_of_set (set_of_finType T) (@powerset T A))))))) (@card (finfun_of_finType T bool_finType) (@mem (@finfun_of T (Equality.sort (Finite.eqType bool_finType)) (Phant (forall _ : Finite.sort T, Equality.sort (Finite.eqType bool_finType)))) (simplPredType (@finfun_of T (Equality.sort (Finite.eqType bool_finType)) (Phant (forall _ : Finite.sort T, Equality.sort (Finite.eqType bool_finType))))) (@pffun_on_mem T (Finite.eqType bool_finType) false (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort bool_finType) (predPredType (Finite.sort bool_finType)) (@sort_of_simpl_pred bool (pred_of_argType bool)))))) *) apply: eq_card => f; pose sf := false.-support f; pose D := finset sf. (* Goal: @eq bool (@in_mem (Finite.sort (finfun_of_finType T bool_finType)) f (@mem (Finite.sort (finfun_of_finType T bool_finType)) (predPredType (Finite.sort (finfun_of_finType T bool_finType))) (@SetDef.pred_of_set (finfun_of_finType T bool_finType) (@Imset.imset (@subFinType_finType (Finite.choiceType (finfun_of_finType T bool_finType)) (fun _ : @finfun_of T bool (Phant (pred (Finite.sort T))) => true) (set_of_subFinType T)) (finfun_of_finType T bool_finType) (@val (Finite.sort (finfun_of_finType T bool_finType)) (fun _ : @finfun_of T bool (Phant (pred (Finite.sort T))) => true) (@subFin_sort (Finite.choiceType (finfun_of_finType T bool_finType)) (fun _ : @finfun_of T bool (Phant (pred (Finite.sort T))) => true) (set_of_subFinType T))) (@mem (Finite.sort (@subFinType_finType (Finite.choiceType (finfun_of_finType T bool_finType)) (fun _ : @finfun_of T bool (Phant (pred (Finite.sort T))) => true) (set_of_subFinType T))) (predPredType (Finite.sort (@subFinType_finType (Finite.choiceType (finfun_of_finType T bool_finType)) (fun _ : @finfun_of T bool (Phant (pred (Finite.sort T))) => true) (set_of_subFinType T)))) (@SetDef.pred_of_set (set_of_finType T) (@powerset T A))))))) (@in_mem (Finite.sort (finfun_of_finType T bool_finType)) f (@mem (Finite.sort (finfun_of_finType T bool_finType)) (predPredType (Finite.sort (finfun_of_finType T bool_finType))) (@pred_of_simpl (@finfun_of T (Equality.sort (Finite.eqType bool_finType)) (Phant (forall _ : Finite.sort T, Equality.sort (Finite.eqType bool_finType)))) (@pffun_on_mem T (Finite.eqType bool_finType) false (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort bool_finType) (predPredType (Finite.sort bool_finType)) (@sort_of_simpl_pred bool (pred_of_argType bool))))))) *) have sDA: (D \subset A) = (sf \subset A) by apply: eq_subset; apply: in_set. (* Goal: @eq bool (@in_mem (Finite.sort (finfun_of_finType T bool_finType)) f (@mem (Finite.sort (finfun_of_finType T bool_finType)) (predPredType (Finite.sort (finfun_of_finType T bool_finType))) (@SetDef.pred_of_set (finfun_of_finType T bool_finType) (@Imset.imset (@subFinType_finType (Finite.choiceType (finfun_of_finType T bool_finType)) (fun _ : @finfun_of T bool (Phant (pred (Finite.sort T))) => true) (set_of_subFinType T)) (finfun_of_finType T bool_finType) (@val (Finite.sort (finfun_of_finType T bool_finType)) (fun _ : @finfun_of T bool (Phant (pred (Finite.sort T))) => true) (@subFin_sort (Finite.choiceType (finfun_of_finType T bool_finType)) (fun _ : @finfun_of T bool (Phant (pred (Finite.sort T))) => true) (set_of_subFinType T))) (@mem (Finite.sort (@subFinType_finType (Finite.choiceType (finfun_of_finType T bool_finType)) (fun _ : @finfun_of T bool (Phant (pred (Finite.sort T))) => true) (set_of_subFinType T))) (predPredType (Finite.sort (@subFinType_finType (Finite.choiceType (finfun_of_finType T bool_finType)) (fun _ : @finfun_of T bool (Phant (pred (Finite.sort T))) => true) (set_of_subFinType T)))) (@SetDef.pred_of_set (set_of_finType T) (@powerset T A))))))) (@in_mem (Finite.sort (finfun_of_finType T bool_finType)) f (@mem (Finite.sort (finfun_of_finType T bool_finType)) (predPredType (Finite.sort (finfun_of_finType T bool_finType))) (@pred_of_simpl (@finfun_of T (Equality.sort (Finite.eqType bool_finType)) (Phant (forall _ : Finite.sort T, Equality.sort (Finite.eqType bool_finType)))) (@pffun_on_mem T (Finite.eqType bool_finType) false (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort bool_finType) (predPredType (Finite.sort bool_finType)) (@sort_of_simpl_pred bool (pred_of_argType bool))))))) *) have eq_sf x : sf x = f x by rewrite /= negb_eqb addbF. (* Goal: @eq bool (@in_mem (Finite.sort (finfun_of_finType T bool_finType)) f (@mem (Finite.sort (finfun_of_finType T bool_finType)) (predPredType (Finite.sort (finfun_of_finType T bool_finType))) (@SetDef.pred_of_set (finfun_of_finType T bool_finType) (@Imset.imset (@subFinType_finType (Finite.choiceType (finfun_of_finType T bool_finType)) (fun _ : @finfun_of T bool (Phant (pred (Finite.sort T))) => true) (set_of_subFinType T)) (finfun_of_finType T bool_finType) (@val (Finite.sort (finfun_of_finType T bool_finType)) (fun _ : @finfun_of T bool (Phant (pred (Finite.sort T))) => true) (@subFin_sort (Finite.choiceType (finfun_of_finType T bool_finType)) (fun _ : @finfun_of T bool (Phant (pred (Finite.sort T))) => true) (set_of_subFinType T))) (@mem (Finite.sort (@subFinType_finType (Finite.choiceType (finfun_of_finType T bool_finType)) (fun _ : @finfun_of T bool (Phant (pred (Finite.sort T))) => true) (set_of_subFinType T))) (predPredType (Finite.sort (@subFinType_finType (Finite.choiceType (finfun_of_finType T bool_finType)) (fun _ : @finfun_of T bool (Phant (pred (Finite.sort T))) => true) (set_of_subFinType T)))) (@SetDef.pred_of_set (set_of_finType T) (@powerset T A))))))) (@in_mem (Finite.sort (finfun_of_finType T bool_finType)) f (@mem (Finite.sort (finfun_of_finType T bool_finType)) (predPredType (Finite.sort (finfun_of_finType T bool_finType))) (@pred_of_simpl (@finfun_of T (Equality.sort (Finite.eqType bool_finType)) (Phant (forall _ : Finite.sort T, Equality.sort (Finite.eqType bool_finType)))) (@pffun_on_mem T (Finite.eqType bool_finType) false (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort bool_finType) (predPredType (Finite.sort bool_finType)) (@sort_of_simpl_pred bool (pred_of_argType bool))))))) *) have valD: val D = f by rewrite /D unlock; apply/ffunP=> x; rewrite ffunE eq_sf. (* Goal: @eq bool (@in_mem (Finite.sort (finfun_of_finType T bool_finType)) f (@mem (Finite.sort (finfun_of_finType T bool_finType)) (predPredType (Finite.sort (finfun_of_finType T bool_finType))) (@SetDef.pred_of_set (finfun_of_finType T bool_finType) (@Imset.imset (@subFinType_finType (Finite.choiceType (finfun_of_finType T bool_finType)) (fun _ : @finfun_of T bool (Phant (pred (Finite.sort T))) => true) (set_of_subFinType T)) (finfun_of_finType T bool_finType) (@val (Finite.sort (finfun_of_finType T bool_finType)) (fun _ : @finfun_of T bool (Phant (pred (Finite.sort T))) => true) (@subFin_sort (Finite.choiceType (finfun_of_finType T bool_finType)) (fun _ : @finfun_of T bool (Phant (pred (Finite.sort T))) => true) (set_of_subFinType T))) (@mem (Finite.sort (@subFinType_finType (Finite.choiceType (finfun_of_finType T bool_finType)) (fun _ : @finfun_of T bool (Phant (pred (Finite.sort T))) => true) (set_of_subFinType T))) (predPredType (Finite.sort (@subFinType_finType (Finite.choiceType (finfun_of_finType T bool_finType)) (fun _ : @finfun_of T bool (Phant (pred (Finite.sort T))) => true) (set_of_subFinType T)))) (@SetDef.pred_of_set (set_of_finType T) (@powerset T A))))))) (@in_mem (Finite.sort (finfun_of_finType T bool_finType)) f (@mem (Finite.sort (finfun_of_finType T bool_finType)) (predPredType (Finite.sort (finfun_of_finType T bool_finType))) (@pred_of_simpl (@finfun_of T (Equality.sort (Finite.eqType bool_finType)) (Phant (forall _ : Finite.sort T, Equality.sort (Finite.eqType bool_finType)))) (@pffun_on_mem T (Finite.eqType bool_finType) false (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort bool_finType) (predPredType (Finite.sort bool_finType)) (@sort_of_simpl_pred bool (pred_of_argType bool))))))) *) apply/imsetP/pffun_onP=> [[B] | [sBA _]]; last by exists D; rewrite // inE ?sDA. (* Goal: forall (_ : is_true (@in_mem (Finite.sort (@subFinType_finType (Finite.choiceType (finfun_of_finType T bool_finType)) (fun _ : @finfun_of T bool (Phant (pred (Finite.sort T))) => true) (set_of_subFinType T))) B (@mem (Finite.sort (@subFinType_finType (Finite.choiceType (finfun_of_finType T bool_finType)) (fun _ : @finfun_of T bool (Phant (pred (Finite.sort T))) => true) (set_of_subFinType T))) (predPredType (Finite.sort (@subFinType_finType (Finite.choiceType (finfun_of_finType T bool_finType)) (fun _ : @finfun_of T bool (Phant (pred (Finite.sort T))) => true) (set_of_subFinType T)))) (@SetDef.pred_of_set (set_of_finType T) (@powerset T A))))) (_ : @eq (Finite.sort (finfun_of_finType T bool_finType)) f (@val (Finite.sort (finfun_of_finType T bool_finType)) (fun _ : @finfun_of T bool (Phant (pred (Finite.sort T))) => true) (@subFin_sort (Finite.choiceType (finfun_of_finType T bool_finType)) (fun _ : @finfun_of T bool (Phant (pred (Finite.sort T))) => true) (set_of_subFinType T)) B)), and (is_true (@subset T (@mem (Finite.sort T) (simplPredType (Finite.sort T)) (@support_for (Finite.sort T) (Finite.eqType bool_finType) false (@FunFinfun.fun_of_fin T (Equality.sort (Finite.eqType bool_finType)) f))) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)))) (@sub_mem (Equality.sort (Finite.eqType bool_finType)) (@mem (Equality.sort (Finite.eqType bool_finType)) (seq_predType (Finite.eqType bool_finType)) (@image_mem T (Equality.sort (Finite.eqType bool_finType)) (@FunFinfun.fun_of_fin T (Equality.sort (Finite.eqType bool_finType)) f) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)))) (@mem (Equality.sort (Finite.eqType bool_finType)) (predPredType (Equality.sort (Finite.eqType bool_finType))) (@sort_of_simpl_pred bool (pred_of_argType bool)))) *) by rewrite inE -sDA -valD => sBA /val_inj->. Qed. Section FunImageComp. Variables T T' U : finType. Lemma imset_comp (f : T' -> U) (g : T -> T') (H : pred T) : (f \o g) @: H = f @: (g @: H). End FunImageComp. Notation "\bigcup_ ( i <- r | P ) F" := (\big[@setU _/set0]_(i <- r | P) F%SET) : set_scope. Notation "\bigcup_ ( i <- r ) F" := (\big[@setU _/set0]_(i <- r) F%SET) : set_scope. Notation "\bigcup_ ( m <= i < n | P ) F" := (\big[@setU _/set0]_(m <= i < n | P%B) F%SET) : set_scope. Notation "\bigcup_ ( m <= i < n ) F" := (\big[@setU _/set0]_(m <= i < n) F%SET) : set_scope. Notation "\bigcup_ ( i | P ) F" := (\big[@setU _/set0]_(i | P%B) F%SET) : set_scope. Notation "\bigcup_ i F" := (\big[@setU _/set0]_i F%SET) : set_scope. Notation "\bigcup_ ( i : t | P ) F" := (\big[@setU _/set0]_(i : t | P%B) F%SET) (only parsing): set_scope. Notation "\bigcup_ ( i : t ) F" := (\big[@setU _/set0]_(i : t) F%SET) (only parsing) : set_scope. Notation "\bigcup_ ( i < n | P ) F" := (\big[@setU _/set0]_(i < n | P%B) F%SET) : set_scope. Notation "\bigcup_ ( i < n ) F" := (\big[@setU _/set0]_ (i < n) F%SET) : set_scope. Notation "\bigcup_ ( i 'in' A | P ) F" := (\big[@setU _/set0]_(i in A | P%B) F%SET) : set_scope. Notation "\bigcup_ ( i 'in' A ) F" := (\big[@setU _/set0]_(i in A) F%SET) : set_scope. Notation "\bigcap_ ( i <- r | P ) F" := (\big[@setI _/setT]_(i <- r | P%B) F%SET) : set_scope. Notation "\bigcap_ ( i <- r ) F" := (\big[@setI _/setT]_(i <- r) F%SET) : set_scope. Notation "\bigcap_ ( m <= i < n | P ) F" := (\big[@setI _/setT]_(m <= i < n | P%B) F%SET) : set_scope. Notation "\bigcap_ ( m <= i < n ) F" := (\big[@setI _/setT]_(m <= i < n) F%SET) : set_scope. Notation "\bigcap_ ( i | P ) F" := (\big[@setI _/setT]_(i | P%B) F%SET) : set_scope. Notation "\bigcap_ i F" := (\big[@setI _/setT]_i F%SET) : set_scope. Notation "\bigcap_ ( i : t | P ) F" := (\big[@setI _/setT]_(i : t | P%B) F%SET) (only parsing): set_scope. Notation "\bigcap_ ( i : t ) F" := (\big[@setI _/setT]_(i : t) F%SET) (only parsing) : set_scope. Notation "\bigcap_ ( i < n | P ) F" := (\big[@setI _/setT]_(i < n | P%B) F%SET) : set_scope. Notation "\bigcap_ ( i < n ) F" := (\big[@setI _/setT]_(i < n) F%SET) : set_scope. Notation "\bigcap_ ( i 'in' A | P ) F" := (\big[@setI _/setT]_(i in A | P%B) F%SET) : set_scope. Notation "\bigcap_ ( i 'in' A ) F" := (\big[@setI _/setT]_(i in A) F%SET) : set_scope. Section BigSetOps. Variables T I : finType. Implicit Types (U : pred T) (P : pred I) (A B : {set I}) (F : I -> {set T}). Lemma bigcup_sup j P F : P j -> F j \subset \bigcup_(i | P i) F i. Proof. (* Goal: forall _ : is_true (P j), is_true (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (F j))) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@BigOp.bigop (@set_of T (Phant (Finite.sort T))) (Finite.sort I) (@set0 T) (index_enum I) (fun i : Finite.sort I => @BigBody (@set_of T (Phant (Finite.sort T))) (Finite.sort I) i (@setU T) (P i) (F i)))))) *) by move=> Pj; rewrite (bigD1 j) //= subsetUl. Qed. Lemma bigcup_max j U P F : P j -> U \subset F j -> U \subset \bigcup_(i | P i) F i. Proof. (* Goal: forall (_ : is_true (P j)) (_ : is_true (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) U) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (F j))))), is_true (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) U) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@BigOp.bigop (@set_of T (Phant (Finite.sort T))) (Finite.sort I) (@set0 T) (index_enum I) (fun i : Finite.sort I => @BigBody (@set_of T (Phant (Finite.sort T))) (Finite.sort I) i (@setU T) (P i) (F i)))))) *) by move=> Pj sUF; apply: subset_trans (bigcup_sup _ Pj). Qed. Lemma bigcupP x P F : reflect (exists2 i, P i & x \in F i) (x \in \bigcup_(i | P i) F i). Lemma bigcupsP U P F : reflect (forall i, P i -> F i \subset U) (\bigcup_(i | P i) F i \subset U). Proof. (* Goal: Bool.reflect (forall (i : Finite.sort I) (_ : is_true (P i)), is_true (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (F i))) (@mem (Finite.sort T) (predPredType (Finite.sort T)) U))) (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@BigOp.bigop (@set_of T (Phant (Finite.sort T))) (Finite.sort I) (@set0 T) (index_enum I) (fun i : Finite.sort I => @BigBody (@set_of T (Phant (Finite.sort T))) (Finite.sort I) i (@setU T) (P i) (F i))))) (@mem (Finite.sort T) (predPredType (Finite.sort T)) U)) *) apply: (iffP idP) => [sFU i Pi| sFU]. (* Goal: is_true (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@BigOp.bigop (@set_of T (Phant (Finite.sort T))) (Finite.sort I) (@set0 T) (index_enum I) (fun i : Finite.sort I => @BigBody (@set_of T (Phant (Finite.sort T))) (Finite.sort I) i (@setU T) (P i) (F i))))) (@mem (Finite.sort T) (predPredType (Finite.sort T)) U)) *) (* Goal: is_true (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (F i))) (@mem (Finite.sort T) (predPredType (Finite.sort T)) U)) *) by apply: subset_trans sFU; apply: bigcup_sup. (* Goal: is_true (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@BigOp.bigop (@set_of T (Phant (Finite.sort T))) (Finite.sort I) (@set0 T) (index_enum I) (fun i : Finite.sort I => @BigBody (@set_of T (Phant (Finite.sort T))) (Finite.sort I) i (@setU T) (P i) (F i))))) (@mem (Finite.sort T) (predPredType (Finite.sort T)) U)) *) by apply/subsetP=> x /bigcupP[i Pi]; apply: (subsetP (sFU i Pi)). Qed. Lemma bigcup_disjoint U P F : (forall i, P i -> [disjoint U & F i]) -> [disjoint U & \bigcup_(i | P i) F i]. Proof. (* Goal: forall _ : forall (i : Finite.sort I) (_ : is_true (P i)), is_true (@disjoint T (@mem (Finite.sort T) (predPredType (Finite.sort T)) U) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (F i)))), is_true (@disjoint T (@mem (Finite.sort T) (predPredType (Finite.sort T)) U) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@BigOp.bigop (@set_of T (Phant (Finite.sort T))) (Finite.sort I) (@set0 T) (index_enum I) (fun i : Finite.sort I => @BigBody (@set_of T (Phant (Finite.sort T))) (Finite.sort I) i (@setU T) (P i) (F i)))))) *) move=> dUF; rewrite disjoint_sym disjoint_subset. (* Goal: is_true (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@BigOp.bigop (@set_of T (Phant (Finite.sort T))) (Finite.sort I) (@set0 T) (index_enum I) (fun i : Finite.sort I => @BigBody (@set_of T (Phant (Finite.sort T))) (Finite.sort I) i (@setU T) (P i) (F i))))) (@mem (Finite.sort T) (simplPredType (Finite.sort T)) (@predC (Finite.sort T) (@pred_of_simpl (Finite.sort T) (@pred_of_mem_pred (Finite.sort T) (@mem (Finite.sort T) (predPredType (Finite.sort T)) U)))))) *) by apply/bigcupsP=> i /dUF; rewrite disjoint_sym disjoint_subset. Qed. Lemma bigcup_setU A B F : \bigcup_(i in A :|: B) F i = (\bigcup_(i in A) F i) :|: (\bigcup_ (i in B) F i). Lemma bigcup_seq r F : \bigcup_(i <- r) F i = \bigcup_(i in r) F i. Lemma bigcap_inf j P F : P j -> \bigcap_(i | P i) F i \subset F j. Proof. (* Goal: forall _ : is_true (P j), is_true (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@BigOp.bigop (@set_of T (Phant (Finite.sort T))) (Finite.sort I) (@setTfor T (Phant (Finite.sort T))) (index_enum I) (fun i : Finite.sort I => @BigBody (@set_of T (Phant (Finite.sort T))) (Finite.sort I) i (@setI T) (P i) (F i))))) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (F j)))) *) by move=> Pj; rewrite (bigD1 j) //= subsetIl. Qed. Lemma bigcap_min j U P F : P j -> F j \subset U -> \bigcap_(i | P i) F i \subset U. Proof. (* Goal: forall (_ : is_true (P j)) (_ : is_true (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (F j))) (@mem (Finite.sort T) (predPredType (Finite.sort T)) U))), is_true (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@BigOp.bigop (@set_of T (Phant (Finite.sort T))) (Finite.sort I) (@setTfor T (Phant (Finite.sort T))) (index_enum I) (fun i : Finite.sort I => @BigBody (@set_of T (Phant (Finite.sort T))) (Finite.sort I) i (@setI T) (P i) (F i))))) (@mem (Finite.sort T) (predPredType (Finite.sort T)) U)) *) by move=> Pj; apply: subset_trans (bigcap_inf _ Pj). Qed. Lemma bigcapsP U P F : reflect (forall i, P i -> U \subset F i) (U \subset \bigcap_(i | P i) F i). Proof. (* Goal: Bool.reflect (forall (i : Finite.sort I) (_ : is_true (P i)), is_true (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) U) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (F i))))) (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) U) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@BigOp.bigop (@set_of T (Phant (Finite.sort T))) (Finite.sort I) (@setTfor T (Phant (Finite.sort T))) (index_enum I) (fun i : Finite.sort I => @BigBody (@set_of T (Phant (Finite.sort T))) (Finite.sort I) i (@setI T) (P i) (F i)))))) *) apply: (iffP idP) => [sUF i Pi | sUF]. (* Goal: is_true (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) U) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@BigOp.bigop (@set_of T (Phant (Finite.sort T))) (Finite.sort I) (@setTfor T (Phant (Finite.sort T))) (index_enum I) (fun i : Finite.sort I => @BigBody (@set_of T (Phant (Finite.sort T))) (Finite.sort I) i (@setI T) (P i) (F i)))))) *) (* Goal: is_true (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) U) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (F i)))) *) by apply: subset_trans sUF _; apply: bigcap_inf. (* Goal: is_true (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) U) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@BigOp.bigop (@set_of T (Phant (Finite.sort T))) (Finite.sort I) (@setTfor T (Phant (Finite.sort T))) (index_enum I) (fun i : Finite.sort I => @BigBody (@set_of T (Phant (Finite.sort T))) (Finite.sort I) i (@setI T) (P i) (F i)))))) *) elim/big_rec: _ => [|i V Pi sUV]; apply/subsetP=> x Ux; rewrite inE //. (* Goal: is_true (andb (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (F i)))) (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T V)))) *) by rewrite !(subsetP _ x Ux) ?sUF. Qed. Lemma bigcapP x P F : reflect (forall i, P i -> x \in F i) (x \in \bigcap_(i | P i) F i). Proof. (* Goal: Bool.reflect (forall (i : Finite.sort I) (_ : is_true (P i)), is_true (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (F i))))) (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@BigOp.bigop (@set_of T (Phant (Finite.sort T))) (Finite.sort I) (@setTfor T (Phant (Finite.sort T))) (index_enum I) (fun i : Finite.sort I => @BigBody (@set_of T (Phant (Finite.sort T))) (Finite.sort I) i (@setI T) (P i) (F i)))))) *) rewrite -sub1set. (* Goal: Bool.reflect (forall (i : Finite.sort I) (_ : is_true (P i)), is_true (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (F i))))) (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@set1 T x))) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@BigOp.bigop (@set_of T (Phant (Finite.sort T))) (Finite.sort I) (@setTfor T (Phant (Finite.sort T))) (index_enum I) (fun i : Finite.sort I => @BigBody (@set_of T (Phant (Finite.sort T))) (Finite.sort I) i (@setI T) (P i) (F i)))))) *) by apply: (iffP (bigcapsP _ _ _)) => Fx i /Fx; rewrite sub1set. Qed. Lemma setC_bigcup J r (P : pred J) (F : J -> {set T}) : ~: (\bigcup_(j <- r | P j) F j) = \bigcap_(j <- r | P j) ~: F j. Proof. (* Goal: @eq (@set_of T (Phant (Finite.sort T))) (@setC T (@BigOp.bigop (@set_of T (Phant (Finite.sort T))) J (@set0 T) r (fun j : J => @BigBody (@set_of T (Phant (Finite.sort T))) J j (@setU T) (P j) (F j)))) (@BigOp.bigop (@set_of T (Phant (Finite.sort T))) J (@setTfor T (Phant (Finite.sort T))) r (fun j : J => @BigBody (@set_of T (Phant (Finite.sort T))) J j (@setI T) (P j) (@setC T (F j)))) *) by apply: big_morph => [A B|]; rewrite ?setC0 ?setCU. Qed. Lemma setC_bigcap J r (P : pred J) (F : J -> {set T}) : ~: (\bigcap_(j <- r | P j) F j) = \bigcup_(j <- r | P j) ~: F j. Proof. (* Goal: @eq (@set_of T (Phant (Finite.sort T))) (@setC T (@BigOp.bigop (@set_of T (Phant (Finite.sort T))) J (@setTfor T (Phant (Finite.sort T))) r (fun j : J => @BigBody (@set_of T (Phant (Finite.sort T))) J j (@setI T) (P j) (F j)))) (@BigOp.bigop (@set_of T (Phant (Finite.sort T))) J (@set0 T) r (fun j : J => @BigBody (@set_of T (Phant (Finite.sort T))) J j (@setU T) (P j) (@setC T (F j)))) *) by apply: big_morph => [A B|]; rewrite ?setCT ?setCI. Qed. Lemma bigcap_setU A B F : (\bigcap_(i in A :|: B) F i) = (\bigcap_(i in A) F i) :&: (\bigcap_(i in B) F i). Proof. (* Goal: @eq (@set_of T (Phant (Finite.sort T))) (@BigOp.bigop (@set_of T (Phant (Finite.sort T))) (Finite.sort I) (@setTfor T (Phant (Finite.sort T))) (index_enum I) (fun i : Finite.sort I => @BigBody (@set_of T (Phant (Finite.sort T))) (Finite.sort I) i (@setI T) (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@SetDef.pred_of_set I (@setU I A B)))) (F i))) (@setI T (@BigOp.bigop (@set_of T (Phant (Finite.sort T))) (Finite.sort I) (@setTfor T (Phant (Finite.sort T))) (index_enum I) (fun i : Finite.sort I => @BigBody (@set_of T (Phant (Finite.sort T))) (Finite.sort I) i (@setI T) (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@SetDef.pred_of_set I A))) (F i))) (@BigOp.bigop (@set_of T (Phant (Finite.sort T))) (Finite.sort I) (@setTfor T (Phant (Finite.sort T))) (index_enum I) (fun i : Finite.sort I => @BigBody (@set_of T (Phant (Finite.sort T))) (Finite.sort I) i (@setI T) (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@SetDef.pred_of_set I B))) (F i)))) *) by apply: setC_inj; rewrite setCI !setC_bigcap bigcup_setU. Qed. Lemma bigcap_seq r F : \bigcap_(i <- r) F i = \bigcap_(i in r) F i. Proof. (* Goal: @eq (@set_of T (Phant (Finite.sort T))) (@BigOp.bigop (@set_of T (Phant (Finite.sort T))) (Finite.sort I) (@setTfor T (Phant (Finite.sort T))) r (fun i : Finite.sort I => @BigBody (@set_of T (Phant (Finite.sort T))) (Finite.sort I) i (@setI T) true (F i))) (@BigOp.bigop (@set_of T (Phant (Finite.sort T))) (Finite.sort I) (@setTfor T (Phant (Finite.sort T))) (index_enum I) (fun i : Finite.sort I => @BigBody (@set_of T (Phant (Finite.sort T))) (Finite.sort I) i (@setI T) (@in_mem (Finite.sort I) i (@mem (Equality.sort (Finite.eqType I)) (seq_predType (Finite.eqType I)) r)) (F i))) *) by apply: setC_inj; rewrite !setC_bigcap bigcup_seq. Qed. End BigSetOps. Arguments bigcup_sup [T I] j [P F]. Arguments bigcup_max [T I] j [U P F]. Arguments bigcupP {T I x P F}. Arguments bigcupsP {T I U P F}. Arguments bigcap_inf [T I] j [P F]. Arguments bigcap_min [T I] j [U P F]. Arguments bigcapP {T I x P F}. Arguments bigcapsP {T I U P F}. Section ImsetCurry. Variables (aT1 aT2 rT : finType) (f : aT1 -> aT2 -> rT). Section Curry. Variables (A1 : {set aT1}) (A2 : {set aT2}). Variables (D1 : pred aT1) (D2 : pred aT2). Lemma curry_imset2X : f @2: (A1, A2) = prod_curry f @: (setX A1 A2). Lemma curry_imset2l : f @2: (D1, D2) = \bigcup_(x1 in D1) f x1 @: D2. Proof. (* Goal: @eq (@set_of rT (Phant (Finite.sort rT))) (@Imset.imset2 aT1 aT2 rT f (@mem (Finite.sort aT1) (predPredType (Finite.sort aT1)) D1) (fun _ : Finite.sort aT1 => @mem (Finite.sort aT2) (predPredType (Finite.sort aT2)) D2)) (@BigOp.bigop (@set_of rT (Phant (Finite.sort rT))) (Finite.sort aT1) (@set0 rT) (index_enum aT1) (fun x1 : Finite.sort aT1 => @BigBody (@set_of rT (Phant (Finite.sort rT))) (Finite.sort aT1) x1 (@setU rT) (@in_mem (Finite.sort aT1) x1 (@mem (Finite.sort aT1) (predPredType (Finite.sort aT1)) D1)) (@Imset.imset aT2 rT (f x1) (@mem (Finite.sort aT2) (predPredType (Finite.sort aT2)) D2)))) *) apply/setP=> y; apply/imset2P/bigcupP => [[x1 x2 Dx1 Dx2 ->{y}] | [x1 Dx1]]. (* Goal: forall _ : is_true (@in_mem (Finite.sort rT) y (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@Imset.imset aT2 rT (f x1) (@mem (Finite.sort aT2) (predPredType (Finite.sort aT2)) D2))))), @imset2_spec aT1 aT2 rT f (@mem (Finite.sort aT1) (predPredType (Finite.sort aT1)) D1) (fun _ : Finite.sort aT1 => @mem (Finite.sort aT2) (predPredType (Finite.sort aT2)) D2) y *) (* Goal: @ex2 (Finite.sort aT1) (fun i : Finite.sort aT1 => is_true (@in_mem (Finite.sort aT1) i (@mem (Finite.sort aT1) (predPredType (Finite.sort aT1)) D1))) (fun i : Finite.sort aT1 => is_true (@in_mem (Finite.sort rT) (f x1 x2) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@Imset.imset aT2 rT (f i) (@mem (Finite.sort aT2) (predPredType (Finite.sort aT2)) D2)))))) *) by exists x1; rewrite // mem_imset. (* Goal: forall _ : is_true (@in_mem (Finite.sort rT) y (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@Imset.imset aT2 rT (f x1) (@mem (Finite.sort aT2) (predPredType (Finite.sort aT2)) D2))))), @imset2_spec aT1 aT2 rT f (@mem (Finite.sort aT1) (predPredType (Finite.sort aT1)) D1) (fun _ : Finite.sort aT1 => @mem (Finite.sort aT2) (predPredType (Finite.sort aT2)) D2) y *) by case/imsetP=> x2 Dx2 ->{y}; exists x1 x2. Qed. Lemma curry_imset2r : f @2: (D1, D2) = \bigcup_(x2 in D2) f^~ x2 @: D1. Proof. (* Goal: @eq (@set_of rT (Phant (Finite.sort rT))) (@Imset.imset2 aT1 aT2 rT f (@mem (Finite.sort aT1) (predPredType (Finite.sort aT1)) D1) (fun _ : Finite.sort aT1 => @mem (Finite.sort aT2) (predPredType (Finite.sort aT2)) D2)) (@BigOp.bigop (@set_of rT (Phant (Finite.sort rT))) (Finite.sort aT2) (@set0 rT) (index_enum aT2) (fun x2 : Finite.sort aT2 => @BigBody (@set_of rT (Phant (Finite.sort rT))) (Finite.sort aT2) x2 (@setU rT) (@in_mem (Finite.sort aT2) x2 (@mem (Finite.sort aT2) (predPredType (Finite.sort aT2)) D2)) (@Imset.imset aT1 rT (fun x : Finite.sort aT1 => f x x2) (@mem (Finite.sort aT1) (predPredType (Finite.sort aT1)) D1)))) *) apply/setP=> y; apply/imset2P/bigcupP => [[x1 x2 Dx1 Dx2 ->{y}] | [x2 Dx2]]. (* Goal: forall _ : is_true (@in_mem (Finite.sort rT) y (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@Imset.imset aT1 rT (fun x : Finite.sort aT1 => f x x2) (@mem (Finite.sort aT1) (predPredType (Finite.sort aT1)) D1))))), @imset2_spec aT1 aT2 rT f (@mem (Finite.sort aT1) (predPredType (Finite.sort aT1)) D1) (fun _ : Finite.sort aT1 => @mem (Finite.sort aT2) (predPredType (Finite.sort aT2)) D2) y *) (* Goal: @ex2 (Finite.sort aT2) (fun i : Finite.sort aT2 => is_true (@in_mem (Finite.sort aT2) i (@mem (Finite.sort aT2) (predPredType (Finite.sort aT2)) D2))) (fun i : Finite.sort aT2 => is_true (@in_mem (Finite.sort rT) (f x1 x2) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@Imset.imset aT1 rT (fun x : Finite.sort aT1 => f x i) (@mem (Finite.sort aT1) (predPredType (Finite.sort aT1)) D1)))))) *) by exists x2; rewrite // (mem_imset (f^~ x2)). (* Goal: forall _ : is_true (@in_mem (Finite.sort rT) y (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@Imset.imset aT1 rT (fun x : Finite.sort aT1 => f x x2) (@mem (Finite.sort aT1) (predPredType (Finite.sort aT1)) D1))))), @imset2_spec aT1 aT2 rT f (@mem (Finite.sort aT1) (predPredType (Finite.sort aT1)) D1) (fun _ : Finite.sort aT1 => @mem (Finite.sort aT2) (predPredType (Finite.sort aT2)) D2) y *) by case/imsetP=> x1 Dx1 ->{y}; exists x1 x2. Qed. End Curry. Lemma imset2Ul (A B : {set aT1}) (C : {set aT2}) : f @2: (A :|: B, C) = f @2: (A, C) :|: f @2: (B, C). Proof. (* Goal: @eq (@set_of rT (Phant (Finite.sort rT))) (@Imset.imset2 aT1 aT2 rT f (@mem (Finite.sort aT1) (predPredType (Finite.sort aT1)) (@SetDef.pred_of_set aT1 (@setU aT1 A B))) (fun _ : Finite.sort aT1 => @mem (Finite.sort aT2) (predPredType (Finite.sort aT2)) (@SetDef.pred_of_set aT2 C))) (@setU rT (@Imset.imset2 aT1 aT2 rT f (@mem (Finite.sort aT1) (predPredType (Finite.sort aT1)) (@SetDef.pred_of_set aT1 A)) (fun _ : Finite.sort aT1 => @mem (Finite.sort aT2) (predPredType (Finite.sort aT2)) (@SetDef.pred_of_set aT2 C))) (@Imset.imset2 aT1 aT2 rT f (@mem (Finite.sort aT1) (predPredType (Finite.sort aT1)) (@SetDef.pred_of_set aT1 B)) (fun _ : Finite.sort aT1 => @mem (Finite.sort aT2) (predPredType (Finite.sort aT2)) (@SetDef.pred_of_set aT2 C)))) *) by rewrite !curry_imset2l bigcup_setU. Qed. Lemma imset2Ur (A : {set aT1}) (B C : {set aT2}) : f @2: (A, B :|: C) = f @2: (A, B) :|: f @2: (A, C). Proof. (* Goal: @eq (@set_of rT (Phant (Finite.sort rT))) (@Imset.imset2 aT1 aT2 rT f (@mem (Finite.sort aT1) (predPredType (Finite.sort aT1)) (@SetDef.pred_of_set aT1 A)) (fun _ : Finite.sort aT1 => @mem (Finite.sort aT2) (predPredType (Finite.sort aT2)) (@SetDef.pred_of_set aT2 (@setU aT2 B C)))) (@setU rT (@Imset.imset2 aT1 aT2 rT f (@mem (Finite.sort aT1) (predPredType (Finite.sort aT1)) (@SetDef.pred_of_set aT1 A)) (fun _ : Finite.sort aT1 => @mem (Finite.sort aT2) (predPredType (Finite.sort aT2)) (@SetDef.pred_of_set aT2 B))) (@Imset.imset2 aT1 aT2 rT f (@mem (Finite.sort aT1) (predPredType (Finite.sort aT1)) (@SetDef.pred_of_set aT1 A)) (fun _ : Finite.sort aT1 => @mem (Finite.sort aT2) (predPredType (Finite.sort aT2)) (@SetDef.pred_of_set aT2 C)))) *) by rewrite !curry_imset2r bigcup_setU. Qed. End ImsetCurry. Section Partitions. Variables T I : finType. Implicit Types (x y z : T) (A B D X : {set T}) (P Q : {set {set T}}). Implicit Types (J : pred I) (F : I -> {set T}). Definition cover P := \bigcup_(B in P) B. Definition pblock P x := odflt set0 (pick [pred B in P | x \in B]). Definition trivIset P := \sum_(B in P) #|B| == #|cover P|. Definition partition P D := [&& cover P == D, trivIset P & set0 \notin P]. Definition is_transversal X P D := [&& partition P D, X \subset D & [forall B in P, #|X :&: B| == 1]]. Definition transversal P D := [set odflt x [pick y in pblock P x] | x in D]. Definition transversal_repr x0 X B := odflt x0 [pick x in X :&: B]. Lemma leq_card_setU A B : #|A :|: B| <= #|A| + #|B| ?= iff [disjoint A & B]. Proof. (* Goal: leqif (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setU T A B)))) (addn (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A))) (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)))) (@disjoint T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B))) *) rewrite -(addn0 #|_|) -setI_eq0 -cards_eq0 -cardsUI eq_sym. (* Goal: leqif (addn (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setU T A B)))) O) (addn (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setU T A B)))) (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setI T A B))))) (@eq_op nat_eqType O (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setI T A B))))) *) by rewrite (mono_leqif (leq_add2l _)). Qed. Lemma leq_card_cover P : #|cover P| <= \sum_(A in P) #|A| ?= iff trivIset P. Proof. (* Goal: leqif (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (cover P)))) (@BigOp.bigop nat (Finite.sort (set_of_finType T)) O (index_enum (set_of_finType T)) (fun A : Finite.sort (set_of_finType T) => @BigBody nat (Finite.sort (set_of_finType T)) A addn (@in_mem (Finite.sort (set_of_finType T)) A (@mem (Finite.sort (set_of_finType T)) (predPredType (Finite.sort (set_of_finType T))) (@SetDef.pred_of_set (set_of_finType T) P))) (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A))))) (trivIset P) *) split; last exact: eq_sym. (* Goal: is_true (leq (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (cover P)))) (@BigOp.bigop nat (Finite.sort (set_of_finType T)) O (index_enum (set_of_finType T)) (fun A : Finite.sort (set_of_finType T) => @BigBody nat (Finite.sort (set_of_finType T)) A addn (@in_mem (Finite.sort (set_of_finType T)) A (@mem (Finite.sort (set_of_finType T)) (predPredType (Finite.sort (set_of_finType T))) (@SetDef.pred_of_set (set_of_finType T) P))) (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)))))) *) rewrite /cover; elim/big_rec2: _ => [|A n U _ leUn]; first by rewrite cards0. (* Goal: is_true (leq (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setU T A U)))) (addn (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A))) n)) *) by rewrite (leq_trans (leq_card_setU A U).1) ?leq_add2l. Qed. Lemma trivIsetP P : reflect {in P &, forall A B, A != B -> [disjoint A & B]} (trivIset P). Proof. (* Goal: Bool.reflect (@prop_in2 (Finite.sort (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) P)) (fun A B : @set_of T (Phant (Finite.sort T)) => forall _ : is_true (negb (@eq_op (set_of_eqType T) A B)), is_true (@disjoint T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)))) (inPhantom (forall (A B : @set_of T (Phant (Finite.sort T))) (_ : is_true (negb (@eq_op (set_of_eqType T) A B))), is_true (@disjoint T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)))))) (trivIset P) *) have->: P = [set x in enum (mem P)] by apply/setP=> x; rewrite inE mem_enum. (* Goal: Bool.reflect (@prop_in2 (Finite.sort (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 x : Finite.sort (set_of_finType T) => @in_mem (Finite.sort (set_of_finType T)) x (@mem (Equality.sort (Finite.eqType (set_of_finType T))) (seq_predType (Finite.eqType (set_of_finType T))) (@enum_mem (set_of_finType T) (@mem (Finite.sort (set_of_finType T)) (memPredType (Finite.sort (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) P))))))))) (fun A B : @set_of T (Phant (Finite.sort T)) => forall _ : is_true (negb (@eq_op (set_of_eqType T) A B)), is_true (@disjoint T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)))) (inPhantom (forall (A B : @set_of T (Phant (Finite.sort T))) (_ : is_true (negb (@eq_op (set_of_eqType T) A B))), is_true (@disjoint T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)))))) (trivIset (@SetDef.finset (set_of_finType T) (fun x : Finite.sort (set_of_finType T) => @in_mem (Finite.sort (set_of_finType T)) x (@mem (Equality.sort (Finite.eqType (set_of_finType T))) (seq_predType (Finite.eqType (set_of_finType T))) (@enum_mem (set_of_finType T) (@mem (Finite.sort (set_of_finType T)) (memPredType (Finite.sort (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) P)))))))) *) elim: {P}(enum _) (enum_uniq (mem P)) => [_ | A e IHe] /=. (* Goal: forall _ : is_true (andb (negb (@in_mem (@set_of T (Phant (Finite.sort T))) A (@mem (@set_of T (Phant (Finite.sort T))) (seq_predType (Finite.eqType (set_of_finType T))) e))) (@uniq (Finite.eqType (set_of_finType T)) e)), Bool.reflect (@prop_in2 (@set_of T (Phant (Finite.sort T))) (@mem (@set_of T (Phant (Finite.sort T))) (predPredType (@set_of T (Phant (Finite.sort T)))) (@SetDef.pred_of_set (set_of_finType T) (@SetDef.finset (set_of_finType T) (fun x : @set_of T (Phant (Finite.sort T)) => @in_mem (@set_of T (Phant (Finite.sort T))) x (@mem (@set_of T (Phant (Finite.sort T))) (seq_predType (Finite.eqType (set_of_finType T))) (@cons (@set_of T (Phant (Finite.sort T))) A e)))))) (fun A B : @set_of T (Phant (Finite.sort T)) => forall _ : is_true (negb (@eq_op (set_of_eqType T) A B)), is_true (@disjoint T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)))) (inPhantom (forall (A B : @set_of T (Phant (Finite.sort T))) (_ : is_true (negb (@eq_op (set_of_eqType T) A B))), is_true (@disjoint T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)))))) (trivIset (@SetDef.finset (set_of_finType T) (fun x : @set_of T (Phant (Finite.sort T)) => @in_mem (@set_of T (Phant (Finite.sort T))) x (@mem (@set_of T (Phant (Finite.sort T))) (seq_predType (Finite.eqType (set_of_finType T))) (@cons (@set_of T (Phant (Finite.sort T))) A e))))) *) (* Goal: Bool.reflect (@prop_in2 (@set_of T (Phant (Finite.sort T))) (@mem (@set_of T (Phant (Finite.sort T))) (predPredType (@set_of T (Phant (Finite.sort T)))) (@SetDef.pred_of_set (set_of_finType T) (@SetDef.finset (set_of_finType T) (fun x : @set_of T (Phant (Finite.sort T)) => @in_mem (@set_of T (Phant (Finite.sort T))) x (@mem (@set_of T (Phant (Finite.sort T))) (seq_predType (Finite.eqType (set_of_finType T))) (@nil (@set_of T (Phant (Finite.sort T))))))))) (fun A B : @set_of T (Phant (Finite.sort T)) => forall _ : is_true (negb (@eq_op (set_of_eqType T) A B)), is_true (@disjoint T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)))) (inPhantom (forall (A B : @set_of T (Phant (Finite.sort T))) (_ : is_true (negb (@eq_op (set_of_eqType T) A B))), is_true (@disjoint T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)))))) (trivIset (@SetDef.finset (set_of_finType T) (fun x : @set_of T (Phant (Finite.sort T)) => @in_mem (@set_of T (Phant (Finite.sort T))) x (@mem (@set_of T (Phant (Finite.sort T))) (seq_predType (Finite.eqType (set_of_finType T))) (@nil (@set_of T (Phant (Finite.sort T)))))))) *) by rewrite /trivIset /cover !big_set0 cards0; left=> A; rewrite inE. (* Goal: forall _ : is_true (andb (negb (@in_mem (@set_of T (Phant (Finite.sort T))) A (@mem (@set_of T (Phant (Finite.sort T))) (seq_predType (Finite.eqType (set_of_finType T))) e))) (@uniq (Finite.eqType (set_of_finType T)) e)), Bool.reflect (@prop_in2 (@set_of T (Phant (Finite.sort T))) (@mem (@set_of T (Phant (Finite.sort T))) (predPredType (@set_of T (Phant (Finite.sort T)))) (@SetDef.pred_of_set (set_of_finType T) (@SetDef.finset (set_of_finType T) (fun x : @set_of T (Phant (Finite.sort T)) => @in_mem (@set_of T (Phant (Finite.sort T))) x (@mem (@set_of T (Phant (Finite.sort T))) (seq_predType (Finite.eqType (set_of_finType T))) (@cons (@set_of T (Phant (Finite.sort T))) A e)))))) (fun A B : @set_of T (Phant (Finite.sort T)) => forall _ : is_true (negb (@eq_op (set_of_eqType T) A B)), is_true (@disjoint T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)))) (inPhantom (forall (A B : @set_of T (Phant (Finite.sort T))) (_ : is_true (negb (@eq_op (set_of_eqType T) A B))), is_true (@disjoint T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)))))) (trivIset (@SetDef.finset (set_of_finType T) (fun x : @set_of T (Phant (Finite.sort T)) => @in_mem (@set_of T (Phant (Finite.sort T))) x (@mem (@set_of T (Phant (Finite.sort T))) (seq_predType (Finite.eqType (set_of_finType T))) (@cons (@set_of T (Phant (Finite.sort T))) A e))))) *) case/andP; rewrite set_cons -(in_set (fun B => B \in e)) => PA {IHe}/IHe. (* Goal: forall _ : Bool.reflect (@prop_in2 (Finite.sort (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 x : Finite.sort (set_of_finType T) => @in_mem (Finite.sort (set_of_finType T)) x (@mem (Equality.sort (Finite.eqType (set_of_finType T))) (seq_predType (Finite.eqType (set_of_finType T))) e))))) (fun A B : @set_of T (Phant (Finite.sort T)) => forall _ : is_true (negb (@eq_op (set_of_eqType T) A B)), is_true (@disjoint T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)))) (inPhantom (forall (A B : @set_of T (Phant (Finite.sort T))) (_ : is_true (negb (@eq_op (set_of_eqType T) A B))), is_true (@disjoint T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)))))) (trivIset (@SetDef.finset (set_of_finType T) (fun x : Finite.sort (set_of_finType T) => @in_mem (Finite.sort (set_of_finType T)) x (@mem (Equality.sort (Finite.eqType (set_of_finType T))) (seq_predType (Finite.eqType (set_of_finType T))) e)))), Bool.reflect (@prop_in2 (@set_of T (Phant (Finite.sort T))) (@mem (@set_of T (Phant (Finite.sort T))) (predPredType (@set_of T (Phant (Finite.sort T)))) (@SetDef.pred_of_set (set_of_finType T) (@setU (set_of_finType T) (@set1 (set_of_finType T) A) (@SetDef.finset (set_of_finType T) (fun x : Finite.sort (set_of_finType T) => @in_mem (Finite.sort (set_of_finType T)) x (@mem (Equality.sort (Finite.eqType (set_of_finType T))) (seq_predType (Finite.eqType (set_of_finType T))) e)))))) (fun A B : @set_of T (Phant (Finite.sort T)) => forall _ : is_true (negb (@eq_op (set_of_eqType T) A B)), is_true (@disjoint T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)))) (inPhantom (forall (A B : @set_of T (Phant (Finite.sort T))) (_ : is_true (negb (@eq_op (set_of_eqType T) A B))), is_true (@disjoint T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)))))) (trivIset (@setU (set_of_finType T) (@set1 (set_of_finType T) A) (@SetDef.finset (set_of_finType T) (fun x : Finite.sort (set_of_finType T) => @in_mem (Finite.sort (set_of_finType T)) x (@mem (Equality.sort (Finite.eqType (set_of_finType T))) (seq_predType (Finite.eqType (set_of_finType T))) e))))) *) move: {e}[set x in e] PA => P PA IHP. (* Goal: Bool.reflect (@prop_in2 (@set_of T (Phant (Finite.sort T))) (@mem (@set_of T (Phant (Finite.sort T))) (predPredType (@set_of T (Phant (Finite.sort T)))) (@SetDef.pred_of_set (set_of_finType T) (@setU (set_of_finType T) (@set1 (set_of_finType T) A) P))) (fun A B : @set_of T (Phant (Finite.sort T)) => forall _ : is_true (negb (@eq_op (set_of_eqType T) A B)), is_true (@disjoint T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)))) (inPhantom (forall (A B : @set_of T (Phant (Finite.sort T))) (_ : is_true (negb (@eq_op (set_of_eqType T) A B))), is_true (@disjoint T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)))))) (trivIset (@setU (set_of_finType T) (@set1 (set_of_finType T) A) P)) *) rewrite /trivIset /cover !big_setU1 //= eq_sym. (* Goal: Bool.reflect (@prop_in2 (@set_of T (Phant (Finite.sort T))) (@mem (@set_of T (Phant (Finite.sort T))) (predPredType (@set_of T (Phant (Finite.sort T)))) (@SetDef.pred_of_set (set_of_finType T) (@setU (set_of_finType T) (@set1 (set_of_finType T) A) P))) (fun A B : @set_of T (Phant (Finite.sort T)) => forall _ : is_true (negb (@eq_op (set_of_eqType T) A B)), is_true (@disjoint T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)))) (inPhantom (forall (A B : @set_of T (Phant (Finite.sort T))) (_ : is_true (negb (@eq_op (set_of_eqType T) A B))), is_true (@disjoint T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)))))) (@eq_op nat_eqType (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setU T A (@BigOp.bigop (@set_of T (Phant (Finite.sort T))) (@set_of T (Phant (Finite.sort T))) (@set0 T) (index_enum (set_of_finType T)) (fun i : @set_of T (Phant (Finite.sort T)) => @BigBody (@set_of T (Phant (Finite.sort T))) (@set_of T (Phant (Finite.sort T))) i (@setU T) (@in_mem (@set_of T (Phant (Finite.sort T))) i (@mem (@set_of T (Phant (Finite.sort T))) (predPredType (@set_of T (Phant (Finite.sort T)))) (@SetDef.pred_of_set (set_of_finType T) P))) i)))))) (addn (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A))) (@BigOp.bigop nat (@set_of T (Phant (Finite.sort T))) O (index_enum (set_of_finType T)) (fun i : @set_of T (Phant (Finite.sort T)) => @BigBody nat (@set_of T (Phant (Finite.sort T))) i addn (@in_mem (@set_of T (Phant (Finite.sort T))) i (@mem (@set_of T (Phant (Finite.sort T))) (predPredType (@set_of T (Phant (Finite.sort T)))) (@SetDef.pred_of_set (set_of_finType T) P))) (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T i))))))) *) have:= leq_card_cover P; rewrite -(mono_leqif (leq_add2l #|A|)). (* Goal: forall _ : leqif (addn (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A))) (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (cover P))))) (addn (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A))) (@BigOp.bigop nat (Finite.sort (set_of_finType T)) O (index_enum (set_of_finType T)) (fun A : Finite.sort (set_of_finType T) => @BigBody nat (Finite.sort (set_of_finType T)) A addn (@in_mem (Finite.sort (set_of_finType T)) A (@mem (Finite.sort (set_of_finType T)) (predPredType (Finite.sort (set_of_finType T))) (@SetDef.pred_of_set (set_of_finType T) P))) (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)))))) (trivIset P), Bool.reflect (@prop_in2 (@set_of T (Phant (Finite.sort T))) (@mem (@set_of T (Phant (Finite.sort T))) (predPredType (@set_of T (Phant (Finite.sort T)))) (@SetDef.pred_of_set (set_of_finType T) (@setU (set_of_finType T) (@set1 (set_of_finType T) A) P))) (fun A B : @set_of T (Phant (Finite.sort T)) => forall _ : is_true (negb (@eq_op (set_of_eqType T) A B)), is_true (@disjoint T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)))) (inPhantom (forall (A B : @set_of T (Phant (Finite.sort T))) (_ : is_true (negb (@eq_op (set_of_eqType T) A B))), is_true (@disjoint T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)))))) (@eq_op nat_eqType (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setU T A (@BigOp.bigop (@set_of T (Phant (Finite.sort T))) (@set_of T (Phant (Finite.sort T))) (@set0 T) (index_enum (set_of_finType T)) (fun i : @set_of T (Phant (Finite.sort T)) => @BigBody (@set_of T (Phant (Finite.sort T))) (@set_of T (Phant (Finite.sort T))) i (@setU T) (@in_mem (@set_of T (Phant (Finite.sort T))) i (@mem (@set_of T (Phant (Finite.sort T))) (predPredType (@set_of T (Phant (Finite.sort T)))) (@SetDef.pred_of_set (set_of_finType T) P))) i)))))) (addn (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A))) (@BigOp.bigop nat (@set_of T (Phant (Finite.sort T))) O (index_enum (set_of_finType T)) (fun i : @set_of T (Phant (Finite.sort T)) => @BigBody nat (@set_of T (Phant (Finite.sort T))) i addn (@in_mem (@set_of T (Phant (Finite.sort T))) i (@mem (@set_of T (Phant (Finite.sort T))) (predPredType (@set_of T (Phant (Finite.sort T)))) (@SetDef.pred_of_set (set_of_finType T) P))) (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T i))))))) *) move/(leqif_trans (leq_card_setU _ _))->; rewrite disjoints_subset setC_bigcup. (* Goal: Bool.reflect (@prop_in2 (@set_of T (Phant (Finite.sort T))) (@mem (@set_of T (Phant (Finite.sort T))) (predPredType (@set_of T (Phant (Finite.sort T)))) (@SetDef.pred_of_set (set_of_finType T) (@setU (set_of_finType T) (@set1 (set_of_finType T) A) P))) (fun A B : @set_of T (Phant (Finite.sort T)) => forall _ : is_true (negb (@eq_op (set_of_eqType T) A B)), is_true (@disjoint T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)))) (inPhantom (forall (A B : @set_of T (Phant (Finite.sort T))) (_ : is_true (negb (@eq_op (set_of_eqType T) A B))), is_true (@disjoint T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)))))) (andb (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@BigOp.bigop (@set_of T (Phant (Finite.sort T))) (Finite.sort (set_of_finType T)) (@setTfor T (Phant (Finite.sort T))) (index_enum (set_of_finType T)) (fun j : Finite.sort (set_of_finType T) => @BigBody (@set_of T (Phant (Finite.sort T))) (Finite.sort (set_of_finType T)) j (@setI T) (@in_mem (Finite.sort (set_of_finType T)) j (@mem (Finite.sort (set_of_finType T)) (predPredType (Finite.sort (set_of_finType T))) (@SetDef.pred_of_set (set_of_finType T) P))) (@setC T j)))))) (trivIset P)) *) case: bigcapsP => [disjA | meetA]; last first. (* Goal: Bool.reflect (@prop_in2 (@set_of T (Phant (Finite.sort T))) (@mem (@set_of T (Phant (Finite.sort T))) (predPredType (@set_of T (Phant (Finite.sort T)))) (@SetDef.pred_of_set (set_of_finType T) (@setU (set_of_finType T) (@set1 (set_of_finType T) A) P))) (fun A B : @set_of T (Phant (Finite.sort T)) => forall _ : is_true (negb (@eq_op (set_of_eqType T) A B)), is_true (@disjoint T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)))) (inPhantom (forall (A B : @set_of T (Phant (Finite.sort T))) (_ : is_true (negb (@eq_op (set_of_eqType T) A B))), is_true (@disjoint T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)))))) (andb true (trivIset P)) *) (* Goal: Bool.reflect (@prop_in2 (@set_of T (Phant (Finite.sort T))) (@mem (@set_of T (Phant (Finite.sort T))) (predPredType (@set_of T (Phant (Finite.sort T)))) (@SetDef.pred_of_set (set_of_finType T) (@setU (set_of_finType T) (@set1 (set_of_finType T) A) P))) (fun A B : @set_of T (Phant (Finite.sort T)) => forall _ : is_true (negb (@eq_op (set_of_eqType T) A B)), is_true (@disjoint T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)))) (inPhantom (forall (A B : @set_of T (Phant (Finite.sort T))) (_ : is_true (negb (@eq_op (set_of_eqType T) A B))), is_true (@disjoint T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)))))) (andb false (trivIset P)) *) right=> [tI]; case: meetA => B PB; rewrite -disjoints_subset. (* Goal: Bool.reflect (@prop_in2 (@set_of T (Phant (Finite.sort T))) (@mem (@set_of T (Phant (Finite.sort T))) (predPredType (@set_of T (Phant (Finite.sort T)))) (@SetDef.pred_of_set (set_of_finType T) (@setU (set_of_finType T) (@set1 (set_of_finType T) A) P))) (fun A B : @set_of T (Phant (Finite.sort T)) => forall _ : is_true (negb (@eq_op (set_of_eqType T) A B)), is_true (@disjoint T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)))) (inPhantom (forall (A B : @set_of T (Phant (Finite.sort T))) (_ : is_true (negb (@eq_op (set_of_eqType T) A B))), is_true (@disjoint T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)))))) (andb true (trivIset P)) *) (* Goal: is_true (@disjoint T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B))) *) by rewrite tI ?setU11 ?setU1r //; apply: contraNneq PA => ->. (* Goal: Bool.reflect (@prop_in2 (@set_of T (Phant (Finite.sort T))) (@mem (@set_of T (Phant (Finite.sort T))) (predPredType (@set_of T (Phant (Finite.sort T)))) (@SetDef.pred_of_set (set_of_finType T) (@setU (set_of_finType T) (@set1 (set_of_finType T) A) P))) (fun A B : @set_of T (Phant (Finite.sort T)) => forall _ : is_true (negb (@eq_op (set_of_eqType T) A B)), is_true (@disjoint T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)))) (inPhantom (forall (A B : @set_of T (Phant (Finite.sort T))) (_ : is_true (negb (@eq_op (set_of_eqType T) A B))), is_true (@disjoint T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)))))) (andb true (trivIset P)) *) apply: (iffP IHP) => [] tI B C PB PC; last by apply: tI; apply: setU1r. (* Goal: forall _ : is_true (negb (@eq_op (set_of_eqType T) B C)), is_true (@disjoint T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T C))) *) by case/setU1P: PC PB => [->|PC] /setU1P[->|PB]; try by [apply: tI | case/eqP]; first rewrite disjoint_sym; rewrite disjoints_subset disjA. Qed. Lemma trivIsetS P Q : P \subset Q -> trivIset Q -> trivIset P. Proof. (* Goal: forall (_ : is_true (@subset (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) P)) (@mem (Finite.sort (set_of_finType T)) (predPredType (Finite.sort (set_of_finType T))) (@SetDef.pred_of_set (set_of_finType T) Q)))) (_ : is_true (trivIset Q)), is_true (trivIset P) *) by move/subsetP/sub_in2=> sPQ /trivIsetP/sPQ/trivIsetP. Qed. Lemma trivIsetI P D : trivIset P -> trivIset (P ::&: D). Proof. (* Goal: forall _ : is_true (trivIset P), is_true (trivIset (@ssetI T P D)) *) by apply: trivIsetS; rewrite -setI_powerset subsetIl. Qed. Lemma cover_setI P D : cover (P ::&: D) \subset cover P :&: D. Proof. (* Goal: is_true (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (cover (@ssetI T P D)))) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setI T (cover P) D)))) *) by apply/bigcupsP=> A /setIdP[PA sAD]; rewrite subsetI sAD andbT (bigcup_max A). Qed. Lemma mem_pblock P x : (x \in pblock P x) = (x \in cover P). Lemma pblock_mem P x : x \in cover P -> pblock P x \in P. Proof. (* Goal: forall _ : is_true (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (cover P)))), is_true (@in_mem (@set_of T (Phant (Finite.sort T))) (pblock P x) (@mem (Finite.sort (set_of_finType T)) (predPredType (Finite.sort (set_of_finType T))) (@SetDef.pred_of_set (set_of_finType T) P))) *) by rewrite -mem_pblock /pblock; case: pickP => [A /andP[]| _] //=; rewrite inE. Qed. Lemma def_pblock P B x : trivIset P -> B \in P -> x \in B -> pblock P x = B. Lemma same_pblock P x y : trivIset P -> x \in pblock P y -> pblock P x = pblock P y. Proof. (* Goal: forall (_ : is_true (trivIset P)) (_ : is_true (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (pblock P y))))), @eq (@set_of T (Phant (Finite.sort T))) (pblock P x) (pblock P y) *) rewrite {1 3}/pblock => tI; case: pickP => [A|]; last by rewrite inE. (* Goal: forall (_ : is_true (@pred_of_simpl (Finite.sort (set_of_finType T)) (@SimplPred (Finite.sort (set_of_finType T)) (fun B : Finite.sort (set_of_finType T) => andb (@in_mem (Finite.sort (set_of_finType T)) B (@mem (Finite.sort (set_of_finType T)) (predPredType (Finite.sort (set_of_finType T))) (@SetDef.pred_of_set (set_of_finType T) P))) (@in_mem (Finite.sort T) y (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B))))) A)) (_ : is_true (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@Option.default (@set_of T (Phant (Finite.sort T))) (@set0 T) (@Some (Finite.sort (set_of_finType T)) A)))))), @eq (@set_of T (Phant (Finite.sort T))) (pblock P x) (@Option.default (@set_of T (Phant (Finite.sort T))) (@set0 T) (@Some (Finite.sort (set_of_finType T)) A)) *) by case/andP=> PA _{y} /= Ax; apply: def_pblock. Qed. Lemma eq_pblock P x y : trivIset P -> x \in cover P -> (pblock P x == pblock P y) = (y \in pblock P x). Proof. (* Goal: forall (_ : is_true (trivIset P)) (_ : is_true (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (cover P))))), @eq bool (@eq_op (set_of_eqType T) (pblock P x) (pblock P y)) (@in_mem (Finite.sort T) y (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (pblock P x)))) *) move=> tiP Px; apply/eqP/idP=> [eq_xy | /same_pblock-> //]. (* Goal: is_true (@in_mem (Finite.sort T) y (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (pblock P x)))) *) move: Px; rewrite -mem_pblock eq_xy /pblock. (* Goal: forall _ : is_true (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@Option.default (@set_of T (Phant (Finite.sort T))) (@set0 T) (@pick (set_of_finType T) (@pred_of_simpl (Finite.sort (set_of_finType T)) (@SimplPred (Finite.sort (set_of_finType T)) (fun B : Finite.sort (set_of_finType T) => andb (@in_mem (Finite.sort (set_of_finType T)) B (@mem (Finite.sort (set_of_finType T)) (predPredType (Finite.sort (set_of_finType T))) (@SetDef.pred_of_set (set_of_finType T) P))) (@in_mem (Finite.sort T) y (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B))))))))))), is_true (@in_mem (Finite.sort T) y (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@Option.default (@set_of T (Phant (Finite.sort T))) (@set0 T) (@pick (set_of_finType T) (@pred_of_simpl (Finite.sort (set_of_finType T)) (@SimplPred (Finite.sort (set_of_finType T)) (fun B : Finite.sort (set_of_finType T) => andb (@in_mem (Finite.sort (set_of_finType T)) B (@mem (Finite.sort (set_of_finType T)) (predPredType (Finite.sort (set_of_finType T))) (@SetDef.pred_of_set (set_of_finType T) P))) (@in_mem (Finite.sort T) y (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B))))))))))) *) by case: pickP => [B /andP[] // | _]; rewrite inE. Qed. Lemma trivIsetU1 A P : {in P, forall B, [disjoint A & B]} -> trivIset P -> set0 \notin P -> trivIset (A |: P) /\ A \notin P. Proof. (* Goal: forall (_ : @prop_in1 (Finite.sort (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) P)) (fun B : @set_of T (Phant (Finite.sort T)) => is_true (@disjoint T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)))) (inPhantom (forall B : @set_of T (Phant (Finite.sort T)), is_true (@disjoint T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)))))) (_ : is_true (trivIset P)) (_ : is_true (negb (@in_mem (@set_of T (Phant (Finite.sort T))) (@set0 T) (@mem (Finite.sort (set_of_finType T)) (predPredType (Finite.sort (set_of_finType T))) (@SetDef.pred_of_set (set_of_finType T) P))))), and (is_true (trivIset (@setU (set_of_finType T) (@set1 (set_of_finType T) A) P))) (is_true (negb (@in_mem (@set_of T (Phant (Finite.sort T))) A (@mem (Finite.sort (set_of_finType T)) (predPredType (Finite.sort (set_of_finType T))) (@SetDef.pred_of_set (set_of_finType T) P))))) *) move=> tiAP tiP notPset0; split; last first. (* Goal: is_true (trivIset (@setU (set_of_finType T) (@set1 (set_of_finType T) A) P)) *) (* Goal: is_true (negb (@in_mem (@set_of T (Phant (Finite.sort T))) A (@mem (Finite.sort (set_of_finType T)) (predPredType (Finite.sort (set_of_finType T))) (@SetDef.pred_of_set (set_of_finType T) P)))) *) apply: contra notPset0 => P_A. (* Goal: is_true (trivIset (@setU (set_of_finType T) (@set1 (set_of_finType T) A) P)) *) (* Goal: is_true (@in_mem (@set_of T (Phant (Finite.sort T))) (@set0 T) (@mem (Finite.sort (set_of_finType T)) (predPredType (Finite.sort (set_of_finType T))) (@SetDef.pred_of_set (set_of_finType T) P))) *) by have:= tiAP A P_A; rewrite -setI_eq0 setIid => /eqP <-. (* Goal: is_true (trivIset (@setU (set_of_finType T) (@set1 (set_of_finType T) A) P)) *) apply/trivIsetP=> B1 B2 /setU1P[->|PB1] /setU1P[->|PB2]; by [apply: (trivIsetP _ tiP) | rewrite ?eqxx // ?(tiAP, disjoint_sym)]. Qed. Lemma cover_imset J F : cover (F @: J) = \bigcup_(i in J) F i. Proof. (* Goal: @eq (@set_of T (Phant (Finite.sort T))) (cover (@Imset.imset I (set_of_finType T) F (@mem (Finite.sort I) (predPredType (Finite.sort I)) J))) (@BigOp.bigop (@set_of T (Phant (Finite.sort T))) (Finite.sort I) (@set0 T) (index_enum I) (fun i : Finite.sort I => @BigBody (@set_of T (Phant (Finite.sort T))) (Finite.sort I) i (@setU T) (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) J)) (F i))) *) apply/setP=> x. (* Goal: @eq bool (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (cover (@Imset.imset I (set_of_finType T) F (@mem (Finite.sort I) (predPredType (Finite.sort I)) J)))))) (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@BigOp.bigop (@set_of T (Phant (Finite.sort T))) (Finite.sort I) (@set0 T) (index_enum I) (fun i : Finite.sort I => @BigBody (@set_of T (Phant (Finite.sort T))) (Finite.sort I) i (@setU T) (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) J)) (F i)))))) *) apply/bigcupP/bigcupP=> [[_ /imsetP[i Ji ->]] | [i]]; first by exists i. (* Goal: forall (_ : is_true (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) J))) (_ : is_true (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (F i))))), @ex2 (Finite.sort (set_of_finType T)) (fun i : Finite.sort (set_of_finType T) => is_true (@in_mem (Finite.sort (set_of_finType T)) i (@mem (Finite.sort (set_of_finType T)) (predPredType (Finite.sort (set_of_finType T))) (@SetDef.pred_of_set (set_of_finType T) (@Imset.imset I (set_of_finType T) F (@mem (Finite.sort I) (predPredType (Finite.sort I)) J)))))) (fun i : Finite.sort (set_of_finType T) => is_true (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T i)))) *) by exists (F i); first apply: mem_imset. Qed. Lemma trivIimset J F (P := F @: J) : {in J &, forall i j, j != i -> [disjoint F i & F j]} -> set0 \notin P -> trivIset P /\ {in J &, injective F}. Lemma cover_partition P D : partition P D -> cover P = D. Proof. (* Goal: forall _ : is_true (partition P D), @eq (@set_of T (Phant (Finite.sort T))) (cover P) D *) by case/and3P=> /eqP. Qed. Lemma card_partition P D : partition P D -> #|D| = \sum_(A in P) #|A|. Proof. (* Goal: forall _ : is_true (partition P D), @eq nat (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T D))) (@BigOp.bigop nat (Finite.sort (set_of_finType T)) O (index_enum (set_of_finType T)) (fun A : Finite.sort (set_of_finType T) => @BigBody nat (Finite.sort (set_of_finType T)) A addn (@in_mem (Finite.sort (set_of_finType T)) A (@mem (Finite.sort (set_of_finType T)) (predPredType (Finite.sort (set_of_finType T))) (@SetDef.pred_of_set (set_of_finType T) P))) (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A))))) *) by case/and3P=> /eqP <- /eqnP. Qed. Lemma card_uniform_partition n P D : {in P, forall A, #|A| = n} -> partition P D -> #|D| = #|P| * n. Proof. (* Goal: forall (_ : @prop_in1 (Finite.sort (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) P)) (fun A : @set_of T (Phant (Finite.sort T)) => @eq nat (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A))) n) (inPhantom (forall A : @set_of T (Phant (Finite.sort T)), @eq nat (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A))) n))) (_ : is_true (partition P D)), @eq nat (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T D))) (muln (@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) P))) n) *) by move=> uniP /card_partition->; rewrite -sum_nat_const; apply: eq_bigr. Qed. Section BigOps. Variables (R : Type) (idx : R) (op : Monoid.com_law idx). Let rhs_cond P K E := \big[op/idx]_(A in P) \big[op/idx]_(x in A | K x) E x. Let rhs P E := \big[op/idx]_(A in P) \big[op/idx]_(x in A) E x. Lemma big_trivIset_cond P (K : pred T) (E : T -> R) : trivIset P -> \big[op/idx]_(x in cover P | K x) E x = rhs_cond P K E. Lemma big_trivIset P (E : T -> R) : trivIset P -> \big[op/idx]_(x in cover P) E x = rhs P E. Proof. (* Goal: forall _ : is_true (trivIset P), @eq R (@BigOp.bigop R (Finite.sort T) idx (index_enum T) (fun x : Finite.sort T => @BigBody R (Finite.sort T) x (@Monoid.operator R idx (@Monoid.com_operator R idx op)) (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (cover P)))) (E x))) (rhs P E) *) have biginT := eq_bigl _ _ (fun _ => andbT _) => tiP. (* Goal: @eq R (@BigOp.bigop R (Finite.sort T) idx (index_enum T) (fun x : Finite.sort T => @BigBody R (Finite.sort T) x (@Monoid.operator R idx (@Monoid.com_operator R idx op)) (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (cover P)))) (E x))) (rhs P E) *) by rewrite -biginT big_trivIset_cond //; apply: eq_bigr => A _; apply: biginT. Qed. Lemma set_partition_big_cond P D (K : pred T) (E : T -> R) : partition P D -> \big[op/idx]_(x in D | K x) E x = rhs_cond P K E. Proof. (* Goal: forall _ : is_true (partition P D), @eq R (@BigOp.bigop R (Finite.sort T) idx (index_enum T) (fun x : Finite.sort T => @BigBody R (Finite.sort T) x (@Monoid.operator R idx (@Monoid.com_operator R idx op)) (andb (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T D))) (K x)) (E x))) (rhs_cond P K E) *) by case/and3P=> /eqP <- tI_P _; apply: big_trivIset_cond. Qed. Lemma set_partition_big P D (E : T -> R) : partition P D -> \big[op/idx]_(x in D) E x = rhs P E. Proof. (* Goal: forall _ : is_true (partition P D), @eq R (@BigOp.bigop R (Finite.sort T) idx (index_enum T) (fun x : Finite.sort T => @BigBody R (Finite.sort T) x (@Monoid.operator R idx (@Monoid.com_operator R idx op)) (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T D))) (E x))) (rhs P E) *) by case/and3P=> /eqP <- tI_P _; apply: big_trivIset. Qed. Lemma partition_disjoint_bigcup (F : I -> {set T}) E : (forall i j, i != j -> [disjoint F i & F j]) -> \big[op/idx]_(x in \bigcup_i F i) E x = \big[op/idx]_i \big[op/idx]_(x in F i) E x. Proof. (* Goal: forall _ : forall (i j : Equality.sort (Finite.eqType I)) (_ : is_true (negb (@eq_op (Finite.eqType I) i j))), is_true (@disjoint T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (F i))) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (F j)))), @eq R (@BigOp.bigop R (Finite.sort T) idx (index_enum T) (fun x : Finite.sort T => @BigBody R (Finite.sort T) x (@Monoid.operator R idx (@Monoid.com_operator R idx op)) (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@BigOp.bigop (@set_of T (Phant (Finite.sort T))) (Finite.sort I) (@set0 T) (index_enum I) (fun i : Finite.sort I => @BigBody (@set_of T (Phant (Finite.sort T))) (Finite.sort I) i (@setU T) true (F i)))))) (E x))) (@BigOp.bigop R (Finite.sort I) idx (index_enum I) (fun i : Finite.sort I => @BigBody R (Finite.sort I) i (@Monoid.operator R idx (@Monoid.com_operator R idx op)) true (@BigOp.bigop R (Finite.sort T) idx (index_enum T) (fun x : Finite.sort T => @BigBody R (Finite.sort T) x (@Monoid.operator R idx (@Monoid.com_operator R idx op)) (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (F i)))) (E x))))) *) move=> disjF; pose P := [set F i | i in I & F i != set0]. (* Goal: @eq R (@BigOp.bigop R (Finite.sort T) idx (index_enum T) (fun x : Finite.sort T => @BigBody R (Finite.sort T) x (@Monoid.operator R idx (@Monoid.com_operator R idx op)) (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@BigOp.bigop (@set_of T (Phant (Finite.sort T))) (Finite.sort I) (@set0 T) (index_enum I) (fun i : Finite.sort I => @BigBody (@set_of T (Phant (Finite.sort T))) (Finite.sort I) i (@setU T) true (F i)))))) (E x))) (@BigOp.bigop R (Finite.sort I) idx (index_enum I) (fun i : Finite.sort I => @BigBody R (Finite.sort I) i (@Monoid.operator R idx (@Monoid.com_operator R idx op)) true (@BigOp.bigop R (Finite.sort T) idx (index_enum T) (fun x : Finite.sort T => @BigBody R (Finite.sort T) x (@Monoid.operator R idx (@Monoid.com_operator R idx op)) (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (F i)))) (E x))))) *) have trivP: trivIset P. (* Goal: @eq R (@BigOp.bigop R (Finite.sort T) idx (index_enum T) (fun x : Finite.sort T => @BigBody R (Finite.sort T) x (@Monoid.operator R idx (@Monoid.com_operator R idx op)) (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@BigOp.bigop (@set_of T (Phant (Finite.sort T))) (Finite.sort I) (@set0 T) (index_enum I) (fun i : Finite.sort I => @BigBody (@set_of T (Phant (Finite.sort T))) (Finite.sort I) i (@setU T) true (F i)))))) (E x))) (@BigOp.bigop R (Finite.sort I) idx (index_enum I) (fun i : Finite.sort I => @BigBody R (Finite.sort I) i (@Monoid.operator R idx (@Monoid.com_operator R idx op)) true (@BigOp.bigop R (Finite.sort T) idx (index_enum T) (fun x : Finite.sort T => @BigBody R (Finite.sort T) x (@Monoid.operator R idx (@Monoid.com_operator R idx op)) (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (F i)))) (E x))))) *) (* Goal: is_true (trivIset P) *) apply/trivIsetP=> _ _ /imsetP[i _ ->] /imsetP[j _ ->] neqFij. (* Goal: @eq R (@BigOp.bigop R (Finite.sort T) idx (index_enum T) (fun x : Finite.sort T => @BigBody R (Finite.sort T) x (@Monoid.operator R idx (@Monoid.com_operator R idx op)) (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@BigOp.bigop (@set_of T (Phant (Finite.sort T))) (Finite.sort I) (@set0 T) (index_enum I) (fun i : Finite.sort I => @BigBody (@set_of T (Phant (Finite.sort T))) (Finite.sort I) i (@setU T) true (F i)))))) (E x))) (@BigOp.bigop R (Finite.sort I) idx (index_enum I) (fun i : Finite.sort I => @BigBody R (Finite.sort I) i (@Monoid.operator R idx (@Monoid.com_operator R idx op)) true (@BigOp.bigop R (Finite.sort T) idx (index_enum T) (fun x : Finite.sort T => @BigBody R (Finite.sort T) x (@Monoid.operator R idx (@Monoid.com_operator R idx op)) (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (F i)))) (E x))))) *) (* Goal: is_true (@disjoint T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (F i))) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (F j)))) *) by apply: disjF; apply: contraNneq neqFij => ->. (* Goal: @eq R (@BigOp.bigop R (Finite.sort T) idx (index_enum T) (fun x : Finite.sort T => @BigBody R (Finite.sort T) x (@Monoid.operator R idx (@Monoid.com_operator R idx op)) (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@BigOp.bigop (@set_of T (Phant (Finite.sort T))) (Finite.sort I) (@set0 T) (index_enum I) (fun i : Finite.sort I => @BigBody (@set_of T (Phant (Finite.sort T))) (Finite.sort I) i (@setU T) true (F i)))))) (E x))) (@BigOp.bigop R (Finite.sort I) idx (index_enum I) (fun i : Finite.sort I => @BigBody R (Finite.sort I) i (@Monoid.operator R idx (@Monoid.com_operator R idx op)) true (@BigOp.bigop R (Finite.sort T) idx (index_enum T) (fun x : Finite.sort T => @BigBody R (Finite.sort T) x (@Monoid.operator R idx (@Monoid.com_operator R idx op)) (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (F i)))) (E x))))) *) have ->: \bigcup_i F i = cover P. (* Goal: @eq R (@BigOp.bigop R (Finite.sort T) idx (index_enum T) (fun x : Finite.sort T => @BigBody R (Finite.sort T) x (@Monoid.operator R idx (@Monoid.com_operator R idx op)) (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (cover P)))) (E x))) (@BigOp.bigop R (Finite.sort I) idx (index_enum I) (fun i : Finite.sort I => @BigBody R (Finite.sort I) i (@Monoid.operator R idx (@Monoid.com_operator R idx op)) true (@BigOp.bigop R (Finite.sort T) idx (index_enum T) (fun x : Finite.sort T => @BigBody R (Finite.sort T) x (@Monoid.operator R idx (@Monoid.com_operator R idx op)) (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (F i)))) (E x))))) *) (* Goal: @eq (@set_of T (Phant (Finite.sort T))) (@BigOp.bigop (@set_of T (Phant (Finite.sort T))) (Finite.sort I) (@set0 T) (index_enum I) (fun i : Finite.sort I => @BigBody (@set_of T (Phant (Finite.sort T))) (Finite.sort I) i (@setU T) true (F i))) (cover P) *) apply/esym; rewrite cover_imset big_mkcond; apply: eq_bigr => i _. (* Goal: @eq R (@BigOp.bigop R (Finite.sort T) idx (index_enum T) (fun x : Finite.sort T => @BigBody R (Finite.sort T) x (@Monoid.operator R idx (@Monoid.com_operator R idx op)) (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (cover P)))) (E x))) (@BigOp.bigop R (Finite.sort I) idx (index_enum I) (fun i : Finite.sort I => @BigBody R (Finite.sort I) i (@Monoid.operator R idx (@Monoid.com_operator R idx op)) true (@BigOp.bigop R (Finite.sort T) idx (index_enum T) (fun x : Finite.sort T => @BigBody R (Finite.sort T) x (@Monoid.operator R idx (@Monoid.com_operator R idx op)) (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (F i)))) (E x))))) *) (* Goal: @eq (@set_of T (Phant (Finite.sort T))) (if @in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@SetDef.pred_of_set I (@SetDef.finset I (fun i : Finite.sort I => andb (@in_mem (Finite.sort I) i (@mem (Equality.sort (Finite.eqType I)) (predPredType (Equality.sort (Finite.eqType I))) (@sort_of_simpl_pred (Equality.sort (Finite.eqType I)) (pred_of_argType (Equality.sort (Finite.eqType I)))))) (negb (@eq_op (set_of_eqType T) (F i) (@set0 T))))))) then F i else @set0 T) (F i) *) by rewrite inE; case: eqP. (* Goal: @eq R (@BigOp.bigop R (Finite.sort T) idx (index_enum T) (fun x : Finite.sort T => @BigBody R (Finite.sort T) x (@Monoid.operator R idx (@Monoid.com_operator R idx op)) (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (cover P)))) (E x))) (@BigOp.bigop R (Finite.sort I) idx (index_enum I) (fun i : Finite.sort I => @BigBody R (Finite.sort I) i (@Monoid.operator R idx (@Monoid.com_operator R idx op)) true (@BigOp.bigop R (Finite.sort T) idx (index_enum T) (fun x : Finite.sort T => @BigBody R (Finite.sort T) x (@Monoid.operator R idx (@Monoid.com_operator R idx op)) (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (F i)))) (E x))))) *) rewrite big_trivIset // /rhs big_imset => [|i j _ /setIdP[_ notFj0] eqFij]. (* Goal: @eq (Finite.sort I) i j *) (* Goal: @eq R (@BigOp.bigop R (Finite.sort I) idx (index_enum I) (fun i : Finite.sort I => @BigBody R (Finite.sort I) i (@Monoid.operator R idx (@Monoid.com_operator R idx op)) (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@SetDef.pred_of_set I (@SetDef.finset I (fun i0 : Finite.sort I => andb (@in_mem (Finite.sort I) i0 (@mem (Equality.sort (Finite.eqType I)) (predPredType (Equality.sort (Finite.eqType I))) (@sort_of_simpl_pred (Equality.sort (Finite.eqType I)) (pred_of_argType (Equality.sort (Finite.eqType I)))))) (negb (@eq_op (set_of_eqType T) (F i0) (@set0 T)))))))) (@BigOp.bigop R (Finite.sort T) idx (index_enum T) (fun x : Finite.sort T => @BigBody R (Finite.sort T) x (@Monoid.operator R idx (@Monoid.com_operator R idx op)) (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (F i)))) (E x))))) (@BigOp.bigop R (Finite.sort I) idx (index_enum I) (fun i : Finite.sort I => @BigBody R (Finite.sort I) i (@Monoid.operator R idx (@Monoid.com_operator R idx op)) true (@BigOp.bigop R (Finite.sort T) idx (index_enum T) (fun x : Finite.sort T => @BigBody R (Finite.sort T) x (@Monoid.operator R idx (@Monoid.com_operator R idx op)) (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (F i)))) (E x))))) *) rewrite big_mkcond; apply: eq_bigr => i _; rewrite inE. (* Goal: @eq (Finite.sort I) i j *) (* Goal: @eq R (if andb (@in_mem (Finite.sort I) i (@mem (Equality.sort (Finite.eqType I)) (predPredType (Equality.sort (Finite.eqType I))) (@sort_of_simpl_pred (Equality.sort (Finite.eqType I)) (pred_of_argType (Equality.sort (Finite.eqType I)))))) (negb (@eq_op (set_of_eqType T) (F i) (@set0 T))) then @BigOp.bigop R (Finite.sort T) idx (index_enum T) (fun x : Finite.sort T => @BigBody R (Finite.sort T) x (@Monoid.operator R idx (@Monoid.com_operator R idx op)) (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (F i)))) (E x)) else idx) (@BigOp.bigop R (Finite.sort T) idx (index_enum T) (fun x : Finite.sort T => @BigBody R (Finite.sort T) x (@Monoid.operator R idx (@Monoid.com_operator R idx op)) (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (F i)))) (E x))) *) by case: eqP => //= ->; rewrite big_set0. (* Goal: @eq (Finite.sort I) i j *) by apply: contraNeq (disjF _ _) _; rewrite -setI_eq0 eqFij setIid. Qed. End BigOps. Section Equivalence. Variables (R : rel T) (D : {set T}). Let Px x := [set y in D | R x y]. Definition equivalence_partition := [set Px x | x in D]. Local Notation P := equivalence_partition. Hypothesis eqiR : {in D & &, equivalence_rel R}. Let Pxx x : x \in D -> x \in Px x. Proof. (* Goal: forall _ : is_true (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T D))), is_true (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (Px x)))) *) by move=> Dx; rewrite !inE Dx (eqiR Dx Dx). Qed. Let PPx x : x \in D -> Px x \in P := fun Dx => mem_imset _ Dx. Lemma equivalence_partitionP : partition P D. Lemma pblock_equivalence_partition : {in D &, forall x y, (y \in pblock P x) = R x y}. Proof. (* Goal: @prop_in2 (Finite.sort T) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T D)) (fun x y : Finite.sort T => @eq bool (@in_mem (Finite.sort T) y (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (pblock equivalence_partition x)))) (R x y)) (inPhantom (forall x y : Finite.sort T, @eq bool (@in_mem (Finite.sort T) y (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (pblock equivalence_partition x)))) (R x y))) *) have [_ tiP _] := and3P equivalence_partitionP. (* Goal: @prop_in2 (Finite.sort T) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T D)) (fun x y : Finite.sort T => @eq bool (@in_mem (Finite.sort T) y (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (pblock equivalence_partition x)))) (R x y)) (inPhantom (forall x y : Finite.sort T, @eq bool (@in_mem (Finite.sort T) y (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (pblock equivalence_partition x)))) (R x y))) *) by move=> x y Dx Dy; rewrite /= (def_pblock tiP (PPx Dx) (Pxx Dx)) inE Dy. Qed. End Equivalence. Lemma pblock_equivalence P D : partition P D -> {in D & &, equivalence_rel (fun x y => y \in pblock P x)}. Proof. (* Goal: forall _ : is_true (partition P D), @prop_in3 (Finite.sort T) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T D)) (fun x y z : Finite.sort T => prod (is_true ((fun x0 y0 : Finite.sort T => @in_mem (Finite.sort T) y0 (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (pblock P x0)))) z z)) (forall _ : is_true ((fun x0 y0 : Finite.sort T => @in_mem (Finite.sort T) y0 (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (pblock P x0)))) x y), @eq bool ((fun x0 y0 : Finite.sort T => @in_mem (Finite.sort T) y0 (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (pblock P x0)))) x z) ((fun x0 y0 : Finite.sort T => @in_mem (Finite.sort T) y0 (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (pblock P x0)))) y z))) (inPhantom (@equivalence_rel (Finite.sort T) (fun x y : Finite.sort T => @in_mem (Finite.sort T) y (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (pblock P x)))))) *) case/and3P=> /eqP <- tiP _ x y z Px Py Pz. (* Goal: prod (is_true (@in_mem (Finite.sort T) z (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (pblock P z))))) (forall _ : is_true (@in_mem (Finite.sort T) y (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (pblock P x)))), @eq bool (@in_mem (Finite.sort T) z (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (pblock P x)))) (@in_mem (Finite.sort T) z (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (pblock P y))))) *) by rewrite mem_pblock; split=> // /same_pblock->. Qed. Lemma equivalence_partition_pblock P D : partition P D -> equivalence_partition (fun x y => y \in pblock P x) D = P. Proof. (* Goal: forall _ : is_true (partition P D), @eq (@set_of (set_of_finType T) (Phant (Finite.sort (set_of_finType T)))) (equivalence_partition (fun x y : Finite.sort T => @in_mem (Finite.sort T) y (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (pblock P x)))) D) P *) case/and3P=> /eqP <-{D} tiP notP0; apply/setP=> B /=; set D := cover P. (* Goal: @eq bool (@in_mem (@set_of T (Phant (Finite.sort T))) B (@mem (@set_of T (Phant (Finite.sort T))) (predPredType (@set_of T (Phant (Finite.sort T)))) (@SetDef.pred_of_set (set_of_finType T) (equivalence_partition (fun x y : Finite.sort T => @in_mem (Finite.sort T) y (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (pblock P x)))) D)))) (@in_mem (@set_of T (Phant (Finite.sort T))) B (@mem (@set_of T (Phant (Finite.sort T))) (predPredType (@set_of T (Phant (Finite.sort T)))) (@SetDef.pred_of_set (set_of_finType T) P))) *) have defP x: x \in D -> [set y in D | y \in pblock P x] = pblock P x. (* Goal: @eq bool (@in_mem (@set_of T (Phant (Finite.sort T))) B (@mem (@set_of T (Phant (Finite.sort T))) (predPredType (@set_of T (Phant (Finite.sort T)))) (@SetDef.pred_of_set (set_of_finType T) (equivalence_partition (fun x y : Finite.sort T => @in_mem (Finite.sort T) y (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (pblock P x)))) D)))) (@in_mem (@set_of T (Phant (Finite.sort T))) B (@mem (@set_of T (Phant (Finite.sort T))) (predPredType (@set_of T (Phant (Finite.sort T)))) (@SetDef.pred_of_set (set_of_finType T) P))) *) (* Goal: forall _ : is_true (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T D))), @eq (@set_of T (Phant (Finite.sort T))) (@SetDef.finset T (fun y : Finite.sort T => andb (@in_mem (Finite.sort T) y (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T D))) (@in_mem (Finite.sort T) y (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (pblock P x)))))) (pblock P x) *) by move=> Dx; apply/setIidPr; rewrite (bigcup_max (pblock P x)) ?pblock_mem. (* Goal: @eq bool (@in_mem (@set_of T (Phant (Finite.sort T))) B (@mem (@set_of T (Phant (Finite.sort T))) (predPredType (@set_of T (Phant (Finite.sort T)))) (@SetDef.pred_of_set (set_of_finType T) (equivalence_partition (fun x y : Finite.sort T => @in_mem (Finite.sort T) y (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (pblock P x)))) D)))) (@in_mem (@set_of T (Phant (Finite.sort T))) B (@mem (@set_of T (Phant (Finite.sort T))) (predPredType (@set_of T (Phant (Finite.sort T)))) (@SetDef.pred_of_set (set_of_finType T) P))) *) apply/imsetP/idP=> [[x Px ->{B}] | PB]; first by rewrite defP ?pblock_mem. (* Goal: @ex2 (Finite.sort T) (fun x : Finite.sort T => is_true (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T D)))) (fun x : Finite.sort T => @eq (Finite.sort (set_of_finType T)) B (@SetDef.finset T (fun y : Finite.sort T => andb (@in_mem (Finite.sort T) y (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T D))) (@in_mem (Finite.sort T) y (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (pblock P x))))))) *) have /set0Pn[x Bx]: B != set0 := memPn notP0 B PB. (* Goal: @ex2 (Finite.sort T) (fun x : Finite.sort T => is_true (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T D)))) (fun x : Finite.sort T => @eq (Finite.sort (set_of_finType T)) B (@SetDef.finset T (fun y : Finite.sort T => andb (@in_mem (Finite.sort T) y (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T D))) (@in_mem (Finite.sort T) y (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (pblock P x))))))) *) have Px: x \in cover P by apply/bigcupP; exists B. (* Goal: @ex2 (Finite.sort T) (fun x : Finite.sort T => is_true (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T D)))) (fun x : Finite.sort T => @eq (Finite.sort (set_of_finType T)) B (@SetDef.finset T (fun y : Finite.sort T => andb (@in_mem (Finite.sort T) y (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T D))) (@in_mem (Finite.sort T) y (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (pblock P x))))))) *) by exists x; rewrite // defP // (def_pblock tiP PB Bx). Qed. Section Preim. Variables (rT : eqType) (f : T -> rT). Definition preim_partition := equivalence_partition (fun x y => f x == f y). Lemma preim_partitionP D : partition (preim_partition D) D. Proof. (* Goal: is_true (partition (preim_partition D) D) *) by apply/equivalence_partitionP; split=> // /eqP->. Qed. End Preim. Lemma preim_partition_pblock P D : partition P D -> preim_partition (pblock P) D = P. Proof. (* Goal: forall _ : is_true (partition P D), @eq (@set_of (set_of_finType T) (Phant (Finite.sort (set_of_finType T)))) (@preim_partition (set_of_eqType T) (pblock P) D) P *) move=> partP; have [/eqP defD tiP _] := and3P partP. (* Goal: @eq (@set_of (set_of_finType T) (Phant (Finite.sort (set_of_finType T)))) (@preim_partition (set_of_eqType T) (pblock P) D) P *) rewrite -{2}(equivalence_partition_pblock partP); apply: eq_in_imset => x Dx. (* Goal: @eq (Finite.sort (set_of_finType T)) (@SetDef.finset T (fun y : Finite.sort T => andb (@in_mem (Finite.sort T) y (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T D))) (@eq_op (set_of_eqType T) (pblock P x) (pblock P y)))) (@SetDef.finset T (fun y : Finite.sort T => andb (@in_mem (Finite.sort T) y (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T D))) (@in_mem (Finite.sort T) y (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (pblock P x)))))) *) by apply/setP=> y; rewrite !inE eq_pblock ?defD. Qed. Lemma transversalP P D : partition P D -> is_transversal (transversal P D) P D. Section Transversals. Variables (X : {set T}) (P : {set {set T}}) (D : {set T}). Hypothesis trPX : is_transversal X P D. Lemma transversal_sub : X \subset D. Proof. by case/and3P: trPX. Qed. Proof. (* Goal: is_true (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T X)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T D))) *) by case/and3P: trPX. Qed. Let sXP : {subset X <= cover P}. Proof. (* Goal: @sub_mem (Finite.sort T) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T X)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (cover P))) *) by case/and3P: trPX => /andP[/eqP-> _] /subsetP. Qed. Let trX : {in P, forall B, #|X :&: B| == 1}. Proof. (* Goal: @prop_in1 (Finite.sort (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) P)) (fun B : @set_of T (Phant (Finite.sort T)) => is_true (@eq_op nat_eqType (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setI T X B)))) (S O))) (inPhantom (forall B : @set_of T (Phant (Finite.sort T)), is_true (@eq_op nat_eqType (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setI T X B)))) (S O)))) *) by case/and3P: trPX => _ _ /forall_inP. Qed. Lemma setI_transversal_pblock x0 B : B \in P -> X :&: B = [set transversal_repr x0 X B]. Proof. (* Goal: forall _ : is_true (@in_mem (@set_of T (Phant (Finite.sort T))) B (@mem (Finite.sort (set_of_finType T)) (predPredType (Finite.sort (set_of_finType T))) (@SetDef.pred_of_set (set_of_finType T) P))), @eq (@set_of T (Phant (Finite.sort T))) (@setI T X B) (@set1 T (transversal_repr x0 X B)) *) by case/trX/cards1P=> x defXB; rewrite /transversal_repr defXB /pick enum_set1. Qed. Lemma repr_mem_pblock x0 B : B \in P -> transversal_repr x0 X B \in B. Proof. (* Goal: forall _ : is_true (@in_mem (@set_of T (Phant (Finite.sort T))) B (@mem (Finite.sort (set_of_finType T)) (predPredType (Finite.sort (set_of_finType T))) (@SetDef.pred_of_set (set_of_finType T) P))), is_true (@in_mem (Finite.sort T) (transversal_repr x0 X B) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B))) *) by move=> PB; rewrite -sub1set -setI_transversal_pblock ?subsetIr. Qed. Lemma repr_mem_transversal x0 B : B \in P -> transversal_repr x0 X B \in X. Proof. (* Goal: forall _ : is_true (@in_mem (@set_of T (Phant (Finite.sort T))) B (@mem (Finite.sort (set_of_finType T)) (predPredType (Finite.sort (set_of_finType T))) (@SetDef.pred_of_set (set_of_finType T) P))), is_true (@in_mem (Finite.sort T) (transversal_repr x0 X B) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T X))) *) by move=> PB; rewrite -sub1set -setI_transversal_pblock ?subsetIl. Qed. Lemma transversal_reprK x0 : {in P, cancel (transversal_repr x0 X) (pblock P)}. Proof. (* Goal: @prop_in1 (Finite.sort (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) P)) (fun x : @set_of T (Phant (Finite.sort T)) => @eq (@set_of T (Phant (Finite.sort T))) (pblock P (transversal_repr x0 X x)) x) (inPhantom (@cancel (Finite.sort T) (@set_of T (Phant (Finite.sort T))) (transversal_repr x0 X) (pblock P))) *) by move=> B PB; rewrite /= (def_pblock tiP PB) ?repr_mem_pblock. Qed. Lemma pblockK x0 : {in X, cancel (pblock P) (transversal_repr x0 X)}. Proof. (* Goal: @prop_in1 (Finite.sort T) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T X)) (fun x : Finite.sort T => @eq (Finite.sort T) (transversal_repr x0 X (pblock P x)) x) (inPhantom (@cancel (@set_of T (Phant (Finite.sort T))) (Finite.sort T) (pblock P) (transversal_repr x0 X))) *) move=> x Xx; have /bigcupP[B PB Bx] := sXP Xx; rewrite (def_pblock tiP PB Bx). (* Goal: @eq (Finite.sort T) (transversal_repr x0 X B) x *) by apply/esym/set1P; rewrite -setI_transversal_pblock // inE Xx. Qed. Lemma pblock_inj : {in X &, injective (pblock P)}. Proof. (* Goal: @prop_in2 (Finite.sort T) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T X)) (fun x1 x2 : Finite.sort T => forall _ : @eq (@set_of T (Phant (Finite.sort T))) (pblock P x1) (pblock P x2), @eq (Finite.sort T) x1 x2) (inPhantom (@injective (@set_of T (Phant (Finite.sort T))) (Finite.sort T) (pblock P))) *) by move=> x0; apply: (can_in_inj (pblockK x0)). Qed. Lemma pblock_transversal : pblock P @: X = P. Proof. (* Goal: @eq (@set_of (set_of_finType T) (Phant (Finite.sort (set_of_finType T)))) (@Imset.imset T (set_of_finType T) (pblock P) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T X))) P *) apply/setP=> B; apply/imsetP/idP=> [[x Xx ->] | PB]. (* Goal: @ex2 (Finite.sort T) (fun x : Finite.sort T => is_true (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T X)))) (fun x : Finite.sort T => @eq (Finite.sort (set_of_finType T)) B (pblock P x)) *) (* Goal: is_true (@in_mem (Finite.sort (set_of_finType T)) (pblock P x) (@mem (Finite.sort (set_of_finType T)) (predPredType (Finite.sort (set_of_finType T))) (@SetDef.pred_of_set (set_of_finType T) P))) *) by rewrite pblock_mem ?sXP. (* Goal: @ex2 (Finite.sort T) (fun x : Finite.sort T => is_true (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T X)))) (fun x : Finite.sort T => @eq (Finite.sort (set_of_finType T)) B (pblock P x)) *) have /cards1P[x0 _] := trX PB; set x := transversal_repr x0 X B. (* Goal: @ex2 (Finite.sort T) (fun x : Finite.sort T => is_true (@in_mem (Finite.sort T) x (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T X)))) (fun x : Finite.sort T => @eq (Finite.sort (set_of_finType T)) B (pblock P x)) *) by exists x; rewrite ?transversal_reprK ?repr_mem_transversal. Qed. Lemma card_transversal : #|X| = #|P|. Proof. (* Goal: @eq nat (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T X))) (@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) P))) *) by rewrite -pblock_transversal card_in_imset //; apply: pblock_inj. Qed. Lemma im_transversal_repr x0 : transversal_repr x0 X @: P = X. Proof. (* Goal: @eq (@set_of T (Phant (Finite.sort T))) (@Imset.imset (set_of_finType T) T (transversal_repr x0 X) (@mem (Finite.sort (set_of_finType T)) (predPredType (Finite.sort (set_of_finType T))) (@SetDef.pred_of_set (set_of_finType T) P))) X *) rewrite -{2}[X]imset_id -pblock_transversal -imset_comp. (* Goal: @eq (@set_of T (Phant (Finite.sort T))) (@Imset.imset T T (@funcomp (Finite.sort T) (Finite.sort (set_of_finType T)) (Finite.sort T) tt (transversal_repr x0 X) (pblock P)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T X))) (@Imset.imset T T (fun x : Finite.sort T => x) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T X))) *) by apply: eq_in_imset; apply: pblockK. Qed. End Transversals. End Partitions. Arguments trivIsetP {T P}. Arguments big_trivIset_cond [T R idx op] P [K E]. Arguments set_partition_big_cond [T R idx op] P [D K E]. Arguments big_trivIset [T R idx op] P [E]. Arguments set_partition_big [T R idx op] P [D E]. Prenex Implicits cover trivIset partition pblock. Lemma partition_partition (T : finType) (D : {set T}) P Q : partition P D -> partition Q P -> partition (cover @: Q) D /\ {in Q &, injective cover}. Section MaxSetMinSet. Variable T : finType. Notation sT := {set T}. Implicit Types A B C : sT. Implicit Type P : pred sT. Definition minset P A := [forall (B : sT | B \subset A), (B == A) == P B]. Lemma minset_eq P1 P2 A : P1 =1 P2 -> minset P1 A = minset P2 A. Proof. (* Goal: forall _ : @eqfun bool (@set_of T (Phant (Finite.sort T))) P1 P2, @eq bool (minset P1 A) (minset P2 A) *) by move=> eP12; apply: eq_forallb => B; rewrite eP12. Qed. Lemma minsetP P A : reflect ((P A) /\ (forall B, P B -> B \subset A -> B = A)) (minset P A). Proof. (* Goal: Bool.reflect (and (is_true (P A)) (forall (B : @set_of T (Phant (Finite.sort T))) (_ : is_true (P B)) (_ : is_true (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)))), @eq (@set_of T (Phant (Finite.sort T))) B A)) (minset P A) *) apply: (iffP forallP) => [minA | [PA minA] B]. (* Goal: is_true (implb (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A))) (@eq_op bool_eqType (@eq_op (set_of_eqType T) B A) (P B))) *) (* Goal: and (is_true (P A)) (forall (B : @set_of T (Phant (Finite.sort T))) (_ : is_true (P B)) (_ : is_true (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)))), @eq (@set_of T (Phant (Finite.sort T))) B A) *) split; first by have:= minA A; rewrite subxx eqxx /= => /eqP. (* Goal: is_true (implb (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A))) (@eq_op bool_eqType (@eq_op (set_of_eqType T) B A) (P B))) *) (* Goal: forall (B : @set_of T (Phant (Finite.sort T))) (_ : is_true (P B)) (_ : is_true (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)))), @eq (@set_of T (Phant (Finite.sort T))) B A *) by move=> B PB sBA; have:= minA B; rewrite PB sBA /= eqb_id => /eqP. (* Goal: is_true (implb (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A))) (@eq_op bool_eqType (@eq_op (set_of_eqType T) B A) (P B))) *) by apply/implyP=> sBA; apply/eqP; apply/eqP/idP=> [-> // | /minA]; apply. Qed. Arguments minsetP {P A}. Lemma minsetp P A : minset P A -> P A. Proof. (* Goal: forall _ : is_true (minset P A), is_true (P A) *) by case/minsetP. Qed. Lemma minsetinf P A B : minset P A -> P B -> B \subset A -> B = A. Proof. (* Goal: forall (_ : is_true (minset P A)) (_ : is_true (P B)) (_ : is_true (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)))), @eq (@set_of T (Phant (Finite.sort T))) B A *) by case/minsetP=> _; apply. Qed. Lemma ex_minset P : (exists A, P A) -> {A | minset P A}. Lemma minset_exists P C : P C -> {A | minset P A & A \subset C}. Definition maxset P A := minset (fun B => locked_with maxset_key P (~: B)) (~: A). Lemma maxset_eq P1 P2 A : P1 =1 P2 -> maxset P1 A = maxset P2 A. Proof. (* Goal: forall _ : @eqfun bool (@set_of T (Phant (Finite.sort T))) P1 P2, @eq bool (maxset P1 A) (maxset P2 A) *) by move=> eP12; apply: minset_eq => x /=; rewrite !unlock_with eP12. Qed. Lemma maxminset P A : maxset P A = minset [pred B | P (~: B)] (~: A). Proof. (* Goal: @eq bool (maxset P A) (minset (@pred_of_simpl (@set_of T (Phant (Finite.sort T))) (@SimplPred (@set_of T (Phant (Finite.sort T))) (fun B : @set_of T (Phant (Finite.sort T)) => P (@setC T B)))) (@setC T A)) *) by rewrite /maxset unlock. Qed. Lemma minmaxset P A : minset P A = maxset [pred B | P (~: B)] (~: A). Proof. (* Goal: @eq bool (minset P A) (maxset (@pred_of_simpl (@set_of T (Phant (Finite.sort T))) (@SimplPred (@set_of T (Phant (Finite.sort T))) (fun B : @set_of T (Phant (Finite.sort T)) => P (@setC T B)))) (@setC T A)) *) by rewrite /maxset unlock setCK; apply: minset_eq => B /=; rewrite setCK. Qed. Lemma maxsetP P A : reflect ((P A) /\ (forall B, P B -> A \subset B -> B = A)) (maxset P A). Proof. (* Goal: Bool.reflect (and (is_true (P A)) (forall (B : @set_of T (Phant (Finite.sort T))) (_ : is_true (P B)) (_ : is_true (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)))), @eq (@set_of T (Phant (Finite.sort T))) B A)) (maxset P A) *) apply: (iffP minsetP); rewrite ?setCK unlock_with => [] [PA minA]. (* Goal: and (is_true (P A)) (forall (B : @set_of T (Phant (Finite.sort T))) (_ : is_true (P (@setC T B))) (_ : is_true (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setC T A))))), @eq (@set_of T (Phant (Finite.sort T))) B (@setC T A)) *) (* Goal: and (is_true (P A)) (forall (B : @set_of T (Phant (Finite.sort T))) (_ : is_true (P B)) (_ : is_true (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)))), @eq (@set_of T (Phant (Finite.sort T))) B A) *) by split=> // B PB sAB; rewrite -[B]setCK [~: B]minA (setCK, setCS). (* Goal: and (is_true (P A)) (forall (B : @set_of T (Phant (Finite.sort T))) (_ : is_true (P (@setC T B))) (_ : is_true (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setC T A))))), @eq (@set_of T (Phant (Finite.sort T))) B (@setC T A)) *) by split=> // B PB' sBA'; rewrite -(minA _ PB') -1?setCS setCK. Qed. Lemma maxsetp P A : maxset P A -> P A. Proof. (* Goal: forall _ : is_true (maxset P A), is_true (P A) *) by case/maxsetP. Qed. Lemma maxsetsup P A B : maxset P A -> P B -> A \subset B -> B = A. Proof. (* Goal: forall (_ : is_true (maxset P A)) (_ : is_true (P B)) (_ : is_true (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T B)))), @eq (@set_of T (Phant (Finite.sort T))) B A *) by case/maxsetP=> _; apply. Qed. Lemma ex_maxset P : (exists A, P A) -> {A | maxset P A}. Proof. (* Goal: forall _ : @ex (@set_of T (Phant (Finite.sort T))) (fun A : @set_of T (Phant (Finite.sort T)) => is_true (P A)), @sig (@set_of T (Phant (Finite.sort T))) (fun A : @set_of T (Phant (Finite.sort T)) => is_true (maxset P A)) *) move=> exP; have{exP}: exists A, P (~: A). (* Goal: forall _ : @ex (@set_of T (Phant (Finite.sort T))) (fun A : @set_of T (Phant (Finite.sort T)) => is_true (P (@setC T A))), @sig (@set_of T (Phant (Finite.sort T))) (fun A : @set_of T (Phant (Finite.sort T)) => is_true (maxset P A)) *) (* Goal: @ex (@set_of T (Phant (Finite.sort T))) (fun A : @set_of T (Phant (Finite.sort T)) => is_true (P (@setC T A))) *) by case: exP => A PA; exists (~: A); rewrite setCK. (* Goal: forall _ : @ex (@set_of T (Phant (Finite.sort T))) (fun A : @set_of T (Phant (Finite.sort T)) => is_true (P (@setC T A))), @sig (@set_of T (Phant (Finite.sort T))) (fun A : @set_of T (Phant (Finite.sort T)) => is_true (maxset P A)) *) by case/ex_minset=> A minA; exists (~: A); rewrite /maxset unlock setCK. Qed. Lemma maxset_exists P C : P C -> {A : sT | maxset P A & C \subset A}. Proof. (* Goal: forall _ : is_true (P C), @sig2 (@set_of T (Phant (Finite.sort T))) (fun A : @set_of T (Phant (Finite.sort T)) => is_true (maxset P A)) (fun A : @set_of T (Phant (Finite.sort T)) => is_true (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T C)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)))) *) move=> PC; pose P' B := P (~: B); have: P' (~: C) by rewrite /P' setCK. (* Goal: forall _ : is_true (P' (@setC T C)), @sig2 (@set_of T (Phant (Finite.sort T))) (fun A : @set_of T (Phant (Finite.sort T)) => is_true (maxset P A)) (fun A : @set_of T (Phant (Finite.sort T)) => is_true (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T C)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)))) *) case/minset_exists=> B; rewrite -[B]setCK setCS. (* Goal: forall (_ : is_true (minset P' (@setC T (@setC T B)))) (_ : is_true (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T C)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T (@setC T B))))), @sig2 (@set_of T (Phant (Finite.sort T))) (fun A : @set_of T (Phant (Finite.sort T)) => is_true (maxset P A)) (fun A : @set_of T (Phant (Finite.sort T)) => is_true (@subset T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T C)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A)))) *) by exists (~: B); rewrite // /maxset unlock. Qed. End MaxSetMinSet. Arguments setCK {T}. Arguments minsetP {T P A}. Arguments maxsetP {T P A}. Prenex Implicits minset maxset.
Require Export GeoCoq.Elements.OriginalProofs.lemma_lessthantransitive. Section Euclid. Context `{Ax:euclidean_neutral_ruler_compass}. Lemma lemma_TTtransitive : forall A B C D E F G H P Q R S, TT A B C D E F G H -> TT E F G H P Q R S -> TT A B C D P Q R S. Proof. (* Goal: forall (A B C D E F G H P Q R S : @Point Ax0) (_ : @TT Ax0 A B C D E F G H) (_ : @TT Ax0 E F G H P Q R S), @TT Ax0 A B C D P Q R S *) intros. (* Goal: @TT Ax0 A B C D P Q R S *) let Tf:=fresh in assert (Tf:exists K, (BetS E F K /\ Cong F K G H /\ TG A B C D E K)) by (conclude_def TT );destruct Tf as [K];spliter. (* Goal: @TT Ax0 A B C D P Q R S *) let Tf:=fresh in assert (Tf:exists J, (BetS A B J /\ Cong B J C D /\ Lt E K A J)) by (conclude_def TG );destruct Tf as [J];spliter. (* Goal: @TT Ax0 A B C D P Q R S *) let Tf:=fresh in assert (Tf:exists L, (BetS P Q L /\ Cong Q L R S /\ TG E F G H P L)) by (conclude_def TT );destruct Tf as [L];spliter. (* Goal: @TT Ax0 A B C D P Q R S *) let Tf:=fresh in assert (Tf:exists M, (BetS E F M /\ Cong F M G H /\ Lt P L E M)) by (conclude_def TG );destruct Tf as [M];spliter. (* Goal: @TT Ax0 A B C D P Q R S *) assert (eq K K) by (conclude cn_equalityreflexive). (* Goal: @TT Ax0 A B C D P Q R S *) assert (neq F K) by (forward_using lemma_betweennotequal). (* Goal: @TT Ax0 A B C D P Q R S *) assert (neq F M) by (forward_using lemma_betweennotequal). (* Goal: @TT Ax0 A B C D P Q R S *) assert (Out F K M) by (conclude_def Out ). (* Goal: @TT Ax0 A B C D P Q R S *) assert (Out F K K) by (conclude lemma_ray4). (* Goal: @TT Ax0 A B C D P Q R S *) assert (Cong G H F M) by (conclude lemma_congruencesymmetric). (* Goal: @TT Ax0 A B C D P Q R S *) assert (Cong F K F M) by (conclude lemma_congruencetransitive). (* Goal: @TT Ax0 A B C D P Q R S *) assert (eq K M) by (conclude lemma_layoffunique). (* Goal: @TT Ax0 A B C D P Q R S *) assert (Lt P L E K) by (conclude cn_equalitysub). (* Goal: @TT Ax0 A B C D P Q R S *) assert (Lt P L A J) by (conclude lemma_lessthantransitive). (* Goal: @TT Ax0 A B C D P Q R S *) assert (TG A B C D P L) by (conclude_def TG ). (* Goal: @TT Ax0 A B C D P Q R S *) assert (TT A B C D P Q R S) by (conclude_def TT ). (* Goal: @TT Ax0 A B C D P Q R S *) close. Qed. End Euclid.
Require Export GeoCoq.Elements.OriginalProofs.lemma_angletrichotomy. Require Export GeoCoq.Elements.OriginalProofs.lemma_equalanglesreflexive. Require Export GeoCoq.Elements.OriginalProofs.lemma_trichotomy1. Section Euclid. Context `{Ax:euclidean_neutral_ruler_compass}. Lemma proposition_26A : forall A B C D E F, Triangle A B C -> Triangle D E F -> CongA A B C D E F -> CongA B C A E F D -> Cong B C E F -> Cong A B D E /\ Cong A C D F /\ CongA B A C E D F. Proof. (* Goal: forall (A B C D E F : @Point Ax0) (_ : @Triangle Ax0 A B C) (_ : @Triangle Ax0 D E F) (_ : @CongA Ax0 A B C D E F) (_ : @CongA Ax0 B C A E F D) (_ : @Cong Ax0 B C E F), and (@Cong Ax0 A B D E) (and (@Cong Ax0 A C D F) (@CongA Ax0 B A C E D F)) *) intros. (* Goal: and (@Cong Ax0 A B D E) (and (@Cong Ax0 A C D F) (@CongA Ax0 B A C E D F)) *) assert (nCol A B C) by (conclude_def Triangle ). (* Goal: and (@Cong Ax0 A B D E) (and (@Cong Ax0 A C D F) (@CongA Ax0 B A C E D F)) *) assert (~ eq A B). (* Goal: and (@Cong Ax0 A B D E) (and (@Cong Ax0 A C D F) (@CongA Ax0 B A C E D F)) *) (* 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: and (@Cong Ax0 A B D E) (and (@Cong Ax0 A C D F) (@CongA Ax0 B A C E D F)) *) } (* Goal: and (@Cong Ax0 A B D E) (and (@Cong Ax0 A C D F) (@CongA Ax0 B A C E D F)) *) assert (neq B A) by (conclude lemma_inequalitysymmetric). (* Goal: and (@Cong Ax0 A B D E) (and (@Cong Ax0 A C D F) (@CongA Ax0 B A C E D F)) *) assert (~ eq B C). (* Goal: and (@Cong Ax0 A B D E) (and (@Cong Ax0 A C D F) (@CongA Ax0 B A C E D F)) *) (* 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: and (@Cong Ax0 A B D E) (and (@Cong Ax0 A C D F) (@CongA Ax0 B A C E D F)) *) } (* Goal: and (@Cong Ax0 A B D E) (and (@Cong Ax0 A C D F) (@CongA Ax0 B A C E D F)) *) assert (neq C B) by (conclude lemma_inequalitysymmetric). (* Goal: and (@Cong Ax0 A B D E) (and (@Cong Ax0 A C D F) (@CongA Ax0 B A C E D F)) *) assert (~ eq A C). (* Goal: and (@Cong Ax0 A B D E) (and (@Cong Ax0 A C D F) (@CongA Ax0 B A C E D F)) *) (* 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: and (@Cong Ax0 A B D E) (and (@Cong Ax0 A C D F) (@CongA Ax0 B A C E D F)) *) } (* Goal: and (@Cong Ax0 A B D E) (and (@Cong Ax0 A C D F) (@CongA Ax0 B A C E D F)) *) assert (neq C A) by (conclude lemma_inequalitysymmetric). (* Goal: and (@Cong Ax0 A B D E) (and (@Cong Ax0 A C D F) (@CongA Ax0 B A C E D F)) *) assert (~ Lt D E A B). (* Goal: and (@Cong Ax0 A B D E) (and (@Cong Ax0 A C D F) (@CongA Ax0 B A C E D F)) *) (* Goal: not (@Lt Ax0 D E A B) *) { (* Goal: not (@Lt Ax0 D E A B) *) intro. (* Goal: False *) assert (Cong A B B A) by (conclude cn_equalityreverse). (* Goal: False *) assert (Lt D E B A) by (conclude lemma_lessthancongruence). (* Goal: False *) let Tf:=fresh in assert (Tf:exists G, (BetS B G A /\ Cong B G D E)) by (conclude_def Lt );destruct Tf as [G];spliter. (* Goal: False *) assert (neq B G) by (forward_using lemma_betweennotequal). (* Goal: False *) assert (Cong B G E D) by (forward_using lemma_congruenceflip). (* Goal: False *) assert (Out B A G) 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 (Cong G C G C) by (conclude cn_congruencereflexive). (* Goal: False *) assert (eq B B) by (conclude cn_equalityreflexive). (* Goal: False *) assert (eq G G) by (conclude cn_equalityreflexive). (* Goal: False *) assert (Out B G G) by (conclude lemma_ray4). (* Goal: False *) assert (Cong B G B G) by (conclude cn_congruencereflexive). (* Goal: False *) assert (Cong B C B C) by (conclude cn_congruencereflexive). (* Goal: False *) assert (CongA A B C G B C) by (conclude_def CongA ). (* Goal: False *) assert (CongA G B C A B C) by (conclude lemma_equalanglessymmetric). (* Goal: False *) assert (CongA G B C D E F) by (conclude lemma_equalanglestransitive). (* Goal: False *) assert ((Cong G C D F /\ CongA B G C E D F /\ CongA B C G E F D)) by (conclude proposition_04). (* Goal: False *) assert (CongA E F D B C A) by (conclude lemma_equalanglessymmetric). (* Goal: False *) assert (CongA B C G B C A) by (conclude lemma_equalanglestransitive). (* Goal: False *) assert (CongA B C A B C G) by (conclude lemma_equalanglessymmetric). (* Goal: False *) assert (Out C B B) by (conclude lemma_ray4). (* Goal: False *) assert (eq A A) by (conclude cn_equalityreflexive). (* Goal: False *) assert (Out C A A) by (conclude lemma_ray4). (* Goal: False *) assert (LtA B C A B C A) by (conclude_def LtA ). (* Goal: False *) assert (~ LtA B C A B C A) by (conclude lemma_angletrichotomy). (* Goal: False *) contradict. (* BG Goal: and (@Cong Ax0 A B D E) (and (@Cong Ax0 A C D F) (@CongA Ax0 B A C E D F)) *) } (* Goal: and (@Cong Ax0 A B D E) (and (@Cong Ax0 A C D F) (@CongA Ax0 B A C E D F)) *) assert (~ Lt A B D E). (* Goal: and (@Cong Ax0 A B D E) (and (@Cong Ax0 A C D F) (@CongA Ax0 B A C E D F)) *) (* Goal: not (@Lt Ax0 A B D E) *) { (* Goal: not (@Lt Ax0 A B D E) *) intro. (* Goal: False *) assert (Cong D E E D) by (conclude cn_equalityreverse). (* Goal: False *) assert (Lt A B E D) by (conclude lemma_lessthancongruence). (* Goal: False *) let Tf:=fresh in assert (Tf:exists G, (BetS E G D /\ Cong E G A B)) by (conclude_def Lt );destruct Tf as [G];spliter. (* Goal: False *) assert (Cong E G B A) by (forward_using lemma_congruenceflip). (* Goal: False *) assert (neq E D) by (forward_using lemma_betweennotequal). (* Goal: False *) assert (Out E D G) by (conclude lemma_ray4). (* Goal: False *) assert (eq D D) by (conclude cn_equalityreflexive). (* Goal: False *) assert (eq F F) by (conclude cn_equalityreflexive). (* Goal: False *) assert (nCol D E F) by (conclude_def Triangle ). (* Goal: False *) assert (~ eq E F). (* Goal: False *) (* Goal: not (@eq Ax0 E F) *) { (* Goal: not (@eq Ax0 E F) *) intro. (* Goal: False *) assert (Col D E F) by (conclude_def Col ). (* Goal: False *) contradict. (* BG Goal: and (@Cong Ax0 A B D E) (and (@Cong Ax0 A C D F) (@CongA Ax0 B A C E D F)) *) (* BG Goal: False *) } (* Goal: False *) assert (Out E F F) by (conclude lemma_ray4). (* Goal: False *) assert (Cong G F G F) by (conclude cn_congruencereflexive). (* Goal: False *) assert (eq E E) by (conclude cn_equalityreflexive). (* Goal: False *) assert (eq G G) by (conclude cn_equalityreflexive). (* Goal: False *) assert (neq E G) by (conclude lemma_raystrict). (* Goal: False *) assert (Out E G G) by (conclude lemma_ray4). (* Goal: False *) assert (Cong E G E G) by (conclude cn_congruencereflexive). (* Goal: False *) assert (Cong E F E F) by (conclude cn_congruencereflexive). (* Goal: False *) assert (CongA D E F G E F) by (conclude_def CongA ). (* Goal: False *) assert (CongA G E F D E F) by (conclude lemma_equalanglessymmetric). (* Goal: False *) assert (CongA D E F A B C) by (conclude lemma_equalanglessymmetric). (* Goal: False *) assert (CongA G E F A B C) by (conclude lemma_equalanglestransitive). (* Goal: False *) assert (Cong E F B C) by (conclude lemma_congruencesymmetric). (* Goal: False *) assert ((Cong G F A C /\ CongA E G F B A C /\ CongA E F G B C A)) by (conclude proposition_04). (* Goal: False *) assert (CongA E F G E F D) by (conclude lemma_equalanglestransitive). (* Goal: False *) assert (CongA E F D E F G) by (conclude lemma_equalanglessymmetric). (* Goal: False *) assert (nCol E F G) by (conclude lemma_equalanglesNC). (* Goal: False *) assert (CongA E F G E F G) by (conclude lemma_equalanglesreflexive). (* Goal: False *) assert (neq E F) by (forward_using lemma_angledistinct). (* Goal: False *) assert (neq F E) by (conclude lemma_inequalitysymmetric). (* Goal: False *) assert (Out F E E) by (conclude lemma_ray4). (* Goal: False *) assert (neq F D) by (forward_using lemma_angledistinct). (* Goal: False *) assert (Out F D D) by (conclude lemma_ray4). (* Goal: False *) assert (LtA E F D E F D) by (conclude_def LtA ). (* Goal: False *) assert (~ LtA E F D E F D) by (conclude lemma_angletrichotomy). (* Goal: False *) contradict. (* BG Goal: and (@Cong Ax0 A B D E) (and (@Cong Ax0 A C D F) (@CongA Ax0 B A C E D F)) *) } (* Goal: and (@Cong Ax0 A B D E) (and (@Cong Ax0 A C D F) (@CongA Ax0 B A C E D F)) *) assert (~ eq D E). (* Goal: and (@Cong Ax0 A B D E) (and (@Cong Ax0 A C D F) (@CongA Ax0 B A C E D F)) *) (* Goal: not (@eq Ax0 D E) *) { (* Goal: not (@eq Ax0 D E) *) intro. (* Goal: False *) assert (Col D E F) by (conclude_def Col ). (* Goal: False *) assert (nCol D E F) by (conclude_def Triangle ). (* Goal: False *) contradict. (* BG Goal: and (@Cong Ax0 A B D E) (and (@Cong Ax0 A C D F) (@CongA Ax0 B A C E D F)) *) } (* Goal: and (@Cong Ax0 A B D E) (and (@Cong Ax0 A C D F) (@CongA Ax0 B A C E D F)) *) assert (Cong A B D E) by (conclude lemma_trichotomy1). (* Goal: and (@Cong Ax0 A B D E) (and (@Cong Ax0 A C D F) (@CongA Ax0 B A C E D F)) *) assert (Cong B A E D) by (forward_using lemma_congruenceflip). (* Goal: and (@Cong Ax0 A B D E) (and (@Cong Ax0 A C D F) (@CongA Ax0 B A C E D F)) *) assert ((Cong A C D F /\ CongA B A C E D F /\ CongA B C A E F D)) by (conclude proposition_04). (* Goal: and (@Cong Ax0 A B D E) (and (@Cong Ax0 A C D F) (@CongA Ax0 B A C E D F)) *) close. Qed. End Euclid.